Commit graph

202556 commits

Author SHA1 Message Date
Rhys Perry
f9c11a8e15 radv: add ngg_wave_id_en to radv_shader_info
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39720>
2026-02-16 14:33:57 +00:00
Marek Olšák
1a105e1b1f radeonsi: remove CB_RESOLVE
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's rarely used because a custom pixel or compute shader is almost always
faster, and we have those already.

RGB<->BGR swapping and microtile mode switching existed only for CB_RESOLVE
and are removed too.

RADV could also remove CB_RESOLVE, but it should probably use a pixel shader
until it can use ac_nir_meta_cs_blit, which is the fastest option for gfx12.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39872>
2026-02-16 13:38:43 +00:00
Marek Olšák
aa92b464f3 nir/opt_non_uniform_access: use new query flags
NFC for drivers

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39743>
2026-02-16 12:59:36 +00:00
Marek Olšák
61a96be494 nir/lower_non_uniform_access: add an option not to lower tex & image queries
AMD can do non-uniform queries. The RADV change will be in a separate commit.

NFC for drivers.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39743>
2026-02-16 12:59:36 +00:00
Marek Olšák
a9df891bc6 nir: allow get_ssbo_size to return a 64-bit result
to match get_ubo_size, and to support HW where SSBOs can have a 64-bit size.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39743>
2026-02-16 12:59:36 +00:00
Marek Olšák
c151402f35 nir: add ACCESS to get_ubo_size
so that we can set NON_UNIFORM

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39743>
2026-02-16 12:59:36 +00:00
Marek Olšák
1d09a975bf nir: handle get_ubo_size as a resource query in nir_shader_gather_info
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39743>
2026-02-16 12:59:36 +00:00
Lars-Ivar Hesselberg Simonsen
2d9be41706 panvk/v13: Support HSR Prepass
Add an option to enable HSR Prepass.

It is currently disabled by default as it might cause performance
regressions for content that:

- Has very simple fragment work.
- Already does a ZS prepass.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39615>
2026-02-16 12:25:14 +00:00
Lars-Ivar Hesselberg Simonsen
3d6c7cf8b7 panvk/v13: Set HSR flags
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39615>
2026-02-16 12:25:14 +00:00
Lars-Ivar Hesselberg Simonsen
b10555ea63 pan/compiler: Add pass to collect HSR info
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39615>
2026-02-16 12:25:14 +00:00
Lars-Ivar Hesselberg Simonsen
6e88d9cbe3 pan/genxml/v13: Add HSR operation enums
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39615>
2026-02-16 12:25:14 +00:00
Lars-Ivar Hesselberg Simonsen
71500a32fa pan/genxml/v13: Fix HSR Prepass typo
Fixes: ece01443e1 ("pan/genxml: Add v13 definition")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39615>
2026-02-16 12:25:14 +00:00
Lars-Ivar Hesselberg Simonsen
75242b1862 panvk: Fix dcd_flags1 dirty bit
dcd_flags1 was not counted as dirty in case the color attachment map was
updated. This could lead to an outdated value for render_target_mask.

Fixes: a4670a67e0 ("panvk/csf: Set the correct DCD_FLAGS_1.render_rarget_mask")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39615>
2026-02-16 12:25:13 +00:00
Pavel Ondračka
0763fb947a r300: align macro-tiled stride-addressed textures in X
Odd macro-tile counts in X trigger flaky rendering/readback in
parallel stress runs with macro-tiled NPOT textures (for example
piglit draw-pixel-with-texture -auto -fbo).

When a texture is macro-tiled and uses stride addressing, align the
width to two macro tiles. This keeps the stride at an even number of
macro tiles in X and avoids the corruption without disabling
macrotiling.

I was not able to find anything about this in the docs.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39882>
2026-02-16 13:04:56 +01:00
Pavel Ondračka
7ae9262dc3 r300: split unaligned 3D texsubimage uploads by layer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
TexSubImage3D failures were caused by tiled multi-slice uploads for
unaligned XY box. Falls back to per-layer uploads when the 3D box
depth is > 1 and XY box is unaligned.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39897>
2026-02-16 11:26:41 +00:00
Hyunjun Ko
eedbe136ea anv/video: remove unsupported feautres for encoders
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39884>
2026-02-16 10:58:40 +00:00
Hyunjun Ko
1185bbe18d anv/video: set Sad Qp Lambda values properly for H265 encoder.
This is taken from media-driver(Intel VA-API)

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39884>
2026-02-16 10:58:40 +00:00
Hyunjun Ko
1cb4fe5ef5 anv/video: Handle GPB(Generalized P and B frames) properly for H265 enc.
The previous code was copying RefPicList0 to RefPicList1 but not updating
num_ref_idx_l1_active_minus1, leaving it potentially uninitialized or zero.
This caused the hardware to see an inconsistent L1 list state.

