Commit graph

221307 commits

Author SHA1 Message Date
Thong Thai
5e6a6e4e14 amd: make ac_ib_parser an amd tool build option
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Only build ac_ib_parser when "amd" is specified as a tool build option.
ac_ib_parser is used with radeonsi and RADV.

Also re-arrange the choices in the "tools" build option so that it is
alphabetical.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40493>
2026-04-17 09:40:13 +00:00
Thong Thai
5bf30149ec radeonsi: move si_get video functions to si_video
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40493>
2026-04-17 09:40:13 +00:00
Thong Thai
4cbb20c59c frontends/va: decode only stubs
Stub VA functions to allow for code for different encode/decode codecs
to be excluded from the build, along with for allowing to build without
shader code.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40493>
2026-04-17 09:40:13 +00:00
Thong Thai
92fd45381e meson: check if video encoding support is to be built
This commit adds a variable `with_encode` and sets it to true if any
"encode" video codec is enabled through the `video-codecs` build option.
This allows for video encoding related code to be included/excluded from
the build.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40493>
2026-04-17 09:40:13 +00:00
Thong Thai
c8aaa8b902 meson: update default build option for libva subproject
Add c_std=none as a default build option for when building libva as a
subproject, otherwise it will complain with messages such as:

../va/va_compat.h:90:9: error: expected declaration specifiers or '...' before string constant
   90 |     asm(".symver " #func "_" #major "_" #minor "_" #micro ", "

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40493>
2026-04-17 09:40:13 +00:00
Thong Thai
e9fe2aeba2 util: allow for overriding u_stub tail
This commit allows for overriding the normal u_stub's TAIL
implementation (returning -1) with a custom implementation, allowing for
different TAIL implementations to be added without having to create a
new TAIL+ in u_stub.h.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40493>
2026-04-17 09:40:13 +00:00
Thong Thai
f9df50eb31 util: move u_stub to src/util, add u_stub_gfx_compute.h
Move u_stub.h from amd/common, to util, so that it can be used in more
places.

Also, rename u_stub's PROC to MESAPROC, as it conflicts with the PROC
keyword and create a new TAILZ which returns 0.

Add u_stub_gfx_compute.h so that the following:

...can be a single-line:

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40493>
2026-04-17 09:40:13 +00:00
Karmjit Mahil
c36e3ce934 freedreno/decode: Fix error() in script.c
Previously the error() would just print `f' instead of indicating
the function where the error occurred.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40995>
2026-04-17 09:16:34 +00:00
Karmjit Mahil
ce6ed3da8b freedreno/decode,ir3: Mark decoded dwords as const
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40995>
2026-04-17 09:16:34 +00:00
Samuel Pitoiset
3eb6798089 radv/ci: document some HIC failures since addrlib uprev for GFX11.7
This new addrlib bump contains AVX2 code for optimized host image
copies but it introduced few regressions on navi1x. The AMD developer
who implemented it is aware of the issue and a fix should be provided
soon.

Let's document the regressions to unblock HIC for navi2x+ in the mean
time because it greatly improves performance and it's useable in
production now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40958>
2026-04-17 10:19:24 +02:00
Ganesh Belgur Ramachandra
d778ede72c amd: import gfx11.7 addrlib
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40958>
2026-04-17 09:47:10 +02:00
Mauro Rossi
dfca417db8 radv: Fix gnu-empty-initializer errors in 8c10eab1
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes the following building errors:

../src/amd/vulkan/radv_rra.c:1369:43: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
      struct radv_bvh_stats_gfx12 stats = {};
                                          ^
../src/amd/vulkan/radv_rra.c:1376:45: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
      struct radv_bvh_stats_gfx10_3 stats = {};
                                            ^
2 errors generated.

Fixes: 8c10eab1 ("radv: Add an option for dumping BVH stats")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41011>
2026-04-17 07:09:51 +00:00
Mauro Rossi
46d396d9d8 radv: Fix gnu-empty-initializer errors in 480a94fb
Fixes the following building errors:

../src/amd/vulkan/radv_shader.c:3460:42: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
   struct radv_shader_debug_info debug = {};
                                         ^
1 error generated.

../src/amd/vulkan/radv_shader_args.c:975:43: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
   struct user_sgpr_info user_sgpr_info = {};
                                          ^
1 error generated.

Fixes: 480a94fb ("radv: Gather debug info about shader args")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41011>
2026-04-17 07:09:51 +00:00
Georg Lehmann
cc212f6beb radv: remove radv_graphics_shaders_link
Only one actual linking step remains, so simplify the call.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40982>
2026-04-17 06:46:30 +00:00
Georg Lehmann
ae2213fa6d radv: export multi view index as layer after lowering io
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40982>
2026-04-17 06:46:30 +00:00
Georg Lehmann
8e74c0020e radv: remove draw_id from mesh shader a bit later
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40982>
2026-04-17 06:46:29 +00:00
Georg Lehmann
f85767a035 radv: never call nir_assign_io_var_locations
The comment is outdated and this info is never used.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40982>
2026-04-17 06:46:29 +00:00
Georg Lehmann
97c7e4b41f radv: remove unused vs/tes num_outputs from shader info
Supposedly used for ngg xfb, but apparently unused.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40982>
2026-04-17 06:46:28 +00:00
Georg Lehmann
1dd9c57233 radv: move fs view_index handling after lowering io
And update the comment to reflect that we now use a sysval to load
the layer id.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40982>
2026-04-17 06:46:28 +00:00
Georg Lehmann
2a5823c988 radv: move per-primitive fixup closer to radv_nir_lower_io
Ideally this would be in radv_nir_lower_io, but we need the information
about the previous stage.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40982>
2026-04-17 06:46:28 +00:00
Dhruv Mark Collins
78e2bbc70f tu/query_pool: Avoid CP counter conflict with autotune
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
With autotune allocating counters low-to-high, the conflict with
PERFORMANCE_QUERY_KHR will happen if any CP-based counters are
used. This is a temporary workaround which just drops the first
two CP counters from being usable for performance queries.

Cc: mesa-stable
Signed-off-by: Dhruv Mark Collins <mark@igalia.com>
Assisted-by: OpenAI Codex (GPT-5.4)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40949>
2026-04-16 21:59:35 +00:00
Dhruv Mark Collins
f78541b765 tu/autotune: Allocate performance counters from low-to-high
This is more consistent with the newly established pattern of the
UMD allocating all locally used performance counters low-to-high
instead of the prior high-to-low order.

Cc: mesa-stable
Signed-off-by: Dhruv Mark Collins <mark@igalia.com>
Assisted-by: OpenAI Codex (GPT-5.4)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40949>
2026-04-16 21:59:35 +00:00
Dhruv Mark Collins
24849eef9f fd/pps: Allocate performance counters from high-to-low
The UMD will be switching to allocating counters from low-to-high,
so to avoid the chances of conflict with this new policy the PPS
driver now allocates the other way around. Additionally, this will
future proof it for the MSM-DRM uAPI for performance counters which
will similarly allocate from high-to-low.

Cc: mesa-stable
Signed-off-by: Dhruv Mark Collins <mark@igalia.com>
Assisted-by: OpenAI Codex (GPT-5.4)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40949>
2026-04-16 21:59:35 +00:00
Dhruv Mark Collins
a5ec9b7892 tu/autotune: Fail gracefully when CP counters are unavailable
When preemption optimization is supported then the necessary CP
counters being missing causes a device initialization error which
is unnecessary as support can simply be disabled instead to allow
for a more graceful fail. This also fixes A8XX which doesn't have
performance counters hooked up yet.

Cc: mesa-stable
Signed-off-by: Dhruv Mark Collins <mark@igalia.com>
Assisted-by: OpenAI Codex (GPT-5.4)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40949>
2026-04-16 21:59:35 +00:00
Zan Dobersek
c2708afbc7 tu: only support userspace-managed perfcounters on a7xx and earlier
Future kernel API for perfcounter management will likely be required for
a8xx and onwards. For a7xx and earlier, cmdstream-based selector and
counter register management is still supported.

Cc: mesa-stable
Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40949>
2026-04-16 21:59:35 +00:00
Aleksi Sapon
712a4e5691 llvmpipe: fix overflow in rasterizer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39498>
2026-04-16 19:36:28 +00:00
Aleksi Sapon
0326051618 llvmpipe: remove unused SSE rasterization code
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39498>
2026-04-16 19:36:28 +00:00
Georg Lehmann
ae8f83d465 radv: allow input attachment to use pixel coord optimization
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The vectorized f2i32 would block nir_opt_frag_coord_to_pixel_coord.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40985>
2026-04-16 14:54:49 +00:00
Alyssa Rosenzweig
4b81cb6206 nir/opt_generate_bfi: avoid trivial instructions
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
With the pass order shuffling, code like `(x & 0xf) + (x & 0xfffffff0)` gets
optimized to bitfield_select(0xF, x, x). But it would be much better to optimize
simply to x. nir_opt_algebraic would do that for us but we run this pass too
late for algebraic to save us from ourselves, so be smarter.

Observed on dEQP-GLES31.functional.compute.basic.image_atomic_op_local_size_8
with Jay, this saves an instruction there.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40956>
2026-04-16 13:54:41 +00:00
Erik Faye-Lund
f137207108 panvk: drop out-of-date TODO
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We already did this, so let's drop this TODO.

Fixes: d36e6af329 ("panvk: Bump the max image size on v11+")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40990>
2026-04-16 11:21:48 +00:00
Georg Lehmann
f949e3b819 nir: remove nir_link_xfb_varyings
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
RADV was the last user.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40977>
2026-04-16 08:49:23 +00:00
Michel Dänzer
228ec8c72a mr-label-maker: Label src/gallium/winsys/radeon as r300, r600 & radeonsi
The radeon winsys is used by these 3 drivers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40975>
2026-04-16 08:44:06 +00:00
Michel Dänzer
97e117e73c mr-label-maker: Label src/gallium/winsys/amdgpu as radeonsi
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40975>
2026-04-16 08:44:05 +00:00
Michel Dänzer
5cc3264b53 winsys/amdgpu: Use render node only as fallback
If ac_drm_device_initialize returns -EACCES for the fd passed in.

A render node file description can't have DRM master status, which means
AMDGPU_CTX_PRIORITY_HIGH can't work without CAP_SYS_NICE (which
generally only the root user has).

Fixes: 8f30e90fc1 ("winsys/amdgpu: Prefer render node FD for ac_drm_device_initialize")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40974>
2026-04-16 08:26:35 +00:00
Juan A. Suarez Romero
69708ff3f5 v3d: mark mapped BO as initialized for valgrind
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When we unsychronized map a BO, we tell Valgrind that the content is not
initialized yet.

But we forgot to mark it as defined when the map finishes, which leads to
several conditional jump or move depends on uninitialised value(s)
warnings when using Valgrind.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40964>
2026-04-16 07:55:39 +00:00
Samuel Pitoiset
477c44ba93 radv: lower SHADER_RECORD_INDEX to non-uniform
This fixes an issue with RADV and NVIDIA-RTX/Donut-Samples with heap
support in vkd3d-proton.

Backport-to: 26.1
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40953>
2026-04-16 08:21:37 +02:00
Samuel Pitoiset
8e2869fa41 vulkan: add an option to lower SHADER_RECORD_INDEX to non-uniform
Applications are required to set NonUniform if the resource is arrayed,
but with VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT,
the resource is non-arrayed in the shader. So, it's technically not
required to set it. Although, the offset can vary per-lane and
NonUniform is implicit.

Backport-to: 26.1
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40953>
2026-04-16 08:21:28 +02:00
Connor Abbott
49d29d4f10 ir3: Use correct immediate size for constlen calculation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
"size" is the allocated size of the array, not the number of immediates
actually used. We could wind up returning a too-large constlen, larger
than 512, and since the binning variant uses the non-binning variant's
constlen as it's max_const we could make binning variants use c512.x and
crash when encoding.

Fixes: 86f3c0c4c2 ("ir3: simplify constlen calculation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40961>
2026-04-16 05:40:14 +00:00
Connor Abbott
280c64d720 ir3: Don't reset immediate count to 0 after lowering
We need to know the immediate count even after lowering, to compute the
overall const size. Previously we were using the capacity field, but
that's unreliable and won't be available once we switch to a real
dynamic array container instead of (poorly) reinventing one.

Fixes: 86f3c0c4c2 ("ir3: simplify constlen calculation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40961>
2026-04-16 05:40:14 +00:00
Sagar Ghuge
19d64d6f7d anv/rt: Copy 16bytes at once instead of copying 8bytes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
For simple copy, we can copy data with uvec4(16bytes) at once.
When we have serialize/deserialize copy mode, we want to copy out the
instance leave address which are 8byte wide, so we need to jump with
8byte stride instead of 16bytes.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40966>
2026-04-16 02:52:03 +00:00
Lishin
81feb2e7f1 mesa/st: relax shader_has_one_variant checks for GLES2
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
GLES2/3 doesn't expose alpha test, user clip planes, or two-sided color.
These lowers therefore shouldn't disable the one-variant fast path for GLES2/3 contexts.

Keep the lowering itself unchanged and only relax the shader_has_one_variant checks.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40905>
2026-04-15 21:39:50 +00:00
Christian Gmeiner
62efee1860 mesa/st: Convert st_cb_texture to use st_context_invalidate_state
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Replace CSO save/restore of atom-backed states with
st_context_invalidate_state() for both PBO upload and download
paths. Only stream outputs, render condition, and pause queries
(no atoms) still use CSO save/restore.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40592>
2026-04-15 21:08:44 +00:00
Christian Gmeiner
d3b3bb69de mesa/st: Convert st_cb_readpixels to use st_context_invalidate_state
Replace CSO save/restore of atom-backed states with
st_context_invalidate_state(). Only stream outputs, render
condition, and pause queries (no atoms) still use CSO save/restore.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40592>
2026-04-15 21:08:44 +00:00
Christian Gmeiner
4c2d41ddf3 mesa/st: Convert st_cb_drawpixels to use st_context_invalidate_state
Replace CSO save/restore of atom-backed states with
st_context_invalidate_state(). The conditional DSA/blend
invalidation for stencil writes is preserved. Only stream
outputs (no atom) still use CSO save/restore.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40592>
2026-04-15 21:08:44 +00:00
Christian Gmeiner
04f735c5a7 mesa/st: Convert st_cb_clear to use st_context_invalidate_state
Replace CSO save/restore of atom-backed states with
st_context_invalidate_state(). Only stream outputs and pause
queries (no atoms) still use CSO save/restore.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40592>
2026-04-15 21:08:44 +00:00
Christian Gmeiner
8c13b4e097 mesa/st: Convert st_cb_bitmap to use st_context_invalidate_state
Replace CSO save/restore of atom-backed states with
st_context_invalidate_state(). Only stream outputs (no atom)
still use CSO save/restore.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40592>
2026-04-15 21:08:44 +00:00
Christian Gmeiner
4852fa32c1 mesa/st: Convert st_cb_drawtex to use st_context_invalidate_state
Replace CSO save/restore of atom-backed states with
st_context_invalidate_state(). Only stream outputs (no atom)
still use CSO save/restore.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40592>
2026-04-15 21:08:44 +00:00
Christian Gmeiner
5d8b900369 mesa/st: Extend st_context_invalidate_state with meta-op flags
Add ST_INVALIDATE_* flags for all states that meta-operations
(bitmap, clear, drawpixels, etc.) modify behind the state tracker's
back. This enables meta-ops to use st_context_invalidate_state()
instead of CSO save/restore for state re-derivation.

The atoms already know how to re-derive Gallium state from GL context,
so marking states dirty via st_context_invalidate_state() is
sufficient - st_validate_state() will call the atoms before the next
draw.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40592>
2026-04-15 21:08:44 +00:00
Marek Olšák
c4bd6bd590 radeonsi: just get si_shader_info::num_inputs from NIR
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:12 +00:00
Marek Olšák
f249c297b2 radeonsi: set num_vs_inputs from nir->num_inputs and use it more
Acked-by: Pierre-Eric
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
2026-04-15 18:12:12 +00:00