Commit graph

222337 commits

Author SHA1 Message Date
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
Valentine Burley
2d453911f8 mr-label-maker: Add 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
Georg Lehmann
421d1be560 radv/ci: update restricted trace checksums
Having a job that can't be run manually sure is great.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41443>
2026-05-11 08:02:05 +00:00
Hyunjun Ko
ff3e0ec5f4 anv/video: fix up H.264/H.265 encode session parameters to match advertised caps
Initially, this is to fix an issue when apps set wrong ctb sizes.
In addition to it, we need to align things with advertised caps.
This is inspired by radv.

The relevant discussion is here:
https://github.com/KhronosGroup/Vulkan-Video-Samples/pull/169

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/41433>
2026-05-11 07:12:33 +00:00
Samuel Pitoiset
5a95658fa8 radv: do not fallback to compute for image->buffer copies with emulated formats
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This shouldn't be necessary because SDMA can detile the image just fine,
only buffer->image and image->image need to fallback.

It just works on GFX10+ because RADV is using NBC views, and I think
it works on eg. VEGA10 just by luck due to different
swizzles/alignments.

Fixes: 3d803d7a2e ("radv: Use compute copy for emulated formats")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41384>
2026-05-11 06:05:44 +00:00
Erico Nunes
d8e50619ab ci: lima farm maintenance
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: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41466>
2026-05-10 18:28:11 +02:00
Caio Oliveira
46cd7b6e28 brw: Move brw_prog_data_init to a different file
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The generator code will be reworked, remove this unrelated
function from there.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41458>
2026-05-10 00:07:15 +00:00
Caio Oliveira
2273533504 brw: Fix some indentation in brw_generator.cpp
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Will reduce noise in later changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41459>
2026-05-09 16:40:32 -07:00
Caio Oliveira
b1c3e36fe3 intel/dev: Expose list of known platform names
Acked-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41007>
2026-05-09 22:00:54 +00:00