Commit graph

208156 commits

Author SHA1 Message Date
Daniel Schürmann
2c51a8870d nir: add nir_vectorize_cb callback parameter to nir_lower_phis_to_scalar()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Similar to nir_lower_alu_width(), the callback can return the
desired number of components for a phi, or 0 for no lowering.

The previous behavior of nir_lower_phis_to_scalar() with lower_all=true
can be elicited via nir_lower_all_phis_to_scalar() while the previous
behavior with lower_all=false now corresponds to nir_lower_phis_to_scalar()
with NULL callback.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35783>
2025-07-08 15:33:59 +00:00
Daniel Schürmann
23b7b3b919 nir/lower_phis_to_scalar: remove exec_list dead_instrs
No need to free the instructions at this point.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35783>
2025-07-08 15:33:59 +00:00
Daniel Schürmann
f6e0f4813c nir: remove recursive check in nir_lower_phis_to_scalar()
This check causes unnecessary overhead and can be replaced by simply
checking whether a phi_src is from a loop continue block.
Except for rare edge cases, the result will be the same.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35783>
2025-07-08 15:33:59 +00:00
Corentin Noël
8c96b9b9c7 virgl: Add more Gallium formats to the list
Include the recently added formats.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35908>
2025-07-08 15:14:37 +00:00
Pohsiang (John) Hsu
5c1f45a21b mediafoundation: fix cropping flag when using software sample
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35981>
2025-07-08 14:50:29 +00:00
Pohsiang (John) Hsu
42674c0df1 mediafoundation: make file version the same as product version, and increment version to 1.0.6
for 1.0.5 release, File version was showing 1.0.0.0 and Production version was showing 1.0.5.0.
now both show 1.0.6.0.

Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35981>
2025-07-08 14:50:28 +00:00
Valentine Burley
fd073bc1c3 zink/ci: Update restricted trace checksums
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These changed with b61e6b9748 ("zink: enable ioopt by default").

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36003>
2025-07-08 14:34:42 +00:00
Marek Olšák
656675a490 nir: change nir_lower_mem_access_bit_sizes to an intrinsics pass
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35999>
2025-07-08 14:01:56 +00:00
Marek Olšák
1cc5f7f868 nir: add nir_shift_channels helper
for later use

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35999>
2025-07-08 14:01:56 +00:00
Marek Olšák
5760f92e08 nir: print lowp/mediump/highp next to deref types
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35999>
2025-07-08 14:01:56 +00:00
Marek Olšák
070aaa1c9f nir/lower_io: validate that location and num_slots fit in the bitfields
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35999>
2025-07-08 14:01:56 +00:00
Marek Olšák
5aa3748b26 nir: remove deprecated nir_io_dont_optimize
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35999>
2025-07-08 14:01:56 +00:00
Marek Olšák
dd06c24577 gallium/noop: fix a crash in sampler_view_release
This fixes running shader-db with GALLIUM_NOOP, which is good for
measuring only GLSL/frontend compile times.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35995>
2025-07-08 13:39:15 +00:00
Gert Wollny
3b27269be4 mesa/st: Re-instate test for shader_clock cap
With the check for the cap gone no driver will expose
ARB_shader_clock. Unfortunately the CI doesn't catch this
because it doesn't provide expectations whether a test should
pass or be skipped. In this case

  spec@arb_shader_clock@execution@clock
  spec@arb_shader_clock@execution@clock2x32

went from pass to skip. (Tested on r600, but on radeonsi one
can also see that the extension ARB_shader_clock is no longer
available).

Adding the test for the cap back in fixes this.

