Commit graph

217504 commits

Author SHA1 Message Date
Mel Henning
c8e47ab40c nvk: Use pipeline_layout.dynamic_descriptor_offset
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Tested-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39411>
2026-01-22 17:04:18 +00:00
Mel Henning
25acd26a0f nvk: Use layout->vk.dynamic_descriptor_count
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Tested-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39411>
2026-01-22 17:04:18 +00:00
Aitor Camacho
cdbf7242f3 kk: Fix graphics pipeline serialization
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Bundles all graphics pipeline creation information required by Metal into
the vertex shader so we can later rebuild the pipeline. This allows us to
correctly create pipelines from caches that were loaded from files.

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39454>
2026-01-22 15:50:31 +00:00
Aitor Camacho
99d8246d1c kk: Move gfx pipeline data to the info struct within kk_shader
Makes it easier to serialize and add data specific to the gfx pipeline.

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39454>
2026-01-22 15:50:31 +00:00
Aitor Camacho
75f6f46c0f kk: Fix compute pipeline cache
When deserializing the compute shader from a blob, we need to recreate the
pipeline because the blob may have been loaded from file and therefore the
reference to the Metal resource will be invalid.

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39454>
2026-01-22 15:50:30 +00:00
Aitor Camacho
622ebba476 kk: Correctly release pipeline handles at shader destroy
The condition to release Metal pipelines incorrectly checks which shader
stage we are destroying leading to leads when graphics pipelines had to
be released.

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39454>
2026-01-22 15:50:30 +00:00
Aitor Camacho
15c0dd39fc kk: Fix shader uint32_t value serialization
We need to write with blob_write_uint32 if we are using blob_read_uint32

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39454>
2026-01-22 15:50:29 +00:00
Aitor Camacho
b350f059f5 kk: Fill pipelineUUID
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39454>
2026-01-22 15:50:29 +00:00
Aitor Camacho
669a4dd56b kk: Use nir_opt_shrink_stores
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39301>
2026-01-22 15:32:43 +00:00
Aitor Camacho
4f7bdb1dde kk: Force frag output component count to match render targets'
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39301>
2026-01-22 15:32:43 +00:00
Aitor Camacho
8147ea59fe kk: Bundle nir_to_msl options into a struct for easier option addition
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39301>
2026-01-22 15:32:43 +00:00
Michel Dänzer
f35f50af72 ci: Drop a couple of -Wno-error stanzas from alpine-build-testing job
No warnings left.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39429>
2026-01-22 15:49:11 +01:00
Michel Dänzer
a9ea942ef0 ci: Drop most -Wno-error stanzas from debian-arm64 jobs
No warnings left.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39429>
2026-01-22 15:49:11 +01:00
Michel Dänzer
11d9a3958f ci: Drop half of -Wno-error stanzas from fedora-release job
No warnings left.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39429>
2026-01-22 15:49:11 +01:00
Michel Dänzer
b1f35512c9 ci: Drop -Wno-error stanzas from debian-no-libdrm job
No warnings left.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39429>
2026-01-22 15:49:11 +01:00
Michel Dänzer
1035868a41 ci: Drop some -Wno-error stanzas from the debian-android job
No warnings left.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39429>
2026-01-22 15:49:11 +01:00
Michel Dänzer
a5d35e29ca ci: Drop -Wno-error=stringop-overread from debian-release job
No warnings left.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39429>
2026-01-22 15:49:11 +01:00
Michel Dänzer
41eb24e4da ci: Drop remaining -Wno-error stanzas from debian-x86_64-asan/ubsan jobs
No warnings left.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39429>
2026-01-22 15:48:14 +01:00
Michel Dänzer
945da70d73 ci: Drop -Wno-error=vla-cxx-extension from debian-x86_64-msan job
No warnings left.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39429>
2026-01-22 15:48:14 +01:00
Michel Dänzer
a74ffd6900 Pass the destination buffer size minus one to strncpy
Copying the last byte was pointless, since the next line overwrites it,
and resulted in a compiler warning:

../src/intel/common/intel_measure.c: In function 'intel_measure_init':
../src/intel/common/intel_measure.c:68:7: warning: 'strncpy' specified bound 1024 equals destination size [-Wstringop-truncation]
   68 |       strncpy(env_copy, env, 1024);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

