Commit graph

211441 commits

Author SHA1 Message Date
Caio Oliveira
4e253184de brw: Run validation as soon as we have the CFG around
Fixes: affa7567c2 ("intel/brw: Add phases to backend")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37148>
2025-09-03 20:42:05 +00:00
Mike Blumenkrantz
28c2c0fedc mesa/varray: inline a bunch of functions
this cuts the cpu time of update_array() in viewperf catia by 80%

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37142>
2025-09-03 20:10:53 +00:00
Mike Blumenkrantz
7984a16e27 tc: don't unset resolve resource in set_framebuffer_state
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this breaks the whole mechanism

Fixes: 2eb45daa9c ("gallium: de-pointerize pipe_surface")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37166>
2025-09-03 19:42:52 +00:00
Eric R. Smith
e3552c427e panfrost: fix debug print of spilled registers
We were testing some conditions in the wrong order, so spilled
registers were being printed as if they were uniforms. This is
incorrect, but only subtly so, and lead to confusion.

Fixes: 6c64ad934f ("panfrost: spill registers in SSA form")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37092>
2025-09-03 16:19:42 -03:00
Eric R. Smith
d482b6ca68 panfrost: fix typo in register allocation
The intention of the code was to allow PHI values to be propagated
if they were in registers (as opposed to in memory). As written though
values were never propagated. I think this typo was due to some
debug code that wasn't removed properly.

Fixes: 6c64ad934f ("panfrost: spill registers in SSA form")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37092>
2025-09-03 16:19:29 -03:00
Mary Guillemard
fac8c9def0 pan/bi: Reintroduce bi_fuse_small_int_to_f32 on v11+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
On v11+, all small integers instruction variants are gone, however we
can now use widen on src0 just fine.

That mean we can get ride of mid conversion by relying on swizzle
instead while respecting signess of the inner instruction.

This helps a little bit on clpeak with panvk+clvk, shader-db is also
happy:

Totals:
Instrs: 109541 -> 109354 (-0.17%)
CodeSize: 1110528 -> 1108864 (-0.15%)
Estimated normalized CVT cycles: 667.609375 -> 664.5625 (-0.46%)

Totals from 17 (2.12% of 803) affected shaders:
Instrs: 13637 -> 13450 (-1.37%)
CodeSize: 112256 -> 110592 (-1.48%)
Estimated normalized CVT cycles: 100.203125 -> 97.15625 (-3.04%)

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37125>
2025-09-03 17:32:02 +00:00
Yiwei Zhang
611749a7f9 nvk: bind aliased wsi image at memory offset zero
This aligns with common wsi, and also obeys dedicated alloc requirement.

Fixes: 273df23a21 ("nvk: adopt wsi_common_get_memory")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37152>
2025-09-03 16:29:34 +00:00
Yiwei Zhang
94d8a4a465 radv: bind aliased wsi image at memory offset zero
This aligns with common wsi, and also obeys dedicated alloc requirement.

Fixes: 825c05a7e8 ("radv: adopt wsi_common_get_memory")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37152>
2025-09-03 16:29:34 +00:00
Danylo Piliaiev
902cebc9f0 tu: Prevent dangling start_sysmem_clear_all tracepoint
We may exit early from tu_clear_sysmem_attachments without end_
tracepoint. Move the start_ tracepoint to fix that.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37162>
2025-09-03 16:00:56 +00:00
Danylo Piliaiev
482e0d0d1e tu: Reset rp_trace on tu_reset_cmd_buffer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Secondary command buffers with RENDER_PASS_CONTINUE_BIT don't reset
rp_trace, and without reset we get garbage tracepoints.

Fixes garbage sysmem_clear_all tracepoints in some games running
though DXVK.

Fixes: 630380349b ("tu: Give renderpass events a separate trace buffer")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37161>
2025-09-03 15:42:11 +00:00
Erik Faye-Lund
12e36c8871 panvk: expose missed vulkan 1.4 properties
AFAICT, we support these. So let's expose the properties here!

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37136>
2025-09-03 15:02:15 +00:00
Erik Faye-Lund
9da4eb4a4e panvk: explicitly list unsupported features
We already do this many places, let's add the missing ones for the core
Vulkan versions.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37136>
2025-09-03 15:02:15 +00:00
Erik Faye-Lund
2f79a3a81d panvk: clean up limits and properties
Similar to what we do for features here, let's group things a bit more
consistently.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37136>
2025-09-03 15:02:14 +00:00
Erik Faye-Lund
bb26502c77 panvk: clean up feature-bits
The feature bits have been added a bit willy-nilly, let's clean that up
a bit.

The general structure here is that if something is part of a specific
Vulkan version, we list the feature under there in the order they are
defined in the version-specific structure. If not, we list it under
an extension. Clean up so each version is in it's own block.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37136>
2025-09-03 15:02:14 +00:00
Erik Faye-Lund
166d650c10 panvk: fix up vk1.4 properties
These two properties reports how the interaction between MSAA coverage
and occlusion queries works. We need to report the correct value here,
otherwise applications might misbehave.

Fixes: 5ee3c10d1e ("panvk: advertise vulkan 1.4 on v10+")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37136>
2025-09-03 15:02:13 +00:00
David Rosca
ac896c0327 util/format: Add RGB lowering for single plane YUV formats
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This fixes a regression with Y8_400 format, which needs to return
R8 as plane format.