Fixes: 2ce201707e (Add support for EXT_shader_clock)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35992>
2025-07-08 12:47:31 +00:00
Mel Henning
7e2ff0a35c nak/nvdisasm_tests: Remove extra . for lod_mode
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: cb9e458d29 ("nak: Rework printing of TexLodMode")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35994>
2025-07-08 12:27:02 +00:00
Mike Blumenkrantz
df0c25610e st/clear: handle null color renderbuffer
Fixes: 2eb45daa9c ("gallium: de-pointerize pipe_surface")

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35973>
2025-07-08 11:50:41 +00:00
Christoph Pillmayer
0dd73981b2 panvk: Fix IUB desc type check
Fixes: 2ec6527c70 ("panvk: Implement VK_EXT_inline_uniform_block")

Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35969>
2025-07-08 10:49:15 +00:00
jesse.zhang
56d758d321 amd: Add user queue HQD count to hw_ip info
Add a new field userq_num_hqds to drm_amdgpu_info_hw_ip to expose the
number of available hardware queue descriptors (HQDs) for user queues.
This allows userspace to query the maximum number of user queues that
can be created for a particular IP block.

the patch link in driver side:
https://lists.freedesktop.org/archives/amd-gfx/2025-June/126686.html

v2: we should also put userq_num_hqds into radeon_info and
print it where other fields are printed. (Marek Olšák)

v3: rename num_userqs to num_queue_slots
    and add print log in ac_print_gpu_info. (Marek Olšák)
v4: rename userq_num_hqds to userq_num_slots in hw_ip_info,
    and update the hw information (Marek Olšák)

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35850>
2025-07-08 10:17:51 +00:00
Calder Young
a39779e695 iris: Fix issue with conditional dispatching
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35946>
2025-07-08 10:00:45 +00:00
Eric Engestrom
d1692077ca broadcom/ci: skip tests that sometimes time out
Some of these might be related to the new infra, or they might have also
happened with the old infra. The joys of timeout flakes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35215>
2025-07-08 11:14:43 +02:00
Eric Engestrom
4b06e1fcf5 broadcom/ci: add ci-tron variant of each job
Traces jobs upload their results at the end, making them incompatible
with the current design of CI-tron which doesn't allow internet access
for security reasons, so they are not included for now.

We're working on a solution for controlled access to specific domains,
and will add the traces jobs once that's ready.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35215>
2025-07-08 11:14:43 +02:00
Eric Engestrom
6c98a3fd0e broadcom/ci: add definitions for ci-tron jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35215>
2025-07-08 11:09:51 +02:00
Samuel Pitoiset
9ae5078e99 zink/ci: update list of expected failures for RADV
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/35996>
2025-07-08 07:12:40 +00:00
Marek Olšák
80ed5653a7 nir: invert the meaning of has_indirect_* flags in nir_lower_io_passes
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
2025-07-08 06:11:44 +00:00
Marek Olšák
1c4929645b glsl: don't call nir_lower_global_vars_to_local twice in preprocess_shader
it's called again below

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
2025-07-08 06:11:44 +00:00
Marek Olšák
425a89cb75 glsl: don't call nir_split_var_copies in preprocess_shader
it seems to have no effect

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
2025-07-08 06:11:44 +00:00
Marek Olšák
a065a09d22 glsl: don't lower outputs to temps unconditionally
It's done later in nir_lower_io_passes only for shader stages not
supporting indirect access.

Unfortunately we have add a hack into nir_lower_io_passes to get rid of
output loads. A later commit will remove it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
2025-07-08 06:11:44 +00:00
Marek Olšák
1124587495 glsl: don't lower inputs to temps unconditionally
It's done later in nir_lower_io_passes only for shader stages not
supporting indirect access.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
2025-07-08 06:11:43 +00:00
Marek Olšák
9083e8b984 glsl: fix a possible crash in gl_nir_lower_xfb_varying
If the last block is empty, nir_block_last_instr returns NULL, which
sets the cursor to NULL, which crashes.

I think this can't crash currently because if xfb is present, there is
always at least 1 output store in the last block due to
lower_io_vars_to_temporaries, but that won't be true after we stop
calling it in a later commit.