Accordingly it sets num_ref_idx_active_override_flag if necessary.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39884>
2026-02-16 10:58:40 +00:00
Hyunjun Ko
4d4a5e4a42 anv/video: set Qp passed from apps for h265 encoder
Instead of 26 by default.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39884>
2026-02-16 10:58:40 +00:00
Hyunjun Ko
6efbb80c98 anv/video: set transform skip numbers according to qp
Instead of hardcode.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39884>
2026-02-16 10:58:40 +00:00
Juan A. Suarez Romero
f641eb4fad broadcom/ci: update expected results
Add new flakes found in the nightly runs.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39912>
2026-02-16 11:21:23 +01:00
Juan A. Suarez Romero
154b5ccc9e broadcom/ci: update available devices
These are the devices used for pre-merges.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39912>
2026-02-16 11:21:15 +01:00
Job Noorman
65362a9c38 ir3: don't use predication for large blocks
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Even when the branch condition is divergent, it may still be uniform
within a wave. When this happens for very large blocks, predication
causes a large overhead because the instructions in the false block are
not simply jumped over. Therefore, we fall back to normal branches for
large blocks.

Measuring renderpass time on some OpenGL traces:
average fps +0.5% (+/- 0.1%)
max fps +0.5% (+/- 0.1%)

Totals from 18522 (10.51% of 176279) affected shaders:
MaxWaves: 203126 -> 203156 (+0.01%)
Instrs: 23999194 -> 23521729 (-1.99%); split: -1.99%, +0.00%
CodeSize: 45462360 -> 45250224 (-0.47%); split: -0.47%, +0.00%
NOPs: 5078652 -> 4647917 (-8.48%); split: -8.48%, +0.00%
MOVs: 813450 -> 812615 (-0.10%); split: -0.26%, +0.15%
COVs: 296638 -> 296620 (-0.01%); split: -0.01%, +0.00%
Full: 334991 -> 334923 (-0.02%)
(ss): 636625 -> 636682 (+0.01%); split: -0.12%, +0.13%
(sy): 283395 -> 283429 (+0.01%); split: -0.10%, +0.11%
(ss)-stall: 2652246 -> 2651590 (-0.02%); split: -0.18%, +0.16%
(sy)-stall: 7862615 -> 7881590 (+0.24%); split: -0.13%, +0.37%
STPs: 15994 -> 15992 (-0.01%)
LDPs: 23360 -> 23356 (-0.02%)
Subgroup size: 896 -> 1792 (+100.00%)
Cat0: 5572855 -> 5097380 (-8.53%); split: -8.53%, +0.00%
Cat1: 1146050 -> 1145189 (-0.08%); split: -0.18%, +0.11%
Cat2: 8975537 -> 8974390 (-0.01%); split: -0.01%, +0.00%
Cat6: 196837 -> 196831 (-0.00%)
Cat7: 795866 -> 795890 (+0.00%); split: -0.06%, +0.06%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39734>
2026-02-16 09:00:14 +00:00
Job Noorman
e7c3834a27 ir3: add block_can_be_predicated helper
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39734>
2026-02-16 09:00:13 +00:00
Samuel Pitoiset
47841c1142 radv/meta: remove useless DCC decompressions for image<->buffer
It's not needed to decompress DCC when formats are compatible each
other, this basically removes all decompressions on GFX11-GFX11.5.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39888>
2026-02-16 07:40:13 +00:00
Yiwei Zhang
b0397b967d venus: workaround a gcc-15 dead store elimination (DSE) bug
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
No issue with clang or gcc-14.x (or earlier versions). The issue only
shows up since gcc-15.1. The compiler somehow fails to consider those
cs helpers dereferencing the pointer from the pNext chain for reads,
and thus has falsely optimized away the pNext store. This change works
around this with a no-op memory clobber.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13242
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39906>
2026-02-16 01:39:10 +00:00
Vinson Lee
7239b5288f freedreno/decode: replace lua_pushunsigned with lua_pushinteger
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
lua_pushunsigned was introduced in Lua 5.2, deprecated in 5.3,
and removed in 5.4. Replace it with lua_pushinteger which has
been available since Lua 5.0 and handles the uint32_t value
safely via implicit widening to the 64-bit lua_Integer type.

This fixes the build with Lua 5.5:

