Jason Ekstrand
aa4ea9c7ea
nir: Add intrinsics for object to/from world RT sysvals
...
These are a bit more tricky than most because they're matrix system
values. We make the intentional choice here to not bother with allowing
indirect addressing of columns for these. Since they're system values,
they may be magically constructed somehow or come from weird hardware so
it's easier on back-ends to just handle any indirects with bcsel.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479 >
2020-11-05 23:36:46 +00:00
Jason Ekstrand
07635a3284
nir/builder: Add a select_from_ssa_def_array helper
...
This is an operation we have to do already for nir_vector_extract and
I'm about to do something very similar for matrix columns. Having a
more generic helper is useful.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479 >
2020-11-05 23:36:46 +00:00
Jason Ekstrand
46cd91bb45
spirv,nir: Add support for ray-tracing built-ins
...
Missing in this commit are NIR intrinsics for the ObjectToWorld and
WorldToObject built-ins. Those are matrices and so they take a bit more
work and justify a separate commit. For now, we add the enums and leave
the SYSTEM_VALUE <-> nir_intrinsic conversion commented out.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479 >
2020-11-05 23:36:46 +00:00
Jason Ekstrand
ed907e5d84
spirv: Add support for OpTypeAccelerationStructureKHR
...
For now, we assume its a 64-bit global pointer.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479 >
2020-11-05 23:36:45 +00:00
Jason Ekstrand
2df055ab47
spirv: Pass the deref type to storage_class_to_mode for non-forward pointers
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479 >
2020-11-05 23:36:45 +00:00
Jason Ekstrand
2bef02696d
spirv: Add a guard for OpTypeForwardPointer storage classes
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479 >
2020-11-05 23:36:45 +00:00
Jason Ekstrand
aabe37b969
spirv: Remove a redundant vtn_fail_if
...
We already fail in these same cases in vk_desc_type_for_mode. These
additional assertions are just extra code to update.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479 >
2020-11-05 23:36:45 +00:00
Caio Marcelo de Oliveira Filho
3bcebe1b27
spirv: Add Ray Tracing execution models
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479 >
2020-11-05 23:36:45 +00:00
Jason Ekstrand
d8dbdf20de
spirv: Add basic plumbing for ray-tracing capabilities
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479 >
2020-11-05 23:36:45 +00:00
Caio Marcelo de Oliveira Filho
f65182931d
compiler: Add new Vulkan shader stages
...
This particular ordering makes them conveniently match
VkShaderStageFlagBits, which is a property we already take advantage
of in the previous shader stages.
Abbreviations are based on the ones used in glslangValidator.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479 >
2020-11-05 23:36:45 +00:00
Eric Anholt
1882a02d83
tu: Make sure spirv_to_nir knows we support imageStorageWithoutFormat.
...
You have to set these flags along with the extension, or you get a bunch
of warnings from spirv-to-nir.
Fixes: e781cc7025 ("tu: Expose shaderStorageImage*WithoutFormat")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7465 >
2020-11-05 22:34:32 +00:00
Mike Blumenkrantz
0b0f152c54
nir/clip_disable: handle 2x vec4 case
...
some drivers may have pre-lowered gl_ClipDistance to 2x vec4 to match hw
usage, so for those cases we'll be getting deref_var here and then components
will be stored to the deref at some point
fixes mesa/mesa#3480
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6563 >
2020-11-05 21:32:27 +00:00
Mike Blumenkrantz
5e43ba39e1
nir/clip_disable: try for better no-op
...
we can just check the bits using clip_distance_array_size here to simplify
everything and more easily determine if we need to be running this pass
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6563 >
2020-11-05 21:32:27 +00:00
Mike Blumenkrantz
1d23a88c6e
nir/clip_disable: write 0s instead of undefs for disabled clip planes
...
this should yield more reliable and ideally even correct results
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6563 >
2020-11-05 21:32:27 +00:00
Kenneth Graunke
c84ae1523e
iris: Move blit scissoring earlier.
...
There's no need to e.g. prepare_access() if the blit is a noop.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7454 >
2020-11-05 12:30:46 -08:00
Iván Briano
0f96a9ab3b
anv: restrict number of subgroups per group
...
We are limited to 64 threads per dispatched group, regardless of what
num_cs_threads claims, so advertise that limit correctly.
Fixes (on TGL and up):
dEQP-VK.subgroups.size_control.compute.required_subgroup_size_min
and other *.required_subgroup_size_min tests.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7453 >
2020-11-05 10:43:06 -08:00
Jonathan Marek
b2c719308c
turnip: enable VK_EXT_image_drm_format_modifier
...
Add missing GetPhysicalDeviceImageFormatProperties2 logic for the extension
and enable it.
Also stop exposing optimal tiling for formats which are linear only, to
simplify dealing with those.
Passes dEQP-VK.drm_format_modifiers.*
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6940 >
2020-11-05 18:06:15 +00:00
Jonathan Marek
f624692a57
turnip: don't always fallback to linear for mutable formats
...
Use VkImageFormatListCreateInfo, and enable VK_KHR_image_format_list to
expose it. (and reorganize linear fallback code a bit)
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6940 >
2020-11-05 18:06:15 +00:00
Jonathan Marek
8c4426f519
turnip: remove unnecessary/redundant tu_image fields
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6940 >
2020-11-05 18:06:15 +00:00
Jonathan Marek
c64cd6988f
turnip: remove useless tu_image asserts
...
Validation layer already catches these errors, so don't bother.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6940 >
2020-11-05 18:06:15 +00:00
Jonathan Marek
dfaa8b9ae7
turnip: LAYOUT_PREINITIALIZED is not different for optimal tiling
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6940 >
2020-11-05 18:06:14 +00:00
Jonathan Marek
43c16483e0
turnip: don't implement CreateImage as two separate functions
...
Inline tu_image_create into tu_CreateImage.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6940 >
2020-11-05 18:06:14 +00:00
Tony Wasserka
1a1099c54f
aco: Fix format string used when raising validation errors
...
Validation errors mention the pretty-printed instruction including
operands with the reserved % character, which caused vasprintf to
expect more format arguments than aco provided.
Fixes: c2b1978aa4 ("aco: rework the way various compilation/validation errors are reported")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7442 >
2020-11-05 17:56:18 +00:00
Jason Ekstrand
61d2badbf4
nir/deref: Fix a typo
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3754
Fixes: df51518dc5 "nir/opt_deref: Add a deref mode specialization..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7459 >
2020-11-05 16:31:25 +00:00
Tomeu Vizoso
60c5729d16
ci: Distribute ADMGPU driver to LAVA as a module
...
As it needs firmware to probe, and we cannot bundle it within the kernel
image because it is incompatible with the GPL.
Currently we rebind the driver after boot but that's slow and fragile,
as unloads of DRM drivers aren't generally tested.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7420 >
2020-11-05 17:09:58 +01:00
Tomeu Vizoso
bb41acf96a
ci: Update dEQP skips and fails for Bifrost on G52
...
Runs are much more stable now with the new kernel, and lots of tests
do pass now.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7420 >
2020-11-05 17:09:53 +01:00
Tomeu Vizoso
80cbb32443
ci: Update kernel for LAVA to 5.10-rc2 plus patches
...
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7420 >
2020-11-05 17:08:40 +01:00
Mike Blumenkrantz
092186d985
util/threaded_context: use driver's buffer alignment for staging transfers
...
this coincidentally worked because radeonsi has a hardcoded value of 64, but
other drivers do not use this value and then things are subtly broken
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7452 >
2020-11-05 13:50:13 +00:00
Juan A. Suarez Romero
60b9c00afd
v3d: Add GL_ARB_vertex_array_bgra support
...
This is done by adding support to PIPE_FORMAT_B8G8R8A8_UNORM, and
relying on the R/B swapping for vertex attributes implemented in the
compiler.
v2:
- Simplify the loop (Iago)
v3:
- Assert before derreferencing variable (Iago).
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3078
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7196 >
2020-11-05 12:15:29 +00:00
Juan A. Suarez Romero
9648bfba56
v3dv: mark the right bit to swap R/B vertex attributes
...
Now that the R/B swap mask for vertex attributes handles all the
attributes, ensure the right generic vertex attribute is marked.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7196 >
2020-11-05 12:15:28 +00:00
Juan A. Suarez Romero
1e723745dd
v3d/compiler: extend swapping R/B support to all vertex attributes
...
So far the support for R/B swapping in vertex attributes were for the
generic attributes.
But there are cases like glSecondaryColorPointer() supporting BGRA
formats that require the R/B swapping to be also allowed in the
non-generic vertex attributes (in this case, in the COLOR1 attribute).
v2:
- Don't split line (Iago)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7196 >
2020-11-05 12:15:28 +00:00
Marcin Ślusarz
44925a8a55
intel/tools: add missing new lines to few remaining fail_if users
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7449 >
2020-11-05 12:07:51 +00:00
Marcin Ślusarz
c323d7c2a7
intel/tools: refactor logging to be easier to follow by static analyzers
...
Refactor out the part of fail_if function that never returns into
NORETURN function and put the condition check outside.
Addresses many false positive warnings by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7449 >
2020-11-05 12:07:51 +00:00
Marcin Ślusarz
f0061277c0
intel/tools: handle some failures
...
Addresses "Dereference null return value" issues reported by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7449 >
2020-11-05 12:07:51 +00:00
Marcin Ślusarz
cd9907e7d3
anv: remove dead code from anv_create_cmd_buffer
...
pool can't be NULL at this point, because it was already
dereferenced earlier.
Addresses "Dereference before null check" issue reported by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7449 >
2020-11-05 12:07:51 +00:00
Marcin Ślusarz
d13b7d6591
intel/tools: allow --color option to be used without arg
...
There's already code handling that case and help text also says
it's possible.
Found, because Coverity complained about optarg NULL check,
suggesting optarg can be NULL for other options, where it's not
possible. IOW, false positive lead me to finding an unrelated issue.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7449 >
2020-11-05 12:07:51 +00:00
Iago Toral Quiroga
0dad1a7c72
v3dv: expose more features
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7456 >
2020-11-05 11:38:02 +01:00
Arcady Goldmints-Orlov
0b30336906
broadcom/compiler: Handle non-SSA destinations for tex instructions
...
The NIR that is given to the VIR compiler is not in SSA form, and so
the v3d*_vir_emit_tex() functions must be able to handle both SSA and
register destinations.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7318 >
2020-11-05 09:03:46 +00:00
Khem Raj
e331fd7fc4
vc4: use intmax_t for formatted output of timespec members
...
32bit architectures which have 64bit time_t does not fit the assumption
of time_t being same as system long int
Fixes
error: format specifies type 'long' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat]
time.tv_sec);
^~~~~~~~~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2966 >
2020-11-05 07:07:39 +00:00
Vinson Lee
c8630fd114
amd/addrlib: Add missing va_end.
...
Fix defect reported by Coverity Scan.
Missing varargs init or cleanup (VARARGS)
missing_va_end: va_end was not called for debugPrintInput.ap.
Fixes: 69ea473eeb ("amd/addrlib: update to the latest version")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7299 >
2020-11-04 19:05:00 -08:00
Adam Jackson
fe52efaa98
loader: Print dlerror() output in the failure message
...
This just captures the last failure, but that's better than nothing.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7429 >
2020-11-04 21:45:37 +00:00
Caio Marcelo de Oliveira Filho
5d5f3e3a47
intel/fs: Implement nir_intrinsic_{load,store}_shared_block_intel
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
9fe158e1d1
intel/fs: Implement nir_intrinsic_{load,store}_ssbo_block_intel
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
d372abe397
intel/fs: Add surface OWORD BLOCK opcodes
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
296137df53
intel/fs: Implement nir_intrinsic_{load,store}_global_block_intel
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
d3d2b73fa3
intel/fs: Add A64 OWORD BLOCK opcodes
...
Based on a patch for OWORD BLOCK READ from Jason Ekstrand.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
eb03f29655
spirv: Implement SpvCapabilitySubgroupBufferBlockIOINTEL
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
dd39e311b3
nir: Add nir_intrinsic_{load,store}_deref_block_intel
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Caio Marcelo de Oliveira Filho
b86ce274f9
spirv: Implement SpvCapabilitySubgroupShuffleINTEL from SPV_INTEL_subgroups
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7448 >
2020-11-04 20:24:48 +00:00
Nanley Chery
5194cbc766
iris: Flush dmabufs during context flushes
...
Currently, every modifier that uses CCS also lacks support for
fast-clears. On gen9+, dmabufs may gain fast-cleared blocks through
clear calls. On gen12, fast-clearing can occur during any rendering
operation. Mark when dmabufs gain fast-cleared blocks and flush them
during a context flush operation.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3425
Tested-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7384 >
2020-11-04 19:42:43 +00:00