Fixes: fa9cee4247 - glsl: implement lower_xfb_varying() as a NIR pass

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
2025-07-08 06:11:43 +00:00
Marek Olšák
89285e25b6 nir: remove nir_shader_compiler_options::lower_all_io_to_temps
All drivers should report support_indirect_* correctly, so this
is redundant.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
2025-07-08 06:11:43 +00:00
Marek Olšák
8def3f865d agx,freedreno,intel,lima,panfrost,svga,virgl,zink: fix supports_indirect_inputs
The GLSL compiler always lowers inputs to temps for VS and GS, so exclude
them from driver support because the GLSL compiler will no longer do that
unconditionally. Thus, indirect VS and GS inputs are completely untested
and broken in a lot of drivers.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
2025-07-08 06:11:42 +00:00
Marek Olšák
a86f32a1ae etnaviv,r600,v3d,virgl: report correct nir_options::support_indirect_*
These drivers set lower_all_io_to_temps = true, which means all indirect
access is always lowered except TCS, which is skipped by
nir_lower_io_vars_to_temporaries. Based on that, these drivers have never
received indirect IO for non-TCS shaders.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
2025-07-08 06:11:42 +00:00
Autumn Ashton
1ceded0c83 radv: Fix handling of NULL pColorAttachmentLocations in vkCmdSetRenderingAttachmentLocations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
From the Vulkan spec:
`If pColorAttachmentLocations is NULL, it is
equivalent to setting each element to its index
within the array.`

Use similar logic to what we do in
CmdSetRenderingInputAttachmentIndices to handle
this behaviour properly.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35948>
2025-07-08 02:32:56 +00:00
Konstantin Seurer
a3785ff131 ci/llvmpipe: Update expectations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
975f1f3c4b vulkan/cmd_queue: Free pNext
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
b52351c857 vulkan/cmd_queue: Fix indentation a bit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
12fd20bbb5 lavapipe: Implement VK_KHR_workgroup_memory_explicit_layout
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
d519f917e1 llvmpipe: Use the correct field to decide if coroutines are used
Fixes: 92083fc ("llvmpipe: Do not use coroutines when they are unnecessary")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
19d5d82d6f lavapipe: Implement VK_EXT_depth_bias_control
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
b30bebf38e llvmpipe: Improve depth bias rounding workaround
Multiplying by 2 is too conservative to pass depth bias control CTS.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
84f581c659 llvmpipe: Implement pipe_rasterizer_state::offset_units_unscaled
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
803521f416 gallium: Add back pipe_rasterizer_state::offset_units_unscaled
The field was removed with the nine removal but it is needed for depth
bias control on Vulkan.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
ebd2fc1441 docs: Document some lavapipe extensions
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
5ec02e9d0f lavapipe: Advertise VK_EXT_tooling_info support
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Mike Blumenkrantz
66ba87d717 zink: support NV_timeline_semaphore
this is just adding new value arrays to the existing semaphore mechanics

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35866>
2025-07-07 21:18:29 +00:00
Mike Blumenkrantz
035d837a92 gallium: fix timeline semaphore value passing
using a screen method for this is broken since the value can change
before it is flushed. it must be passed along with the methods that use it

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35866>
2025-07-07 21:18:29 +00:00
Mike Blumenkrantz
ab1dbd0899 zink: capture KHR_timeline_semaphore properties
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35866>
2025-07-07 21:18:29 +00:00
Mike Blumenkrantz
6e8b9e143d mesa: support NV_timeline_semaphore
this is for use with vulkan interop and carries the same mechanics

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35866>
2025-07-07 21:18:29 +00:00
Mike Blumenkrantz
03e5a63058 zink: fix signaling multiple API semaphores
it's possible for multiple user semaphores to be signaled in one batch,
and these all have the same mechanics as wait semaphores, which means
they unfortunately need their own submit in order to preserve ownership
when resetting the batch state

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35866>
2025-07-07 21:18:28 +00:00
Mike Blumenkrantz
d65c37f72e mesa: PIPE_FD_TYPE_TIMELINE_SEMAPHORE -> PIPE_FD_TYPE_TIMELINE_SEMAPHORE_D3D12
functionally this is the same as other types of timeline semaphores, but
it is not actually the same as other types of timeline semaphores, e.g.,
in vulkan it would be VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT
whereas other types of timeline semaphores would have different handle types

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35866>
2025-07-07 21:18:28 +00:00