Fixes: 5e01ec4bd0 ("util/format: Auto-generate a bunch of YUV helpers")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37056>
2025-09-03 12:51:23 +00:00
Eric Engestrom
cb1c059138 docs: add sha sum for 25.2.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37160>
2025-09-03 12:46:21 +00:00
Eric Engestrom
84a4d34666 docs: add release notes for 25.2.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37160>
2025-09-03 12:46:21 +00:00
Eric Engestrom
97f7aa7725 docs: update calendar for 25.2.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37160>
2025-09-03 12:46:21 +00:00
Rhys Perry
7f5c84d7ac radv: fix shift overflow in radv_pipeline_init_dynamic_state
Fixes UBSan error with thewitness/005aa77325a11410:
runtime error: left shift of 15 by 28 places cannot be represented in type 'int'

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37055>
2025-09-03 11:47:00 +00:00
Rhys Perry
1105f7b98f aco: fix signed integer overflow
Fix UBSan error:
runtime error: signed integer overflow: 2147483647 + 32 cannot be represented in type 'int'

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37055>
2025-09-03 11:47:00 +00:00
Rhys Perry
20705e89e9 drm-shim: fix with asan
It seems GCC+AddressSanitizer calls open and readlink after
destroy_shim(), so those need to still work.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37055>
2025-09-03 11:47:00 +00:00
Rhys Perry
858386da06 drm-shim: use atomics for inited
This is more thread safe.

This is still broken, because another thread could use the global
variables after inited is set but before the shim is fully initialized,
but I guess it's better than before.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37055>
2025-09-03 11:46:59 +00:00
Yiwei Zhang
c0e51bcf24 anv: fix broken utrace
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The non-compute end flag should be INTEL_DS_TRACEPOINT_FLAG_END_OF_PIPE.
This fixes the broken anv utrace for anything non-compute that can
potentially overlap (execute in parallel).

Fixes: 6281b207db ("anv: add tracepoints timestamp mode for empty dispatches")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37155>
2025-09-03 08:12:28 +00:00
Trigger Huang
5736280730 virtio/vdrm: add ENABLE_DRM_AMDGPU for c_args
ENABLE_DRM_AMDGPU must be defined when amdgpu_virtio is enabled;
otherwise, vdrm and amdgpu_virtio will have different definitions of
struct virgl_renderer_capset_drm. As a result, on amdgpu_virtio side,
the content of struct vdrm_device will be corrupted.

Thanks Honglei Huang <honglei1.huang@amd.com> for pointing out the
different definitions of struct virgl_renderer_capset_drm.

Cc: mesa-stable
Signed-off-by: Trigger Huang <Trigger.Huang@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37023>
2025-09-03 07:47:18 +00:00
Samuel Pitoiset
6bc70a0e8f radv/ci: remove RADV_DEBUG=novideo for radv-gfx1201-vkcts
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37134>
2025-09-03 07:19:55 +00:00
Calder Young
a8e64e83c2 anv: Update video test expectations for layered_dpb
Remove all layered_dpb fails that have a passing separated_dpb equivalent

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35651>
2025-09-03 06:41:44 +00:00
Calder Young
0b911356e5 anv: Report disjoint images as unsupported for video usage
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35651>
2025-09-03 06:41:44 +00:00
Calder Young
9bbb68a817 anv: Add support for using layered surfaces in VP9 video decoding
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35651>
2025-09-03 06:41:44 +00:00
Calder Young
d0bf3a96f6 anv: Add support for using layered surfaces in AV1 video decoding
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35651>
2025-09-03 06:41:44 +00:00
Calder Young
30b763f6e2 anv: Add support for using layered surfaces in H.264 and H.265 video coding
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35651>
2025-09-03 06:41:44 +00:00
Calder Young
3fb25cc78a anv: Add support for creating layered surfaces for video encode/decode
Layered surfaces (array textures) with video encode/decode usage bits
will have their slices aligned to make them addressable to the media
engine. Multi-planar layered surfaces will be stored with their slices
interleaved so that a relative offset can be programmed between the
gamma and chroma slices.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35651>
2025-09-03 06:41:44 +00:00
Calder Young
73608eb8b7 isl: Add support for creating layered surfaces for video encode/decode
Adds support for creating layered surfaces with slices that are addressable
to the media engine for video encoding and decoding.

Co-authored-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35651>
2025-09-03 06:41:44 +00:00
Samuel Pitoiset
3cb77cb144 radv/rt: fix a potential issue with RADV_PERFTEST=dmashaders
Shaders must be synchronized before doing anything.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37126>
2025-09-03 06:16:14 +00:00
Samuel Pitoiset
decf9af472 radv/rt: only use one user SGPR for the traversal shader addr
All shaders are allocated in the 32-bit addr space. To avoid an issue
with alignment, and also for future work, there is an unused user SGPR.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37133>
2025-09-03 05:53:41 +00:00
Qiang Yu
17647e8eeb gallium/noop: add mesh shader callbacks
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
b366f14b51 mesa: program pipeline support mesh shader
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
d4a71d5367 mesa: not fail the assert when detach mesh shader
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
2ca3ad3ca2 mesa/st: convert mesh shader to gl stages
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
6b52b371df gallium/trace: dump mesh shader queries
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
51d6e4404a mesa: allow NULL for vertex shader when mesh pipeline
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
3bc4004ca9 gallium/ddebug: support mesh shader
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
e1bd743c3a gallium/u_blitter: save mesh shader
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
5e35be338c gallium: threaded context support mesh shader
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
f03e49c609 mesa,gallium: handle mesh shader create and delete
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
39d2bf5e68 mesa: implement mesh shader draw calls
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
e8a817f196 mesa: handle mesh shader in state management
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
a47c70ce42 mesa: add mesh shader states
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:17 +08:00
Qiang Yu
6459dacb8b gallium: cso context support mesh shader
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:16 +08:00
Qiang Yu
bbd97a59c0 mesa: use bitset for driver states tracker
We are going to add 16 mesh shader states, but existing
states run out of all bits of uint64_t. So use bitset to
extend the capacity.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36976>
2025-09-03 10:21:16 +08:00