Commit graph

217574 commits

Author SHA1 Message Date
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
Connor Abbott
62085044a4 nir: Allow lower_clip_fs with lowered IO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:14 +00:00
Connor Abbott
b8905ff2f0 nir/recompute_io_bases: Fix num_inputs with dual-slot VS inputs
Use num_normal_inputs, which also includes dual-slot inputs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:14 +00:00
Connor Abbott
778ed567ed nir/recompute_io_bases: Fix handling of dual-source blending
We forgot to increment num_outputs for dual-source outputs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:14 +00:00
Connor Abbott
32a4146992 nir: Fix recompute_io_bases with compact i/o arrays
Follow the example of unlower_io_to_vars, so that when called within
that pass we don't incorrectly recalculate bases for backends that have
compact arrays.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:14 +00:00
Connor Abbott
3208cc80b1 nir: Move is is_compact() out of unlower_io_to_vars
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39328>
2026-01-21 20:54:13 +00:00
Jesse Natalie
b8e1ca9913 wgl: Support PFD_SWAP_COPY pixel formats
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39441>
2026-01-21 20:37:59 +00:00
Jesse Natalie
2d46ac527c wgl: Delete stw_pfd_flag
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39441>
2026-01-21 20:37:58 +00:00
Eric Engestrom
bba73d9c81 docs: update calendar for 26.0.0-rc1
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/39439>
2026-01-21 19:27:35 +00:00
jaap aarts
8f7941f92d radv/sqtt: Prevent concurrent submit when sqtt is enabled
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39090>
2026-01-21 18:55:56 +00:00
Aitor Camacho
1b1e38ffd5 kk: Update kk_bind_descriptor_sets comment to reflect updated binding
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39203>
2026-01-21 18:16:05 +00:00
Aitor Camacho
aaf4405507 hk: Handle unbound sets that contain dynamic buffers
The offset for the dynamic buffers needs to be computed with the currently
bound pipeline layout. This change fixes incorrectly selecting the offset
for a dynamic buffer if a descriptor with a lower index than the currently
being bound contains a dynamic buffer but said descriptor hasn't being
bound yet. It also prevents the binding to override the dynamic buffers in
order to preserve the already bound dynamic descriptors.

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39203>
2026-01-21 18:16:05 +00:00
Aitor Camacho
80a076f5d0 nvk: Handle unbound sets that contain dynamic buffers
The offset for the dynamic buffers needs to be computed with the currently
bound pipeline layout. This change fixes incorrectly selecting the offset
for a dynamic buffer if a descriptor with a lower index than the currently
being bound contains a dynamic buffer but said descriptor hasn't being
bound yet. It also prevents the binding to override the dynamic buffers in
order to preserve the already bound dynamic descriptors.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39203>
2026-01-21 18:16:05 +00:00
Eric Engestrom
8846c0246d docs/releasing: skip ci when creating the branchpoint
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This isn't a new git state to be tested, we're just pushing it to a new location.

The push above doesn't need this because it doesn't run the CI anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39435>
2026-01-21 18:11:43 +00:00
Eric Engestrom
f43bab301f docs/releasing: rephrase sentence about not letting the mr label script run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39435>
2026-01-21 18:11:43 +00:00
Eric Engestrom
3f9f7f864f docs/releasing: s/pull request/merge request/
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39435>
2026-01-21 18:11:43 +00:00
Eric Engestrom
5bfd522c9a docs: reset new_features.txt
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39436>
2026-01-21 17:56:17 +00:00
Eric Engestrom
ab3cc1d0a0 VERSION: bump to 26.1
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39436>
2026-01-21 17:56:17 +00:00
Timur Kristóf
87a8d19b51 ac/gpu_info: Remove FIXME from regalloc hang description
This is now implemented.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39288>
2026-01-21 17:24:57 +00:00
Timur Kristóf
d7f3096ee9 radeonsi: Remove previous mitigation of CS regalloc hang bug
Now that all larger workgroup sizes are lowered to 256,
the old workaround is not needed anymore.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39288>
2026-01-21 17:24:57 +00:00
Timur Kristóf
fc0827126f radv: Remove previous mitigation of CS regalloc hang bug
Now that all larger workgroup sizes are lowered to 256,
the old workaround is not needed anymore.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39288>
2026-01-21 17:24:57 +00:00
Timur Kristóf
f3e8e93906 radeonsi: Allow using compute queue with regalloc hang bug on GFX7
Now that all larger workgroup sizes are lowered to 256,
the regalloc hang cannot mess up the compute queues anymore.

