Commit graph

73534 commits

Author SHA1 Message Date
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
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
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
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
Emma Anholt
9771283c61 zink/ci/tu: Fix up skips/xfails for GLCTS testcases that got divided up.
KHR-Single-GL46.arrays_of_arrays_gl.SubroutineFunctionCalls2 subtests
pass, but some are slow and we keep skipping them.

copy_image.* now takes 2:30 of runtime on my T14s and has some interesting
fails in rgb9e5, though a750 CI seems to pass.

texture_swizzle.functional* now takes 6.5s of runtime on my T14s.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41245>
2026-05-09 13:56:44 -07:00
Mike Blumenkrantz
41a3213dca zink: remove remaining maint5 checks
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this is required now

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41444>
2026-05-08 19:10:31 +00:00
Mike Blumenkrantz
3c3379d55f zink: delete zink_resource_object::storage_buffer
no longer used

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41444>
2026-05-08 19:10:31 +00:00
Mike Blumenkrantz
cac48876e0 zink: use maintenance5 to more effectively set storage texel usage for bufferviews
this simplifies the bufferviews so there is only ever a single buffer/view
for the corresponding resource

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41444>
2026-05-08 19:10:31 +00:00
Dmitry Baryshkov
3eb50679bb rusticl: enable freedreno by default
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Having the RustiCL on FD8xx pass the CTS tests, enable freedreno by
default.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40072>
2026-05-08 16:38:11 +00:00
Georg Lehmann
1716cbff37 nir,amd: reassociate fadd to create more fma/mad
ACO's backend fusing is quite competent, but it cannot reorder adds.
This adds a simple algebraic pass to do that for us.

Foz-DB Navi10:
Totals from 13568 (18.76% of 72319) affected shaders:
MaxWaves: 304722 -> 304004 (-0.24%); split: +0.10%, -0.33%
Instrs: 15084252 -> 14993010 (-0.60%); split: -0.61%, +0.00%
CodeSize: 81480188 -> 81372600 (-0.13%); split: -0.17%, +0.04%
VGPRs: 741580 -> 743680 (+0.28%); split: -0.10%, +0.38%
SpillSGPRs: 9418 -> 9434 (+0.17%)
Latency: 154602014 -> 154312940 (-0.19%); split: -0.29%, +0.10%
InvThroughput: 44628554 -> 44442595 (-0.42%); split: -0.47%, +0.05%
VClause: 300035 -> 300054 (+0.01%); split: -0.31%, +0.31%
SClause: 370992 -> 370640 (-0.09%); split: -0.15%, +0.06%
Copies: 1162401 -> 1162800 (+0.03%); split: -0.30%, +0.33%
Branches: 300646 -> 300654 (+0.00%); split: -0.00%, +0.01%
PreSGPRs: 673675 -> 675057 (+0.21%); split: -0.00%, +0.21%
PreVGPRs: 633017 -> 634768 (+0.28%); split: -0.29%, +0.57%
VALU: 10800351 -> 10712041 (-0.82%); split: -0.82%, +0.00%
SALU: 1752917 -> 1753203 (+0.02%); split: -0.04%, +0.06%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41348>
2026-05-08 11:49:43 +00:00
Erik Faye-Lund
e714e2f88d panfrost: enable ARB_texture_query_lod on v9+
We've been reporting in features.txt that we support this extension
unconditionally, but we didn't. Now that we have the bits wired up due
to Vulkan, we can actually enable it on Bifrost and later.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34339>
2026-05-08 09:45:39 +00:00
David Rosca
50a56b64d1 pipe/video: Remove unused PIPE_VIDEO_CAP_STACKED_FRAMES
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
2026-05-08 07:57:55 +00:00
David Rosca
0c66811bb8 pipe/video: Remove unused PIPE_VIDEO_CAP_MAX_LEVEL
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
2026-05-08 07:57:54 +00:00
David Rosca
78c9580808 pipe/video: Remove unused PIPE_VIDEO_CAP_NPOT_TEXTURES
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
2026-05-08 07:57:53 +00:00
David Rosca
7437ee8550 pipe/video: Remove unused PIPE_VIDEO_CAP_PREFERRED_FORMAT
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
2026-05-08 07:57:53 +00:00
David Rosca
b91ad4a4e5 vl: Don't check npot textures support when creating buffers
This is the only place where PIPE_VIDEO_CAP_NPOT_TEXTURES is used,
but all video drivers supports npot textures.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
2026-05-08 07:57:53 +00:00
David Rosca
16a2aeeb93 vl: Use NV12 as deint format instead of preferred format
This is the last place where PIPE_VIDEO_CAP_PREFERRED_FORMAT is being
used, and all drivers return NV12 here anyway.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
2026-05-08 07:57:53 +00:00
Peyton Lee
2282220fec radeonsi: gate format and rotate/flip support by VPE version
Determine support for image formats and rotate/flip capabilities based on the detected VPE version.

