Commit graph

222345 commits

Author SHA1 Message Date
Iván Briano
58006eaaa4 anv/brw: add conservative raster on/off to FS_CONFIG
FullyCovered will need to know if conservative rasterization is enabled,
so pass it on to the shader.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38879>
2026-05-11 18:15:50 +00:00
Iván Briano
fea8830946 intel/brw: add load_frag_shading_rate_intel
Add a new intrinsic to read the raw shading rate provided to the FS
payload, and lower load_frag_shading_rate in NIR using it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38879>
2026-05-11 18:15:49 +00:00
Iván Briano
5383afadbf intel/brw: add load_msaa_rate_intel intrinsic
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38879>
2026-05-11 18:15:49 +00:00
Iván Briano
3448f3ce4a intel/brw: add load_coverage_mask_intel intrinsic
We'll need the raw coverage mask provided to the fragment shader in a
future patch.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38879>
2026-05-11 18:15:49 +00:00
Job Noorman
d8e1409948 ir3: don't cache driver param instructions
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We create driver param instructions once we encounter their first use
and cache them for further uses. This creates problems when the first
use occurs in a block that doesn't dominate all further uses. This was
hit in practice with a driver param that was used both in the preamble
and in the main shader.

Fix this by simply not caching driver params. Since they are simply movs
from const regs, ir3_cp or ir3_cse should clean up most cases of
multiple uses.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 8b0b81339b ("freedreno/ir3: add NIR compiler")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15418
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41484>
2026-05-11 17:49:32 +00:00
Mike Blumenkrantz
131eb49121 zink: fix mixing of mesh descriptor bindings with gfx bindings
this is illegal, need separate everything

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41426>
2026-05-11 16:58:30 +00:00
Mike Blumenkrantz
5d97b25fa0 zink: delete unused descriptor variable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41426>
2026-05-11 16:58:30 +00:00
Collabora's Gfx CI Team
8f86880450 Uprev VVL to 4acd00c7a0665c9b1d01604e5fe1454837f87134
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
8474616c30...4acd00c7a0

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41411>
2026-05-11 16:22:39 +00:00
Mike Blumenkrantz
7d63efbd1a aux/trace: silence -Waddress warnings in macros
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41422>
2026-05-11 15:59:48 +00:00
Thong Thai
06c84cc773 frontends/va: Enable shader-based alpha blending
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41090>
2026-05-11 15:27:46 +00:00
Thong Thai
c96c7e77f7 gallium/vl: Implement compositor shader-based alpha blending
Implements shader-based global blending and pre-multiplied alpha support
to YUV compositing, allowing for transparent overlays and alpha-channel
based transparency with RGBA overlays.

Handle pre-multiplied alpha images by un-multiplying the pre-multiplied
alpha colours, to allow for straight-alpha (which is easier to
implement) to be applied.

Thanks nyanmisaka for the help, and for pointing out the difference
between pre-multiplied alpha and straight alpha.

Thanks David Rosca and Benjamin Cheng for improvements to the code and
spotting errors.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/12977

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41090>
2026-05-11 15:27:46 +00:00
Thong Thai
cfd2d9f411 gallium/video: Add enabled flag to vpp interface
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41090>
2026-05-11 15:27:46 +00:00
Thong Thai
45250d56fa vl/video_buffer: Set alpha swizzle if format has alpha
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41090>
2026-05-11 15:27:46 +00:00
Thong Thai
5c53e955ce pipe: Add PIPE_VIDEO_VPP_BLEND_MODE_PREMULTIPLIED_ALPHA
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41090>
2026-05-11 15:27:46 +00:00
Thong Thai
fa47f2ac8a gallium/auxiliary/vl: Fix typo in cs_create_shader pseudo-code comment
Fix typos in the size of proj, and chroma_proj, in the GLSL pseudo-code
comment portion of cs_create_shader.

