Commit graph

72340 commits

Author SHA1 Message Date
Eric Engestrom
93390d4b73 vk/runtime,zink: only integrate renderdoc on supported platforms
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It is not actually available to all the platforms mesa can be compiled
to, so let's keep an opt-in list of supported platforms instead, and
compile it out on all other platforms.

Fixes: 48a0478126 ("zink: add renderdoc handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39176>
2026-01-07 09:08:46 +00:00
Marek Olšák
0b7ee3b981 ALL: use #define and a copy helper to check and copy build_id
preparation for changing SHA1_DIGEST_LENGTH to BLAKE3_KEY_LEN

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Marek Olšák
1912a00a91 ALL: use SHA1_DIGEST_LENGTH etc. instead of hardcoding the numbers
only build_id is switched to use literal 20 instead of SHA1_DIGEST_LENGTH
because we will increase SHA1_DIGEST_LENGTH to BLAKE3_KEY_LEN

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Ian Forbes
58303e5d2d svga: Set modifier in surface_get_handle
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Without this hardware cursors will not work on wlroots based compositors.
Only MOD_LINEAR is supported by the device.

Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39168>
2026-01-06 22:06:44 +00:00
Marek Olšák
13cfd0176c ac/gpu_info: add #define AMD_MEMCHANNEL_INTERLEAVE_BYTES
radeon_info::pipe_interleave_bytes is renamed to r600_pipe_interleave_bytes
where it can be 512 on some chips.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39120>
2026-01-06 20:32:10 +00:00
Jesse Natalie
99cc0d4fdd d3d12: Don't use D3D12 B8G8R8X8 format
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39179>
2026-01-06 19:00:16 +00:00
Gurchetan Singh
65c2dc5a63 gallium/tessellator: fix -Wmissing-prototype issues
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise, issues like:

tessellator/tessellator.cpp:385:1:
note: declare 'static' if the function is not intended to be used
      outside of this translation unit
  385 | FXP floatToFixed(const float& input)
      | ^
      | static

are observed.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>

v3: add declaration for GetMSB since it's unused but desirable to keep

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39162>
2026-01-06 15:29:15 +00:00
José Roberto de Souza
f52af98dd8 iris: Add support to DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38425>
2026-01-06 06:40:13 -08:00
Samuel Pitoiset
59dc20262c ac/perfcounter: rename ac_pc_block::num_instances to num_scoped_instances
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39155>
2026-01-06 11:43:21 +00:00
Tapani Pälli
4ac7bbb1d1 crocus: make sure we have at least 1x1 surface to create null surf
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise we will have width of -1 later in null_fill_state_s.

Fixes: 2eb45daa9c ("gallium: de-pointerize pipe_surface")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38872>
2026-01-06 07:15:47 +00:00
Dave Airlie
04071c5f9a zink: use device select layer settings to disable device selection
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In the case where we have a device that we want to choose after
probing, there is no point in asking the device select layer to do
any reordering at all.

This helps avoid a deadlock inside compositors where we don't need
device selection anyways.

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38252>
2026-01-05 23:51:26 +00:00
Jesse Natalie
d9d33b7c96 d3d12: Fix resolving global state vs per-context state with promotion
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39077>
2026-01-05 23:25:21 +00:00
Jesse Natalie
43ed15a61b d3d12: Don't promote to read-write states
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39077>
2026-01-05 23:25:21 +00:00
Jesse Natalie
bbd16fdf05 d3d12: Ensure that flush_resource causes batches to get flushed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39077>
2026-01-05 23:25:21 +00:00
Jesse Natalie
d9997c97be d3d12: Assert that there's no front buffer writes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39077>
2026-01-05 23:25:21 +00:00
Jesse Natalie
86587517b2 d3d12: Decay state when resolving context -> global state
Also ensure that *all* promotions are considered promotions, not
just ones that combine with an existing state bit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39077>
2026-01-05 23:25:20 +00:00
Jesse Natalie
fe48cd7c5a d3d12: Allow state promotion for non-simultaneous access textures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39077>
2026-01-05 23:25:20 +00:00
Jesse Natalie
7f058c4740 wgl/d3d12: Return success based only on Present return
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39077>
2026-01-05 23:25:19 +00:00
Jesse Natalie
21e5d19f9e wgl: Only swap back and front buffers after a successful present
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39077>
2026-01-05 23:25:19 +00:00
Jesse Natalie
2805822141 wgl: Support contexts created from non-window DCs
Store the original HDC along with the HWND if we can get an HWND. If we
have the HWND, then the original HDC is basically useless, but if we don't,
we can use the HDC as a lookup key for the framebuffer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39077>
2026-01-05 23:25:19 +00:00
Marek Olšák
fe45960b8a radeonsi: fix clip/cull distance gathering for mesh shaders
clipdist_mask was always 0. Just merge the codepaths to reuse what we
have for VS/TES/GS.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39147>
2026-01-05 22:58:36 +00:00
Marek Olšák
cf333ae9a2 radeonsi: fix incorrect PS shader key with sample shading
discovered when writing a sample shading test

Fixes: 65398d571b - radeonsi: ignore pipe_rasterizer_state::force_persample_interp

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39147>
2026-01-05 22:58:36 +00:00
Marek Olšák
c49d1bbea9 radeonsi: fix slightly incorrect assertions in si_shader_ps
Fixes: 5be9d76861 - radeonsi: fix an assertion failure in si_shader_ps with AMD_DEBUG=mono

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39147>
2026-01-05 22:58:36 +00:00
Marek Olšák
07265681fb radeonsi: remove the PointSize output if it has no effect
GL_VERTEX_PROGRAM_POINT_SIZE disables the output. This removes it from
shaders to reduce HW overhead.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39147>
2026-01-05 22:58:36 +00:00
Alyssa Rosenzweig
347a0ac212 panfrost,nir: drop my lonely Authors tags
We all know who wrote a bunch of Panfrost code. No need to repeat this a million
places, the copyright line is plenty.

in cases where there's a joint me & Italo/Eric/.. tag, i've left it alone to
respect others' potential wishes.

$ find . -type f -exec perl -i -p0e 's/ \*\s+\* Author[^\n]+\s+\*\s+Alyssa[^\n]+\n \*\// \*\//' \{} \;

v2: delete more tags (Boris).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39136>
2026-01-05 17:47:52 +00:00
Pohsiang (John) Hsu
aba2bb4a16 mediafoundation: handle the case where output sample is returning after MFT has been released.
we can't use pipe object in stat pool on shutdown, because the pipe object is released when the MFT is released.
For async sink (i.e mp4 sinkwriter), the output samples can be returning after HMFT is released.

Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39131>
2026-01-05 16:47:45 +00:00
Anna Maniscalco
6a68542167 zink: fix use_reusable_pool condition
The code originally disabled reuse whenever a pNext was passed to
`bo_create_internal`, however code has been added before it that messed
with the pointer disabling it more often that necessary.

Rearrange code to restore the original check.

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39008>
2026-01-05 16:19:00 +00:00
Pavel Ondračka
7abe0363c7 r300: invalidate texture cache when clearing texture bound for sampling
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: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38842>
2026-01-05 10:32:18 +00:00
Pavel Ondračka
07f8729361 r300: add explicit late lowering for a + -0
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
(('fadd', a, 0.0), a) worked for both a + 0 and a + -0 before, but now
requires explicit pattern after 0d255011ae

Just noticed because it pushed few dEQPs over the instruction limit.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39151>
2026-01-04 19:45:45 +00:00
Eric Engestrom
ee5e6245ce zink+nvk/ci: document fixed tests
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/39150>
2026-01-04 12:40:12 +01:00
Eric Engestrom
3533853566 lavapipe/ci: document recent flakes
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/39140>
2026-01-03 16:27:56 +00:00
Eric Engestrom
c63732463a radv/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39140>
2026-01-03 16:27:56 +00:00
Marek Olšák
d0dd5a5f57 ac,radeonsi: move SX PS downconversion code into ac_formats.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39093>
2026-01-02 16:46:20 +00:00
Marek Olšák
2674cd1c05 radeonsi: fix halved pixel throughput for a few non-blended 16bpp/32bpp formats
Fixed formats:
* GL_R16F
* GL_RG16F
* GL_RGB10_A2UI

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39093>
2026-01-02 16:46:20 +00:00
Job Noorman
9fbb202172 tu,freedreno: add chicken bit to enable (eolm)
(eolm) does not have any effect without this chicken bit set.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31885>
2026-01-02 14:08:48 +01:00
Marek Olšák
27dcc2b949 rusticl: call nir_opt_intrinsics
required by radeonsi

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:29 +00:00
Marek Olšák
b72b313d1d radeonsi: move info fields from si_shader_selector to si_shader_info
also move the code into si_shader_info.c

si_shader_info::msaa_images becomes unused, so is removed.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:29 +00:00
Marek Olšák
3f23421dc5 radeonsi: remove si_shader_selector::*_descriptors_index fields
They are trivial to compute.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:29 +00:00
Marek Olšák
f00f054087 ac,radeonsi: move lowering to load_color0/1 to ac_nir_lower_ps_early
It's better to have these all in one pass.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:29 +00:00
Marek Olšák
99a42bdd4b nir,radeonsi: simplify load_color0 & load_color1 intrinsics and shader_info
We don't need the shader_info fields anymore. sample and centroid fields
are unused. The interp field is already available from
si_shader_info::color_interpolate.

The loads don't need to be sysvals. Add also the _amd suffix.

Don't handle it in st_nir_lower_drawpixels either because the intrinsics
are created much later in compilation now.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:28 +00:00
Marek Olšák
86fc413098 radeonsi: merge 2 PS color input lowering passes for monolithic shaders
si_nir_lower_color_inputs_to_sysvals is mostly undone by
si_nir_lower_ps_color_inputs.

Merge them into a new pass si_nir_lower_color_flatshade_twoside, which
surprisingly doesn't need si_shader_info.

si_nir_lower_color_inputs_to_sysvals will continue to be used
by non-monolithic shaders.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:28 +00:00
Marek Olšák
80c26d3aec radeonsi: call si_nir_lower_color_inputs_to_sysvals in si_preprocess_nir
si_shader_info gathering must be rewritten for colors because it no longer
receives load_color0/1 intrinsics. This makes radeonsi handle color inputs
more like all other drivers.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:27 +00:00
Marek Olšák
04047f0df6 radeonsi: remove the rest of si_lower_nir
st/mesa already calls all these passes.

Only our passthrough TCS was missing one pass.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:27 +00:00
Marek Olšák
d8f8b57686 radeonsi: move more lowering from si_lower_nir to si_preprocess_nir
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:27 +00:00
Marek Olšák
81adf1ea71 radeonsi: remove glsl_tests subdirectory
This hasn't been used for 9 years.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:26 +00:00
Marek Olšák
041cde6aa1 radeonsi: move sparse intrinsic lowering to a separate file, call it later
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:26 +00:00
Marek Olšák
2dc16ccb8f radeonsi: lower task & mesh shader IO is si_preprocess_nir
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:26 +00:00
Marek Olšák
9d271d171a radeonsi: call nir_lower_gs_intrinsics in si_preprocess_nir
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:25 +00:00
Marek Olšák
f2947e2fd8 radeonsi: use ac_nir_opt_vectorize_cb
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:25 +00:00
Marek Olšák
a32a189386 radeonsi: call nir_opt_16bit_tex_image in si_postprocess_nir
It's slightly changed and some cleanup passes are run afterwards
to do exactly what RADV does.

We also have to call nir_lower_alu_width, otherwise ACO fails.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38802>
2026-01-01 18:30:24 +00:00