This allows dropping -Wno-error=stringop-truncation from the
debian-x86_64-asan & debian-{arm64,x86_64}-ubsan CI jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39429>
2026-01-22 15:44:09 +01:00
Simon Perretta
ed180a1c20 pvr: remove drm device config table
Drops the drm device config table in favour of just checking for the
presence of the appropriate device driver.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39444>
2026-01-22 12:25:11 +00:00
Simon Perretta
c5b70dcb48 pco: update formatless skip check
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The skip check should only be checking the format rather than the entire
packed word.

Fixes: 52ddc40a75 ("pco: restrict shadow sampler comparator clamping to unorm formats")
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39428>
2026-01-22 08:09:36 +00:00
Samuel Pitoiset
873008f274 vulkan: fix missing begin debug marker for HPLOC
This fixes capturing with RGP.

Fixes: 091b43b970 ("radv: Use HPLOC for TLAS builds")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39427>
2026-01-22 08:32:18 +01:00
Yiwei Zhang
481df22209 venus: refactor Android ANB tracking to avoid confusions with WSI
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
WSI used to track the similar for aliased wsi image creation, but later
got deprecated. So let's rename wsi.memory to wsi.anb_mem and drop
wsi.memory_owned to avoid confusions with common wsi related trackings.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
2026-01-21 23:15:42 +00:00
Yiwei Zhang
849e3552e8 venus: properly handle wsi implicit in-fence
Vulkan is supposed to operate in explicit synchronization mode. However,
for legacy compositors that only support implicit fencing, we have to
extract the compositor implicit fence (release fence) and resolve it
properly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
2026-01-21 23:15:42 +00:00
Yiwei Zhang
211c21725c venus: refactor vn_AcquireNextImage2KHR
Prepare for valid implicit in-fence.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
2026-01-21 23:15:42 +00:00
Yiwei Zhang
9718847dbf venus: add vn_renderer_bo_export_sync_file helper
...and a renderer internal helper shared by virtgpu and vtest backend
when supported.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
2026-01-21 23:15:41 +00:00
Yiwei Zhang
3fca8423c9 venus: track dedicated image during mem alloc
Need this because the new common wsi interface only returns the wsi
memory from the acquired image index.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
2026-01-21 23:15:41 +00:00
Yiwei Zhang
eb709cba47 venus: track prime blit dst buffer memory in the wsi image
This is to prepare for handling WSI implicit acquire fence.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
2026-01-21 23:15:40 +00:00
Rob Clark
c6a4b8e9c7 ir3: Handle dual-wave reconvergence
With dual-wave dispatch, the hw needs (jp)s to also reflect where
co-issued waves might reconverge.  We should also consider this for
branchstack, but we do not need to consider it while generating
physical edges for uGPR (shared register) allocation.

Handle this by calling the reconvergence pass twice on devices with
dual-wave dispatch.  The first pass ignores the information we get
from nir about uniformity of branch conditions (because nir does not
distinguish between shader and warp level uniformity).  In this
first pass, we skip setting up physical edges, which is handled in
the second pass (since co-issued waves have their own uGPR resources).

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39442>
2026-01-21 22:53:23 +00:00
Rob Clark
4e28ac2870 ir3: Use fd_dev_info from ir3_compiler
Rather than copying an ever growing list of params from fd_dev_info to
ir3_compiler, just store the info pointer in the compiler and use that
directly.

Mechanical change.  But deletes code and removes an extra step from
adding compiler related dev info props.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39442>
2026-01-21 22:53:23 +00:00
Caio Oliveira
c8375c0f71 brw/scoreboard: Support local implicit out-of-order dependencies
In software scoreboard (Gfx12+) use information from previous
instructions to trim out-of-order dependencies.  For example, in

    send g1, g2     ($1)
    mov  g3, g1     ($1.dst)    // Depends on g1 (destination of $1)
    mov  g4, g2     ($1.src)    // Depends on g2 (source of $1)
    mov  g5, g1     ($1.dst)    // Depends on g1 (destination of $1)

only the first `mov` needs to be annotated, because the execution will
stall until that dependency is fulfilled, which in this case means the
`send` is done and `g1` was already written.

Note that while `$x.dst` implies `$x.src`, the reverse is not true, so
if the first `mov` did not exist, both second and third `mov` in the
example would have to keep their annotations.

