Bas Nieuwenhuizen
84e0f6dbd8
nir: Fix shader calls with nir_opt_dead_write_vars.
...
Fixes: 5a28893279 ("spirv,nir: Add ray-tracing intrinsics")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10096 >
2021-04-08 11:10:52 +00:00
Jose Maria Casanova Crespo
95c4f0f910
v3d: Enables DRM_FORMAT_MOD_BROADCOM_SAND128 support
...
It enables SAND modifier with columns 128-bytes-wide support for
NV12 format.
When a DRM_FORMAT_MOD_BROADCOM_SAND128 is enabled an imported NV12
texture format has a different layout. Luma and Chroma planes layout
is interleaved for every 128-bytes-wide columns.
Although TFU was supposed to convert a NV12 with SAND_COL128 modifier
from YUV to sRGB color space, it expects a particular swizzle that is not
the one provided by the video decoder available at the Raspberry Pi 4.
This patch follows a similar approach to VC4 YUV blit, using a custom
blit shader that transforms a NV12 texture with SAND_COL128 modifier
with the two interleaved planes to two not-interleaved textures with
UIF format, as it was a regular NV12 format texture.
To reduce the number of texture-fetch operations during the blit, we
are reading and writing the textures in pixel groups of 32-bits. This
implies some swizzling of the pixels to meet the particularities
of the different micro-tile layouts for 8bpp, 16bpp and 32bpp.
With this approach, we are not adding a new format that could be named
"NV12_SAND128". We are just enabling a format modifier.
v2: Rework checks for supported modifiers (Alejandro Piñeiro)
Destroy custom shaders on context destroy (Alejandro Piñeiro)
Add more comments (Alejandro Piñeiro)
SAND128 in query_dmabuf_modifiers should report external_only true.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10051 >
2021-04-08 10:40:34 +00:00
Philipp Zabel
2470bcb946
meson: Fix missing xcb-xrandr dependency for Vulkan X11 WSI
...
Fixes a build failure when building any Vulkan driver for the X11
platform with -Dxlib-lease=disabled. For example:
/usr/bin/ld: src/vulkan/wsi/libvulkan_wsi.a(wsi_common_x11.c.o): in function `wsi_x11_detect_xwayland':
src/vulkan/wsi/wsi_common_x11.c:123: undefined reference to `xcb_randr_query_version_unchecked'
Fixes: 1de2fd0cf2 "wsi/x11: Always link against xcb-xrandr"
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9972 >
2021-04-08 10:08:40 +00:00
Rhys Perry
961361cdc9
aco: ensure loops nested in a WQM loop are in WQM
...
Fixes a potential empty exec mask in this situation:
enter_wqm()
loop {
... wqm code ...
enter_exact()
loop {
... no wqm code ...
}
}
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: f0074a6f05 ("aco: do not flag all blocks WQM to ensure we enter all nested loops in WQM")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4546
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10075 >
2021-04-08 09:56:25 +00:00
Rhys Perry
49cb1fac13
draw: fix pstipple, aaline and aapoint without LLVM
...
Because of nir_to_tgsi, LLVM is not required here.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Fixes: d0f8fe5909 ("softpipe: Switch to using NIR as the shader format from mesa/st.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10072 >
2021-04-08 09:33:59 +00:00
Lionel Landwerlin
49be175a4b
intel/fs: limit OW reads to 8 owords on XeHP+
...
We can only use 16 OW reads/writes on SLM.
v2: Update comment (Curro)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
BSpec: 47652
Fixes: 369eab9420 ("intel/fs: Emit code for Gen12-HP indirect compute data")
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10082 >
2021-04-08 09:25:38 +00:00
Lionel Landwerlin
655251ad30
anv: put correct number of BT prefetch for compute on XeHP+
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10084 >
2021-04-08 09:17:35 +00:00
Samuel Pitoiset
9a3d496398
radv: make sure FMASK decompress and FCE are performed on gfx queue
...
To catch possible transition failures.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10056 >
2021-04-08 08:21:40 +02:00
Mike Blumenkrantz
6528cd762d
zink: support ARB_fragment_shader_interlock
...
just smashing in some caps and intrinsics
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10013 >
2021-04-08 04:13:14 +00:00
Mike Blumenkrantz
7580a69844
zink: hook up EXT_fragment_shader_interlock
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10013 >
2021-04-08 04:13:14 +00:00
Mike Blumenkrantz
9114863609
zink: use explicit subpass deps
...
this lets us avoid the spec-mandated barrier and use flags based on
what we'll actually be doing in the pass
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9986 >
2021-04-08 04:02:21 +00:00
Mike Blumenkrantz
6536d5a947
zink: use set_foreach_remove()
...
this saves potentially thousands of iterations on each batch reset
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10097 >
2021-04-08 03:51:49 +00:00
Mike Blumenkrantz
c7e4f28a16
zink: simplify clear-apply on fb state change
...
since surfaces are cached and deduplicated, we no longer have to
do deep comparisons to determine whether two surfaces are equal and can
just compare the pointers
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10087 >
2021-04-08 03:44:20 +00:00
Mike Blumenkrantz
f19946ca6e
zink: stop unmapping resources
...
it turns out there's not actually a requirement that resources be unmapped,
which means that a ton of overhead can be saved both in the unmap codepath
(the cpu overhead here is pretty insane) and then also when mapping cached
resource memory, as the map can now be added to the cache for immediate reuse
as seen in radeonsi
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9980 >
2021-04-08 03:34:49 +00:00
Mike Blumenkrantz
eab985d070
zink: fix conditional when assigning tess variable io
...
this was not copied directly and changed the old conditional, which
was intended to catch only non-patch tess io
fixes tess io with legacy builtins, e.g., spec@!opengl 2.0@vertex-program-two-side back front2 back2
Fixes: 2d98efd323 ("zink: pre-populate locations in variables")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9996 >
2021-04-08 03:25:57 +00:00
Mike Blumenkrantz
8ebdb8c687
zink: bypass separate stencil path in resource_reference_rw when not a zs image
...
no point in trying to get a stencil resource if none exists
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9961 >
2021-04-08 03:15:25 +00:00
Mike Blumenkrantz
40e8328ce5
zink: remove atomic usage from batch tracking comparisons
...
race conditions here have no impact because it cannot change the evaluation
of this condition
also no need to check zs stuff if there's no update happening
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9961 >
2021-04-08 03:15:25 +00:00
Mike Blumenkrantz
15f2c1f661
zink: add env var to force uniform inlining
...
this is great for debugging/testing, but there's no great heuristics
for using it yet
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9888 >
2021-04-08 03:00:48 +00:00
Mike Blumenkrantz
7f28775edc
zink: implement uniform inlining
...
this lets us inline away our problems
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9888 >
2021-04-08 03:00:48 +00:00
Mike Blumenkrantz
b47815c772
zink: add a pipe_screen::finalize_nir hook
...
moves some of the always-run passes into the base nir
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9888 >
2021-04-08 03:00:47 +00:00
Mike Blumenkrantz
193c02e0cf
aux/trace: add GALLIUM_TRACE_TRIGGER mode
...
similar to amd/radv driver debug modes for sqtt, this specifies a filename
which is checked on every flush(PIPE_FLUSH_END_OF_FRAME); when it exists,
the next frame (and only that frame) is captured into the trace
to use, specify a file with the env var, run your app, and 'touch /path/to/file'
when you want to capture a trace
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10058 >
2021-04-08 00:01:31 +00:00
Enrico Galli
ad88e2f959
microsoft/spirv_to_dxil: Use non-zero exit code on failed compilations
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10064 >
2021-04-07 23:50:39 +00:00
Enrico Galli
5756f2cd2c
microsoft/spirv_to_dxil: Add support for load_vulkan_descriptor
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10064 >
2021-04-07 23:50:39 +00:00
Mike Blumenkrantz
31e546a762
util/hash_table: add macro for destructively iterating entries
...
a common usage for hash tables is for tracking exactly one instance of a pointer
for a given period of time, after which the table's entries are purged and it
is reused
this macro enables the purge phase of such usage to reset the table to a
pristine state, avoiding future rehashing due to ballooning of deleted entries
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8498 >
2021-04-07 22:57:27 +00:00
Mike Blumenkrantz
759cc91450
util/set: add macro for destructively iterating set entries
...
a common usage for sets is for tracking exactly one instance of a pointer
for a given period of time, after which the set's entries are purged and it
is reused
this macro enables the purge phase of such usage to reset the table to a
pristine state, avoiding future rehashing due to ballooning of deleted entries
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8498 >
2021-04-07 22:57:27 +00:00
Mike Blumenkrantz
539c7ca508
aux/trace: add a bunch of methods for lavapipe
...
with all of these, lavapipe can now be traced
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9958 >
2021-04-07 22:11:46 +00:00
Mike Blumenkrantz
c1270d4845
aux/trace: add screen deduplication for zink+lavapipe tracing
...
if zink+lavapipe is enabled at compile-time, special handling is needed
to ensure that only the intended screen is traced, otherwise malformed
xml will be generated
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10059 >
2021-04-07 21:48:37 +00:00
Dave Airlie
f89c8ba410
docs: update lavapipe bits for 1.1
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10086 >
2021-04-07 20:30:10 +00:00
Mike Blumenkrantz
e1ba6158c0
zink: export PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER
...
avoids memcpy slowpath
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9733 >
2021-04-07 20:19:59 +00:00
Dave Airlie
e1eb72ae3c
lavapipe: enable Vulkan 1.1 support
...
This is not fully conformant but the failures are the same as the Vulkan 1.0
failures.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
7b79db11c2
lavapipe: enable correct workgroup sizing
...
If I say layering violation, you say?
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
34525bb088
lavapipe: enable subgroups features
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
50049bd241
gallivm: add compute shader subgroup system values support
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
bf6fd9a2eb
gallivm: add subgroup lowering support
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
8dc398848a
gallivm: add subgroup read invocation support
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
2d6a0a8620
gallivm: add subgroup ballot support
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
7b3073ad44
gallivm: add subgroup reduction + in/ex scan support
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
2e1266d1fe
gallivm: add subgroup elect intrinsic support.
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
52415cd39e
gallivm: add subgroup system values support
...
This just adds support for retrieving subgroup system values.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
1b8145eee9
gallivm: move get_flt_bld to header.
...
Rewrite a little as we have to add 16-bit support later in life
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
2e23108274
gallivm: add subgroup vote 64-bit and feq support.
...
These are both required for vulkan subgroup support.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
8a18ed018b
lavapipe: fix missing protected memory properties
...
This is needed for vk 1.1
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
e47b742810
lavapipe: add vulkan 1.1 properties/features apis
...
Still have to add subgroups before advertising 1.1
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Mike Blumenkrantz
35c02f79c9
lavapipe: add some asserts for blit region extents
...
this enforces spec for 3d vs array texture blits, more to come
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10005 >
2021-04-07 19:45:26 +00:00
Dave Airlie
be477f39aa
ci: update zink/virgl results for depth clamping fixes
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10068 >
2021-04-08 05:19:00 +10:00
Dave Airlie
60bdf61d68
llvmpipe: always take depth clamping from state tracker
...
Don't be smarter than state tracker here, of d3d10 wants to do
something the state tracker should hard code that. Since lavapipe
wants to use clip_halfz and depth clipping independently.
This fixes some issues blitting Z that zink was seeing
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10068 >
2021-04-08 05:18:16 +10:00
Dave Airlie
f96f016c22
llvmpipe: when depth clamp is disable clamp to 0.0/1.0
...
When depth clamp is disabled the viewport values aren't meaningful,
however the value is about to be converted to a unorm so needs
to still be clamped to 0/1.
This might not be the best place for this, maybe it should be in
the write swizzled code.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10068 >
2021-04-08 05:17:53 +10:00
Samuel Pitoiset
da166f648f
radv: enable DCC for concurrent images on GFX10
...
The driver now supports DCC stores on GFX10 that means that we can
keep DCC compressed on all layouts/queues.
This should help games which use aync compute or which declare
all images as concurrent like Youngblood.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9850 >
2021-04-07 18:33:34 +00:00
Samuel Pitoiset
37d48de83e
radv: simplify a check when enabling DCC for concurrent images
...
If the image is marked as concurrent, each element of
pQueueFamilyIndices must be unique, so queue_family_mask is
different than 1.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9850 >
2021-04-07 18:33:34 +00:00
Mike Blumenkrantz
05ecb6780c
zink: emit WorkgroupSize when not using ExecutionModeLocalSize
...
the system_values_read bit might not be set if the value isn't read or is
DCE, but it still needs to be emitted
probably.
fixes #4591
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com >
Tested-by: Witold Baryluk <witold.baryluk@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10079 >
2021-04-07 17:55:53 +00:00