Thanks Benjamin Cheng <benjamin.cheng@amd.com> for finding it.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41090>
2026-05-11 15:27:46 +00:00
squidbus
829130daad kk: Enable VK_(EXT/KHR)_robustness2 and VK_EXT_pipeline_robustness
Enable all functionality, and make consistent use of non-EXT enum definitions.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41313>
2026-05-11 15:12:47 +00:00
squidbus
cccf953545 kk: Support nullDescriptor
Add handling for null images and vertex inputs.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41313>
2026-05-11 15:12:47 +00:00
squidbus
0c9dfa90f9 kk: Support robustBufferAccess2
Add missing vertex input robustness 2 behavior and advertise.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41313>
2026-05-11 15:12:46 +00:00
Marek Olšák
23f7c87e3e amd/tools: rewrite ac_print_tiling_layouts to print all layouts, including XORs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Instead of expecting just 1 address bit to be flipped by 1 coordinate bit,
expect any address bits to be flipped by 1 coordinate bit. If multiple
coordinate bits flip the same address bit, that means all those coordinate
bits are XOR'd.

v2: also print 128bpp

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41431>
2026-05-11 13:46:41 +00:00
Marek Olšák
e471e83a65 winsys/amdgpu: fix memory leaks when amdgpu_cs_create fails
amdgpu_cs_destroy must execute with non-NULL.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41429>
2026-05-11 13:18:32 +00:00
Marek Olšák
d999e36eda winsys/amdgpu: revert invalid changes from CS functions
It may have been accidentally left in the code.

If there is any doubt about this, then the reason is the same
as accepting screen=NULL in context_create or any other function.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41429>
2026-05-11 13:18:32 +00:00
Pavel Ondračka
5e698f8369 r300: drop TEX2/TXB2/TXL2 dead path from ntr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41467>
2026-05-11 12:30:04 +00:00
Pavel Ondračka
4f994350ab r300: drop opcode paths lowered before emission from ntr
A handful of the ntr_emit_*/op_map entries fire opcodes the RC
backend doesn't understand because the matching NIR ops are always
lowered before nir_to_rc runs

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41467>
2026-05-11 12:30:04 +00:00
Pavel Ondračka
e1b042d2d7 r300: drop GLSL 4.x interpolation intrinsics from ntr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41467>
2026-05-11 12:30:04 +00:00
Pavel Ondračka
085cb55f96 r300: drop the i915g vertex_id/instance_id U2F branch from ntr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41467>
2026-05-11 12:30:03 +00:00
Pavel Ondračka
9b1587f588 r300: drop unsupported sampler dimensions from ntr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41467>
2026-05-11 12:30:03 +00:00
Pavel Ondračka
1c6e2a8625 r300: drop GLSL 4.x texture ops from ntr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41467>
2026-05-11 12:30:03 +00:00
Pavel Ondračka
a2d70557d5 r300: drop framebuffer fetch handling from ntr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41467>
2026-05-11 12:30:02 +00:00
Pavel Ondračka
489f30bf36 r300: drop GS/tess and load_draw_id support from ntr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41467>
2026-05-11 12:30:02 +00:00
Pavel Ondračka
74d47e46b6 r300: drop multiple ubo support from ntr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41467>
2026-05-11 12:30:02 +00:00
Pavel Ondračka
2fd679e127 r300: drop unused input arrays from ntr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41467>
2026-05-11 12:30:01 +00:00
squidbus
279669c0a0 kk: Support VK_EXT_post_depth_coverage
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Requires slightly different declaration of sample mask input.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41283>
2026-05-11 12:06:07 +00:00
squidbus
0df9ba3033 kk: Fix handling of sample mask and sample rate shading
Sample mask should only be limited to current sample bit when using
sample rate shading, and sample shading flag in multisample state
should be considered.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41283>
2026-05-11 12:06:07 +00:00
squidbus
1591e67a93 kk: Split per-draw data to separate binding
Instead of dirtying the root buffer and re-uploading the whole thing for each
draw where a per-draw value like the draw ID is changed, use a smaller
secondary buffer for per-draw data. We can also skip flushing state for every
indiviual batched draw and just flush once for the whole draw command.

This may also be useful in the future for handling how sized index buffers from
maintenance5 and null index buffers from maintenance6 work with robustness2,
allowing us to pass through indexed draw parameters and lower the index buffer
read into the shader with bounds checks.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41399>
2026-05-11 11:27:02 +00:00
squidbus
20d1fdf7eb kk: Enable VK_EXT_multi_draw
Issues a draw for each entry, reusing as much setup as possible.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41399>
2026-05-11 11:27:02 +00:00
llyyr
e95626b62a radeonsi: don't init screen state functions twice
`si_init_gfx_screen` already initializes screen state functions, so
avoid doing it twice. This was regressed by d1c57f742e.