Signed-off-by: Peyton Lee <peytolee@amd.com>
2026-05-08 14:56:45 +08:00
Peyton Lee
597fe16e87 frontends/va: add ABGR format mappings
Add format mappings between VA FourCC and pipe_format for ABGR.

Signed-off-by: Peyton Lee <peytolee@amd.com>
2026-05-08 14:56:24 +08:00
Mike Blumenkrantz
45706d39ea ci: stop skipping HIC tests on lavapipe
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/41424>
2026-05-07 19:05:52 +00:00
Tapani Pälli
c6f503bed6 iris: use INTEL_NEEDS_WA_14025112257 define for workaround
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41281>
2026-05-07 16:20:29 +00:00
Faith Ekstrand
dd2d30656d panfrost: Handle pre-Valhall images and texel buffers in lower_res_indices
There's no point in having these as separate passes that live in the
compiler.  We already have lower_res_indices(), which is panfrost's
equivalent to panvk's descriptor lowering.  We can just do it there.

Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Faith Ekstrand
d0bdd18212 panfrost: Prefix valhall bits of lower_res_indices
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Faith Ekstrand
4412f3bad7 panfrost: Take texture/sampler_index into account in lower_res_indices
We currently rely on nir_lower_tex_options::lower_index_to_offset but
there's really no reason for this.  Our pan_nir_res_handle() helper can
already take both an immediate and a dynamic index.

Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41320>
2026-05-07 13:11:08 +00:00
Pierre-Eric Pelloux-Prayer
61acf0e781 radeonsi: add tests subfolder and move AMD_TEST code inside
And move the exit(0) code to the si_tests function.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:21 +02:00
Pierre-Eric Pelloux-Prayer
61ae8f60d1 radeonsi/gfx: move static inline helpers to si_gfx.h
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:19 +02:00
Pierre-Eric Pelloux-Prayer
b833aeb9de radeonsi/gfx: remove unnecessary u_stub usage
Everything inside the gfx folder isn't built when HAVE_GFX_COMPUTE
isn't present so we don't need to stub these methods.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:17 +02:00
Pierre-Eric Pelloux-Prayer
4c080ae32e radeonsi: move function prototypes from si_pipe.h to si_gfx.h
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:15 +02:00
Pierre-Eric Pelloux-Prayer
714d3eb0b4 radeonsi: move more code to gfx subfolder
Anything related to shaders, compute, mesh, nir should be inside
this folder.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:09 +02:00
Pierre-Eric Pelloux-Prayer
79b09571bb radeonsi: move all multimedia files to mm
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:08 +02:00
Pierre-Eric Pelloux-Prayer
e4def8a61c radeonsi: add si_context.c
And move out most si_context code to the new file.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:06 +02:00
Pierre-Eric Pelloux-Prayer
b2db3e1ddc radeonsi: add si_gfx_context.c and move code from si_pipe.c
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:04 +02:00
Pierre-Eric Pelloux-Prayer
a335f4be7a radeonsi/gfx: move code from si_get to si_gfx_screen
These functions can be moved to the gfx subfolder and made static.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:18:02 +02:00
Pierre-Eric Pelloux-Prayer
d1c57f742e radeonsi/gfx: add si_gfx_screen.c
And move code specific to gfx/compute from radeonsi_screen_create_impl there.

ac_init_llvm_once has to stay in si_pipe.c because it has to be called very
early to avoid conflicts with u_queue initialisation.

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41133>
2026-05-07 14:17:59 +02:00