Still don't allow compute queues on GFX6 though,
those have never been enabled ever since RadeonSI started using
the compute queue in a1378639ab - let's keep it that way.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39288>
2026-01-21 17:24:56 +00:00
Timur Kristóf
86ff28b3da radv: Allow using compute queue with CS regalloc hang bug on GFX7
Now that all larger workgroup sizes are lowered to 256,
the regalloc hang cannot mess up the compute queues anymore.

Still don't allow compute queues on GFX6 though,
they are prone to hangs. Needs further investigation.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39288>
2026-01-21 17:24:56 +00:00
Timur Kristóf
0961aba8a7 radeonsi: Lower larger workgroups to 256 for CS regalloc bug
Even though radeonsi may not use compute queues, other processes
might run compute jobs in the background, so radeonsi must make
sure not to use	larger than 256	sized workgroups on GPUs that
are affected by	the regalloc hang.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39288>
2026-01-21 17:24:56 +00:00
Timur Kristóf
d31b4451f2 radv: Lower larger workgroups to 256 for CS regalloc bug
This is the safest maximum workgroup size if we want to avoid
the hang on affected GPUs.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39288>
2026-01-21 17:24:56 +00:00
Timur Kristóf
dc41023510 radeonsi: Limit variable workgroup size to 256 for CS regalloc bug
Even though radeonsi may not use compute queues, other processes
might run compute jobs in the background, so radeonsi must make
sure not to use larger than 256 sized workgroups on GPUs that
are affected by the regalloc hang.

Unfortunately that means that for now RadeonSI won't be able to
support ARB_compute_variable_group_size on these GPUs.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39288>
2026-01-21 17:24:56 +00:00
Timur Kristóf
3d934c7951 mesa: Require at least 512 variable invocations for ARB_compute_variable_group_size
The specification for ARB_compute_variable_group_size requires
the driver to support at least 512 variable invocations in
the MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB variable.

Source:
https://registry.khronos.org/OpenGL/extensions/ARB/ARB_compute_variable_group_size.txt

In Gallium, that capability is max_variable_threads_per_block,
let's require that is at least 512 to stay in spec.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39288>
2026-01-21 17:24:56 +00:00
Utku Iseri
e58b32a8c1 zink: handle split DS blits with zink_blit calls
This fixes resource tracking and state setting for depth-only blits.

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39410>
2026-01-21 16:33:47 +00:00
Lionel Landwerlin
79aff6e274 brw: use fp64 to compute coarse_z
For some reason we cannot get the precision needed from the HW at fp32.

LNL internal fossildb changes :

Totals from 7226 (0.76% of 947978) affected shaders:
Instrs: 5512598 -> 5586086 (+1.33%); split: -0.00%, +1.33%
Cycle count: 153836056 -> 155079472 (+0.81%); split: -0.77%, +1.58%
Spill count: 2025 -> 2021 (-0.20%); split: -0.35%, +0.15%
Fill count: 3139 -> 3112 (-0.86%); split: -1.12%, +0.25%
Max live registers: 1034601 -> 1034632 (+0.00%); split: -0.00%, +0.00%
Max dispatch width: 207296 -> 207264 (-0.02%); split: +0.02%, -0.03%
Non SSA regs after NIR: 1147942 -> 1109326 (-3.36%)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12726
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38996>
2026-01-21 16:00:52 +00:00
Lionel Landwerlin
a19e949824 brw: move coarse_z computation to NIR
So that we can print it easily with debug printfs

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38996>
2026-01-21 16:00:52 +00:00
Lionel Landwerlin
98194dfa0b nir: add intrinsics for Z calculation in shaders with FSR
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38996>
2026-01-21 16:00:52 +00:00