Caio Oliveira
412fe99ea6
compiler/types: Don't duplicate empty string
...
We can use the static version of the empty string. There's no worry
about freeing that string incorrectly since what is being deallocated
later is the whole mem_ctx.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25160 >
2023-09-12 23:18:12 +00:00
Caio Oliveira
247f940d37
compiler/types: Use right hash for function types
...
No bug really materialized since function types
aren't currently being used.
Fixes: 26f456203c ("compiler/types: Use hash table pre-hashed functions for type caching")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25160 >
2023-09-12 23:18:12 +00:00
Iván Briano
f1bc58cb7b
intel/fs: use ffsll so we don't explode on 32 bits
...
Fixes: b200e5765c ("anv: use a simpler MUE layout for fast linked libraries")
Tested-by: Mark Janes <markjanes@swizzler.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25192 >
2023-09-12 22:42:38 +00:00
Dave Airlie
147c17c28c
radv: don't emit event code on video queues.
...
I don't know if these can be done properly, but for now just don't
emit the standard cp stuff since it hangs the GPU.
"Fixes" dEQP-VK.video.synchronizat*
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25170 >
2023-09-12 21:42:28 +00:00
Hans-Kristian Arntzen
85192dcfc6
wsi/x11: Don't allow signal_present_id to rewind.
...
If present ID is 0, we should consider it to be ignored.
Avoids a theoretical problem when using IMMEDIATE mode with present ID
where some images don't set present ID.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25178 >
2023-09-12 19:46:56 +00:00
Hans-Kristian Arntzen
08fee190aa
wsi/x11: Fix potential deadlock in present ID.
...
If we observe IDLE before COMPLETE, another queued image may have
presented with present ID 0 which would break the check fixed in this
commit. The original fix for present_id / signal_present_id split
forgot to take this into account.
Fixes: 32f7ff2c20 ("Fix present ID signal when IDLE comes before
COMPLETE").
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25178 >
2023-09-12 19:46:56 +00:00
Yiwei Zhang
da16a76fe7
venus: fix a device memory report leak
...
Fixes: f70a08bc60 ("venus: handle device memory report requests")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25176 >
2023-09-12 19:28:46 +00:00
Rohan Garg
9eba1d9187
intel/genxml: update PIPE_CONTROL instruction for dg2
...
Signed-off-by: Rohan Garg <rohan.garg@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25124 >
2023-09-12 19:04:24 +00:00
Leo Liu
8c8985390d
Revert "frontends/va: Also map VAImageBufferType for reading"
...
This reverts commit 12a4f2c132 .
With PIPE_MAP_READ_WRITE and derived image, the encoder will copy
to and from staging buffer for each frame, which caused performance
degradation, even worse than putImage.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25128 >
2023-09-12 18:40:30 +00:00
Illia Polishchuk
b8a54c50a6
nir: fix invalid sampler search by texture id
...
Sampler id cannot be mapped to a uniform object location
Fixes: 1a8dd84ec6 ("nir: Propagate the type sampler type change to the used variable.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9793
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Signed-off-by: Illia Polishchuk <illia.a.polishchuk@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25145 >
2023-09-12 15:44:52 +00:00
Illia Polishchuk
5a7044d0bc
zink: move find_sampler_var from zink to nir core
...
Avoid code duplication because it need to be used in following commits
Fixes: 1a8dd84ec6 ("nir: Propagate the type sampler type change to the used variable.")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Signed-off-by: Illia Polishchuk <illia.a.polishchuk@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25145 >
2023-09-12 15:44:52 +00:00
Corentin Noël
010147cd64
llvmpipe: make sure to initialize the lp_setup_context slots with the default values
...
As 0 is an actual valid value, this can lead to issues when we actually want to use them.
This fixes `spec@arb_cull_distance@basic-cull-3` crashes for instance.
Cc: mesa-stable
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25152 >
2023-09-12 15:17:39 +00:00
Rhys Perry
f9b341cbf4
radv: use shortcut_1d_workgroup_id
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24882 >
2023-09-12 14:31:07 +00:00
Rhys Perry
2965a9d510
radv: optimize mesh workgroup ID using ts_mesh_dispatch_dimensions
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24882 >
2023-09-12 14:31:07 +00:00
Rhys Perry
81d17246ec
nir/lower_system_values change num_workgroups to uint32_t
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24882 >
2023-09-12 14:31:07 +00:00
Mike Blumenkrantz
b3b58b91f4
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25180 >
2023-09-12 13:53:32 +00:00
Mike Blumenkrantz
5f73b8976b
aux/tc: fix address calc for segmented texture subdata
...
this fixes all dimension/array uses for the rp tracking path
Fixes: 51ad269198 ("aux/tc: handle stride mismatch during rp-optimized subdata")
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25180 >
2023-09-12 13:53:32 +00:00
Mike Blumenkrantz
b6bc1f85f4
aux/tc: fix staging buffer sizing for texture_subdata
...
this is the size of the src data, not the dst data
Fixes: 51ad269198 ("aux/tc: handle stride mismatch during rp-optimized subdata")
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25180 >
2023-09-12 13:53:31 +00:00
Iago Toral Quiroga
64b49fb501
v3dv: don't assume that bound descriptors have been written
...
The pipeline layout lifetime tests in CTS allocate some descriptors
and bind them to the command buffer without actually ever writing
valid resources to them since they never actually execute the command
buffers, so we want to be careful at bind time and not assume the
resources exist.
Fixes crashes in dEQP-VK.api.pipeline.pipeline_layout.lifetime.*
Fixes: 95f881adbd ('v3dv: add support for sampling simple 2D linear textures')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25172 >
2023-09-12 11:42:58 +00:00
Martin Roukala (né Peres)
9d2bad8b37
zink/ci: document more flakes seen on vangogh
...
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25107 >
2023-09-12 11:15:56 +00:00
Martin Roukala (né Peres)
13161f4adb
zink/ci: automatically reboot when hitting a kernel BUG on vangogh
...
By rebooting immediately after hitting "BUG", we'll re-try immediately
running the job without first needing to hit the 30 minutes timeout.
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25107 >
2023-09-12 11:15:55 +00:00
Samuel Pitoiset
2cc981a0cd
radv: fix capturing RGP on RDNA3 with more than one Shader Engine
...
PKT3_RESET_FILTER_CAM_S seems required on GFX11. Otherwise, capturing
with more than on SE can hang.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25156 >
2023-09-12 08:38:39 +00:00
Samuel Pitoiset
6caae898dd
radv: fix emitting SQTT userdata when CAM is needed
...
The third parameter of PKT3 is the predicate bit and this was wrong.
PAL sets the RESET_FILTER_CAM bit when emitting SQTT userdata.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25158 >
2023-09-12 07:07:10 +00:00
Iván Briano
23f9e89fce
anv: enable VK_EXT_mesh_shader where supported
...
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25047 >
2023-09-12 02:51:31 +00:00
Iván Briano
4eddeea7bf
intel/fs: handle URB setup for fast linked mesh pipelines
...
Up until now, the mesh pipeline assumed it would be always linked to the
fragment shader, and so the calculated MUE map would always be
available.
That is not the case for fast linked pipeline libraries, so the URB
setup needs to account for this. We do this by replicating what's done
for non-mesh pipelines, defining the URB based on the FS inputs, and
always assuming they will be laid out in order of varying number, except
that we also account for per-primitive attributes.
Fixes all GPL using tests under dEQP-VK.mesh_shader.ext.smoke.*
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25047 >
2023-09-12 02:51:31 +00:00
Iván Briano
17d7f7a292
intel/fs: read viewport and layer from the FS payload
...
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25047 >
2023-09-12 02:51:31 +00:00
Iván Briano
d36da7c5f8
anv: track what kind of pipeline a fragment shader may be used with
...
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25047 >
2023-09-12 02:51:31 +00:00
Iván Briano
b200e5765c
anv: use a simpler MUE layout for fast linked libraries
...
The compaction introduced in a252123363 ("intel/compiler/mesh: compactify MUE layout")
is not suitable for the case where graphics pipeline libraries are fast
linked, as the fragment shader won't receive the mue_map to know where
to locate its inputs.
For that case, keep doing what we did before and lay things down in the
order varyings are defined, which is also how it works for the non-mesh
case.
Fixes dEQP-VK.fragment_shading_rate.*fast_linked_library*.ms
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25047 >
2023-09-12 02:51:31 +00:00
Iván Briano
bcde58ea86
blorp: fix hangs with mesh enabled
...
Move mesh URB allocations together with the other stages.
This fixes a hang that started happening with mesh enabled after
419531c5d9 ("intel/blorp: add a new flag to communicate PSS sync need")
Bspec 45352 says:
L3 Space allocation can only be changed when the GPU pipeline is
completely flushed.
It's likely that the PIPE_CONTROL added in that commit was breaking that
assumption and the URB allocation happening afterwards at the end of the
pipeline emission would then hang. And before that, we were probably
just getting lucky.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25047 >
2023-09-12 02:51:31 +00:00
Dave Airlie
4dbc55818c
llvmpipe: enable driver functions.
...
This enables driver functions for the CL paths.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
4ecd471ee3
llvmpipe/cs: add support for function calls.
...
This adds (disabled) support for function calls to the compute shader.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
3704f158a2
gallivm: add support for function calling
...
This adds support for calling functions in compute shaders.
Functions are passed two implicit arguments
- the current exec mask
- a context containing all the info needed for intrinsics to work
when not in the toplevel.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
14a6668964
rusticl: use cleanup funcs
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
18ca6c37f0
nir: add a function usage tracker
...
allows dropping old fns
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
f5bf4657fb
nir: add driver_functions option to avoid inlining.
...
This adds a driver control to instruct NIR to not inline
all functions.
It adds a very simple inlining heuristic that works for
what I've played with, but will probably need to grow some
better ideas.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
8a95b43880
spirv/nir: parse function control and store in nir.
...
This just lets the nir access the inline/dont inline attributes
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
b8e93abd11
gallivm: rework translator to allow per-impl work.
...
This allows a function implementation to be targetted, this will
only be used by the compute shader paths, so keep a compat path
for all the others.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
3cd20feed0
gallivm/nir: split prepasses out to make per-function work easier.
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
a74e98547c
nir: don't inline linked functions
...
Don't inline linked functions here, let nir_inline_functions do the job
when we get to it.
Instead just copy over the implementation and any other pieces need.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
8f982a7fd9
nir: add nir function clone
...
this just refactors the existing functionality so we can use it elsewhere.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
5dea1ac64c
nir/functions: move linker pass to new helper
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
b1a12cf3a8
nir/functions: put link state into a struct
...
this will make it easier to convert to new pass.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
4af6061fe5
nir/functions: use helper to get function for a name.
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
bfe152916c
nir: move the libclc lowering over to functions file.
...
This lowering is pretty generic, and I want to enhance it for
times when we don't want to inline.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
e6bfe7c501
nir: use nir_function_instructions_pass in the inliner.
...
This moves the current inliner to use the pass.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
5f568625fa
nir: rename nir_inline_functions.c to nir_functions.c
...
I'm going to add code for non-inline purposes but related to
functions.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Alyssa Rosenzweig
97557ebfa2
nir: Add nir_function_instructions_pass helper
...
Extract the logic. Convenience for working with real functions.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Dave Airlie
93bb08d1f7
nir: use a _clone so users calling their variable clone don't get a warning
...
I've got code using clone name and it gets confused.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24687 >
2023-09-12 01:57:50 +00:00
Emma Anholt
6417f1021a
ci/freedreno: Add another excessive-constlen UBO skip.
...
Causes flakes in other tests.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24624 >
2023-09-12 01:18:07 +00:00
Collabora's Gfx CI Team
52343ac668
Uprev Piglit to f7db20b03de6896d013826c0a731bc4417c1a5a0
...
ed58dfbd12...f7db20b03d
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24624 >
2023-09-12 01:18:07 +00:00