Commit graph

73558 commits

Author SHA1 Message Date
Pavel Ondračka
6cb04bb791 r300/ci: run EGL deqp tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41517>
2026-05-12 21:52:34 +00:00
Eric Engestrom
1f5a54a289 zink+nvk/ci: update expected fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41515>
2026-05-12 19:01:58 +00:00
Jesse Natalie
7931dd09ba va: Wrap assert-only code in NDEBUG
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41445>
2026-05-12 15:44:25 +00:00
Marek Olšák
f4f3326fa2 radeonsi: handle any size of shader args in the LLVM PS prolog
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this will be needed for perspective-correct interpolation at offset/sample

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
b0df142b93 radeonsi: stop using TGSI definitions for interpolation
define our own

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
2fe4c47a21 radeonsi: simplify get_interp_info_from_input_load
it's only used for color inputs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
38cea8334e radeonsi: declare prolog LINEAR_SAMPLE/CENTER VGPRs only if used
Small PS have their VGPR usage equal to the number of input VGPRs,
and this reduces it.

4 input VGPRs removed in most cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
cfc9038a3d radeonsi: declare prolog LINE_STIPPLE_TEX_ENA VGPR only if needed
Small PS have their VGPR usage equal to the number of input VGPRs,
and this reduces it.

1 input VGPR removed from the PS prolog in most cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:46 +00:00
Marek Olšák
e6db0492f6 radeonsi: declare prolog ANCILLARY & SAMPLE_COVERAGE VGPRs only if used
Small PS have their VGPR usage equal to the number of input VGPRs,
and this reduces it.

2 input VGPRs removed from the PS prolog in most cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
280f8e6ab5 aco,radeonsi: declare prolog CENTROID VGPRs only if used
Small PS have their VGPR usage equal to the number of input VGPRs,
and this reduces it.

4 input VGPRs removed in most cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
5126258f55 aco,radeonsi: don't forward LINE_STIPPLE_TEX_ENA VGPR from the PS prolog
It's unused. This frees 1 VGPR in the prolog for temps.

This only affects radeonsi.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
e50b114d25 radeonsi: move SI_SPI_PS_INPUT_ADDR_FOR_PROLOG into a helper function
it will be dynamic

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
c488d02c5e ac: add ac_shader_args::line_stipple_tex_ena
for later use

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
7376c311c4 radeonsi: use shader_info::fs::uses_sample_shading for ac_nir_lower_ps_early
This was missing and it slightly improves code generation.
8 is always correct with maximum sample shading.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
b63f866c84 radeonsi: remove dead get_frag_coord_from_pixel_coord optimization
It's applied unconditionally by ac_nir_lower_ps_early. It was probably
replaced by that at some point.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
c9c0dce948 aco,radeonsi: use enums for color barycentrics instead of input VGPR indices
The VGPR indices will be dynamic. This replaces hardcoded VGPR indices
with enums in the PS prolog key.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
97660e91b5 ac,radeonsi: add helpers to print SPI_SHADER_COL/Z_FORMAT
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
1c76351aee ac,radeonsi: add a helper to print PS input VGPR layout
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
5e6952307d radeonsi: fix a typo in si_shader_update_spi_shader_formats
The failure is reproducible with:
    AMD_DEBUG=mono piglit/bin/fbo-drawbuffers-none use_frag_out -auto -fbo

Fixes: 88986dcc9c - radeonsi: account for outputs_written when updating spi_shader_col_format

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +00:00
Marek Olšák
933b25b0b6 nir: add an option to ignore INTERP_MODE_NONE in nir_shader_gather_info
Color interpolation (INTERP_MODE_NONE) has unknown barycentrics
and it could be flat shading at runtime.

It's a problem when shader_info is expected to match what's actually
used.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41226>
2026-05-12 14:13:45 +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
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
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