../src/freedreno/decode/script.c: In function 'pushdecval':
../src/freedreno/decode/script.c:182:7: error: implicit declaration of function 'lua_pushunsigned'; did you mean 'lua_pushinteger'? [-Wimplicit-function-declaration]
  182 |       lua_pushunsigned(L, val.u);
      |       ^~~~~~~~~~~~~~~~
      |       lua_pushinteger

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39901>
2026-02-14 22:45:45 -08:00
Yiwei Zhang
a8baedef29 venus: expose VK_EXT_descriptor_heap behind a debug option
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
There's TODO for optimizing descriptor allocations, so currently we
expose the extension behind VN_DEBUG=desc_heap

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:30 +00:00
Yiwei Zhang
6265dad4f2 venus: fill descriptor heap feats and props
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:30 +00:00
Yiwei Zhang
dea6221a65 venus: take care of combined image sampler descriptor for ycbcr
We'd have to query it by reconstructing the sampler ycbcr conversion
image format props query. It's straightforward except having to consider
the modifier tiling case.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:30 +00:00
Yiwei Zhang
4f475789d5 venus: ensure descriptor writes invariance
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:30 +00:00
Yiwei Zhang
1d779f5af1 venus: cache descriptor size query
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:29 +00:00
Yiwei Zhang
dfc5d76205 venus: rename format_update_mutex for general purpose
Not worth separate locks for physical device level queries.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:29 +00:00
Yiwei Zhang
be52338399 venus: add vn_descriptor.h to be shared between different desc systems
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:28 +00:00
Yiwei Zhang
990b5fca37 venus: skip image cache for VkOpaqueCaptureDataCreateInfoEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:28 +00:00
Yiwei Zhang
526788a097 venus: pipeline layout is now optional
If descriptor heap is used, there's no pipeline layout created. So we
have to patch compute and RT pipelines to allow it. Graphics pipeline
doesn't need the change because of GPL.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:28 +00:00
Yiwei Zhang
95331f3bd0 venus: cmd inheritance info fix to consider descriptor heap
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:28 +00:00
Yiwei Zhang
485b2b501c venus: implement all descriptor heap commands
There're potential optimizations available for below:
- vkWriteSamplerDescriptorsEXT
- vkWriteResourceDescriptorsEXT
- vkGetPhysicalDeviceDescriptorSizeEXT
- vkRegisterCustomBorderColorEXT

...and we can revisit if there's perf hit from above for real apps.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:28 +00:00
Yiwei Zhang
04c0142aaa venus: sync latest protocol for VK_EXT_descriptor_heap support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39762>
2026-02-15 04:32:28 +00:00
Adam Jackson
5ab41818c4 zink: use VK_EXT_pci_bus_info for PCI address
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/39894>
2026-02-15 03:02:08 +00:00
aerith
0c17a59ab5 zink: fix codegen for extensions with non-standard struct names
name_in_camel_case() converts "pci" to "Pci" but Vulkan uses "PCI"
in VkPhysicalDevicePCIBusInfoPropertiesEXT. use the actual struct
name from vk.xml when the constructed name doesn't match.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39894>
2026-02-15 03:02:08 +00:00
Konstantin Seurer
9a82e4ba81 vulkan/cmd_queue: Do not zero initialize vk_cmd_queue_entry
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Most of the struct will be initialized already. Make sure to initialize
everything so linear_alloc_child can be used.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39881>
2026-02-14 20:11:40 +00:00
Konstantin Seurer
be5ab80de1 vulkan/cmd_queue: Fixup stride for multi draws
Copying the draw infos packs them so the stride needs to be set to the
struct size.

cc: mesa-stable

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39881>
2026-02-14 20:11:40 +00:00
Konstantin Seurer
bf61736aa5 vulkan/cmd_queue: Remove get_array_member_copy
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39881>
2026-02-14 20:11:40 +00:00
Konstantin Seurer
d2ea8b3d14 vulkan: Remove vk_cmd_queue_entry::driver_data
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39881>
2026-02-14 20:11:39 +00:00
Konstantin Seurer
017b3b73bb lavapipe: Extend vk_cmd_queue_entry_base for internal commands
lavapipe is the only driver that is using driver_data.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39881>
2026-02-14 20:11:39 +00:00
Collabora's Gfx CI Team
1dc39405ce Uprev Piglit to 0d79fb4a59c7d213ff144afa4c73e3b32ebe6500
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
62d499d63d...0d79fb4a59

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39575>
2026-02-14 14:43:20 +01:00
Thomas H.P. Andersen
331af5e746 nvk: add app workaround layer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This adopts the device internal app workaround layer from radv

The layer allows to fix up game input in the layer instead of
adding workarounds within the driver.

Initially this only includes the workaround for Metro exodus as
I have verified that it fixes a crash on NVK. Follow up commits
can add the other relevant workarounds when the fixes are verified
to be needed for NVK.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39870>
2026-02-14 08:33:11 +00:00
Thomas H.P. Andersen
0a6509e94c nvk: prepare for driver internal layers
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39870>
2026-02-14 08:33:11 +00:00
Timothy Arceri
a6fcc2835e st/glsl_to_nir: make sure the variant has the correct locations set
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
For drivers that set allow_st_finalize_nir_twice locations are set
when the variable is created. But for variants here we update the
locations in case parameter opt pass or something else changed the
location.

Fixes: 891d46f517 ("st/glsl_to_nir: dont add duplicate state tokens")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14837

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39867>
2026-02-14 06:37:10 +00:00