This patch add resolution of implicit out-of-order dependencies that are
visible inside a block.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3526>
2026-01-21 22:29:28 +00:00
Caio Oliveira
ba317e14a0 brw: Provide ~ and &= operators for tgl_sbid_mode
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3526>
2026-01-21 22:29:28 +00:00
Caio Oliveira
2ebacbc78d brw/scoreboard: Add tests showing implicit unordered dependencies in SWSB
Mark tests as disabled for now.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3526>
2026-01-21 22:29:28 +00:00
Caio Oliveira
423916152e brw/scoreboard: Use std::vector when applicable
There's agreement now these are helpful and widely supported.  We can
always fallback to a custom vector class later if necessary.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3526>
2026-01-21 22:29:27 +00:00
Kitlith
b18b52e61d pvr: Free drm device in can_present_on_device
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 6bda88bfdb ("pvr: copy WSI can_present_on_device function from PanVK")
Signed-off-by: Kitlith <kitlith@kitl.pw>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39415>
2026-01-21 21:50:42 +00:00
Kitlith
4de41bf27d panvk: Free drm device in can_present_on_device
Fixes: 08da41f2f1 ("panvk: override can_present_on_device")
Signed-off-by: Kitlith <kitlith@kitl.pw>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39415>
2026-01-21 21:50:42 +00:00
Connor Abbott
6a1c8d3a0c ir3, freedreno, turnip: Lower io earlier
On the gallium side, set the NIR option to leave IO lowered after
linking when using GLSL. On the turnip side, move up nir_lower_io to
as early as currently possible. Further turnip passes will have to be
converted to intrinsics before we can switch to using the new linker.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:21 +00:00
Connor Abbott
78f6c70304 ir3: Don't support indirect inputs in FS
We don't actually support it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:21 +00:00
Connor Abbott
e943ba122d ir3: Stop asserting tess levels are scalar
Gallium gives us vectors, but guarantees that inner/outer levels are in
separate locations still.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:20 +00:00
Connor Abbott
14269166b2 freedreno, turnip, ir3: Always gather streamout info from NIR
pipe_stream_output_info is considered deprecated, and not filled out for
drivers using I/O intrinsics. Switch to using NIR instead, which should
be more reliable and allows us to stop having separate paths for
gathering this info in turnip and freedreno.

Since we don't have a map of location -> driver_location before
compiling, we have to switch to using locations in the streamout info.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:20 +00:00
Connor Abbott
1bd967ba64 ir3: Remove variables after i/o lowering
Other parts of NIR, such as unlower_io_to_variables, expect i/o
variables to be gone, and the NIR linker removes them. Now that we've
removed all the remaining bits relying on variables we can start
deleting them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:20 +00:00
Connor Abbott
a47316c19a ir3: Don't use variables for passthrough TCS
We will delete variables soon.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:19 +00:00
Connor Abbott
dd236bf392 ir3: Stop using variables when translating from NIR
We can trivially remove the last vestiges of variables.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:18 +00:00
Connor Abbott
51db95e2d5 ir3: Stop relying on variables in ir3_nir_lower_layer_id
We will soon delete all variables. Instead we have to scan the shader to
find if there are any pre-existing reads of the varying.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:17 +00:00
Connor Abbott
069bdc499b ir3: Fix ir3_nir_lower_layer_id indentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:17 +00:00
Connor Abbott
b74e301c7e ir3, freedreno, tu: Move nir_lower_io out of post_finalize()
In gallium, the GLSL linker already lowers variables so this was mostly
a no-op. However in order to use common passes that operate on
intrinsics in turnip, and eventually convert turnip passes to use
intrinsics, we need to split out nir_lower_io so that we can call it
earlier. Split out the call to nir_lower_io to a separate function, and
move it up in turnip. In the future we will move it up even further
until we can use the new NIR linking passes that operate on intrinsics.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:16 +00:00
Connor Abbott
c7a60fca3c nir, ir3: Make ir3 GS varyings use a proper index
Use a similar technique of reusing TCS-only varyings for VS/TES/GS.
This way outputs_written can be used to see whether GS lowering has
already been run.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:15 +00:00
Connor Abbott
aa04692bb4 st/mesa: Call nir_recompute_io_bases after lowering FP variants
Lowering FP variants calls a number of passes that aren't aware of
driver locations. For drivers relying on them, make sure that they are
still correct by recomputing them rather than adding awareness to every
pass.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:15 +00:00
Connor Abbott
5abe3db518 nir/lower_clip: Correctly handle driver_location in VS lowering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:15 +00:00