Detected by LSan when applications using vaapi exit.

Fixes: d1c57f742e ("radeonsi/gfx: add si_gfx_screen.c")

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: llyyr <llyyr.public@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41442>
2026-05-11 11:08:42 +00:00
Pierre-Eric Pelloux-Prayer
3c2ac80048 gallium/u_blitter: remove unused skip_viewport_restore
Unused since https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40634

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41415>
2026-05-11 10:44:55 +00:00
squidbus
6cd9877ac9 kk: Support VK_(KHR/EXT)_index_type_uint8
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Simple implementation which takes advantage of poly geometry unrolling.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41333>
2026-05-11 10:28:34 +00:00
squidbus
ef6a6f28a8 kk: Fix geometry unroll for list primitives.
List primitives would be handled by geometry unroll as if restart is always
enabled, telling the unroll shader to restart the primitive at the usual
restart index. This would produce invalid geometry for list primitives where
restart is disabled and the restart index is used as a valid index.

Instead, always force the restart index for unrolling to UINT32_MAX when
restart is disabled, and refactor the index promotion logic accordingly.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41333>
2026-05-11 10:28:34 +00:00
squidbus
2182160370 kk: Enable remaining subgroup operations
All operations are now functioning properly in CTS tests.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41186>
2026-05-11 09:50:28 +00:00
squidbus
a6352a504f kk: Support subgroup rotate ops
Rotate is native, clustered rotate is lowered to shuffle since MSL's rotate
does not support clustering.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41186>
2026-05-11 09:50:28 +00:00
squidbus
2cd9dd1fd7 kk: Fix emitting negative infinity
Fixes subgroup max tests, which use -INFINITY as a base when
calculating the reference maximum value.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41186>
2026-05-11 09:50:28 +00:00
squidbus
0bc87e47e2 kk: Expand workaround 3 to cover general use of ballot/vote ops
simd_ballot/quad_any/quad_all (and probably simd_any/simd_all) appear to
generally be broken within conditional blocks, not just with simd_is_first.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41186>
2026-05-11 09:50:27 +00:00
squidbus
5b34d1ff34 nir: Only attempt subgroups lower_boolean_reduce for single component.
lower_boolean_reduce only works if the number of components is 1, and even
asserts on this in its prologue. Otherwise, given a boolean vector type, it
may produce output using ballot/vote with a boolean vector input.

Acked-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41186>
2026-05-11 09:50:27 +00:00
Jose Maria Casanova Crespo
8bd7f1d44b v3dv: include mem_offset in vkCmdFillBuffer destination
v3dv_CmdFillBuffer was passing only the user-supplied dstOffset to
meta_fill_buffer, ignoring the destination VkBuffer's mem_offset.
When several VkBuffers share one VkDeviceMemory at different offsets
(sub-allocation) the fill landed on whichever VkBuffer was
bound at offset 0 of the memory object instead of the requested one.

Fixes: 5ed78d91fe ("v3dv: implement vkCmdFillBuffer")
Assisted-by: Claude Opus 4.7
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41436>
2026-05-11 10:49:20 +02:00
Lionel Landwerlin
7d3b62e13d anv: only load fp64 software shader when needed
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: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14665
Reviewed-by: Allen Ballway <ballway@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39341>
2026-05-11 08:27:14 +00:00
Lionel Landwerlin
beb0ffc069 anv: sweep the NIR fp64 shader before keeping it on the device
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Allen Ballway <ballway@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39341>
2026-05-11 08:27:14 +00:00
Lionel Landwerlin
19997bc245 blorp: only request fp64 shader on when required
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Allen Ballway <ballway@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39341>
2026-05-11 08:27:14 +00:00
Lionel Landwerlin
91cf85906b blorp: stop requesting the fp64 shader for ELK
Drivers using blorp on ELK platforms don't need the special
color->depth conversion path that needs 64bit floating point math.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Allen Ballway <ballway@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39341>
2026-05-11 08:27:14 +00:00
Valentine Burley
2c4ed4f90d ci: Add missing rule for new trace replay config files
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41443>
2026-05-11 08:02:05 +00:00