Commit graph

219039 commits

Author SHA1 Message Date
Danylo Piliaiev
2b5b41bb24 tu: Fix double emission of PC_DS_CNTL due to missing break
Didn't cause any issues.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39890>
2026-02-24 15:21:50 +00:00
Danylo Piliaiev
47251b2e2d ir3: Align TCS per-patch output to 64 bytes to prevent stale reads
Empirically, TCS outputs have to be aligned to 64 bytes,
otherwise stale data may be read in rare cases. The exact
reason is not clear, but tests and proprietary driver behavior
strongly point at the need for 64 byte alignment.

Fixes tesselation issues in at least "Conan Exiles" but likely in many
more cases.

CC: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39890>
2026-02-24 15:21:50 +00:00
Erik Faye-Lund
e111422f7f pan/ci: correct syntax for flakes
These shouldn't have the result at the end, silly me.

Fixes: 6eeede8a52 ("pan/ci: add missing t720-flakes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40065>
2026-02-24 15:02:17 +00:00
osy
3f75aa3b75 kk: enable VK_KHR_external_{fence,semaphore}_fd
We only support VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT with
FD == -1.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39067>
2026-02-24 14:23:05 +00:00
osy
5f8a9f0aeb vulkan: external sync for vk_sync_binary
Venus uses vkImportSemaphoreFdKHR() with FD == -1 to signal a binary
semaphore and vkGetSemaphoreFdKHR() to wait on a binary semaphore.

Both KK and Dzn uses vk_sync_binary so supporting this special case for
import/export sync file will enable Venus host support.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39067>
2026-02-24 14:23:05 +00:00
Georg Lehmann
07260dc210 nir/lower_subgroups: lower shuffles and bitwise reduce to 32bit before scalarizing
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Pack/unpack should be a lot faster than duplicating the subgroup op.

No fossil-db changes, but multiple people complained about this to me.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40024>
2026-02-24 13:48:35 +00:00
Rhys Perry
613b4fe407 aco: resolve hazards before calls
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39825>
2026-02-24 13:20:55 +00:00
Rhys Perry
dfda890ae8 aco: reset all vgpr_used_by_vmem_ in resolve_all_gfx11
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39825>
2026-02-24 13:20:55 +00:00
Rhys Perry
72923ad2f0 aco: fix VALUReadSGPRHazard with s_call_b64/s_swappc_b64
This probably doesn't do anything because sgpr_read_by_valu are all set
already for raytracing shaders.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39825>
2026-02-24 13:20:54 +00:00
Benjamin Cheng
2bb26573e7 radv/video: Split cdf buffer and encode ctx
These resources are fundamentally different and should be treated as
such.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40050>
2026-02-24 12:29:25 +00:00
Christian Gmeiner
8dc8a2eec4 panvk: Support VK_EXT_legacy_dithering
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Wire up the existing Panfrost dithering infrastructure to the Vulkan
extension. The library already supports dithered formats via
pan_dithered_format_from_pipe_format(), so this plumbs the
VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag through to the blend
descriptor emission and color attachment internal conversion paths.

Dithering is only applied to color attachments, not depth or framebuffer
preloads.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39781>
2026-02-24 11:34:19 +00:00
Samuel Pitoiset
755cb6cb75 radv: fix independent sets with dynamic buffers and GPL
If a set layout is missing the driver can't compute the dynamic buffer
start offsets correctly. The only solution is to load these offsets from
an user SGPR.

To avoid adding more complexity, these offsets are re-emitted every
time dynamic buffers are dirty. That shouldn't matter because the
combination of dynamic buffers and independent sets is just super rare.

This fixes new VKCTS coverage
dEQP-VK.pipeline.pipeline_library.graphics_library.independent_sets_random.*.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39988>
2026-02-24 11:12:14 +00:00
Georg Lehmann
c6e1c23faf radv: expose VK_VALVE_shader_mixed_float_dot_product on supported hardware
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In practice this means Vega20, Navi14, and RDNA2+.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40003>
2026-02-24 08:55:53 +00:00
Georg Lehmann
892274d20d ac/llvm: implement mixed float dot
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40003>
2026-02-24 08:55:53 +00:00
Georg Lehmann
dd067088ef aco: allow dpp for fp8/bf8 dot4
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40003>
2026-02-24 08:55:53 +00:00
Georg Lehmann
a033cd95a4 aco: allow modifiers for fp16 dot
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40003>
2026-02-24 08:55:53 +00:00
Georg Lehmann
3238e64d3c aco/ra: create v_dot2c_f32_f16
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40003>
2026-02-24 08:55:53 +00:00
Georg Lehmann
237b8ca205 aco: mixed float dot product opcodes
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40003>
2026-02-24 08:55:52 +00:00
Georg Lehmann
4dc0f7d540 spirv: implement SPV_VALVE_mixed_float_dot_product
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40003>
2026-02-24 08:55:52 +00:00
Georg Lehmann
0d6fe16ce8 nir: add mixed float dot opcodes
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40003>
2026-02-24 08:55:52 +00:00
Georg Lehmann
d870d10ad9 vulkan,spirv: update headers
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40003>
2026-02-24 08:55:52 +00:00
Tapani Pälli
d2351b3d04 util: bring back fix to avoid strict aliasing bugs in xxhash
This is commit b9e163fa67 that got lost in xxhash upgrade 070bf8986c.

Fixes graphics artifacts seen in multiple workloads with Intel driver
when using clang compiler.

Fixes also CTS tests:

 dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_cubemap
 dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_3d
 dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_2d_array
 dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_2d_multisample_array

v2: pass arguments from meson.build instead of hardcoding
    (Eric Engestrom)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14684
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14107
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13895
Fixes: 070bf8986c ("util: Upgrade xxhash.h to v0.8.3")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39730>
2026-02-24 08:17:13 +00:00
Samuel Pitoiset
06949b74eb radv: suspend/resume dynamic rendering completely
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The Vulkan spec says:
    "The contents of pRenderingInfo must match between suspended
     render pass instances and the render pass instances that resume
     them, other than the presence or absence of the0
     VK_RENDERING_RESUMING_BIT, VK_RENDERING_SUSPENDING_BIT, and
     VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT flags. No
     action or synchronization commands, or other render pass
     instances, are allowed between suspending and resuming render
     pass instances. All pairs of resuming and suspending render passes
     must be submitted in the same batch. "

So it should be safe to avoid re-emitting the rendering state because
nothing can blow it up.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40004>
2026-02-24 07:33:28 +00:00
Samuel Pitoiset
e6523feed9 radv: handle the cache flush workaround for mips before emitting the fb
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40004>
2026-02-24 07:33:28 +00:00
Samuel Pitoiset
cc08a1594e radv: skip some redundant operations when rendering is resumed
No need to do it twice, and nothing can blow it up between
suspend/resume rendering operations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40004>
2026-02-24 07:33:28 +00:00
Samuel Pitoiset
d45586f1c0 radv: reserve CS space for the HiZ WA on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40004>
2026-02-24 07:33:28 +00:00
Samuel Pitoiset
ab6147e8ef radv/meta: fix depth/stencil resolves with different regions
This is possible since VK_KHR_maintenance10.

This fixes new VKCTS coverage in
dEQP-VK.pipeline.*.multisample.m10_resolve.*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39956>
2026-02-24 07:09:17 +00:00
Juan A. Suarez Romero
2fa85edd75 vc4/ci: update expected results
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: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40058>
2026-02-23 23:05:46 +00:00
Mike Blumenkrantz
e0a3f1bb8b ntv: ignore stuff for get_ssbo_size() in vulkan mode
this is only from GL

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40057>
2026-02-23 22:41:30 +00:00
Mike Blumenkrantz
9c09b8b968 ntv: also use base glsl type for non-zink array derefs
this matches the struct deref handling to avoid type mismatches

Fixes: e1855dc947 ("ntv: add basic vulkan support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40057>
2026-02-23 22:41:30 +00:00
Rob Clark
ff8b688fc7 nir: Fix validation error after nir_round_int_to_float()
CL CTS test_conversions hits a nir_validate assert than ufind_msb is 32b
or 64b:

    16     %61 = @load_global (%185) (access=none, align_mul=2, align_offset=0)
    32    %240 = ufind_msb %61 error: src_bit_size == 32 || src_bit_size == 64 (../src/compiler/nir/nir_validate.c:273)

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40054>
2026-02-23 22:06:50 +00:00
Pierre-Eric Pelloux-Prayer
85394f39e5 dri: prevent read_sbc from going backward
In some situations we can have multiple present queued
with the same target_msc and in this case we might get
the last one signaled before the previous ones. Here's
an example with some debug logs added to the relevant
functions:

loader_dri3_swap_buffers_msc: new send_sbc=2323 - target_msc=337
dri3_handle_present_event:    old recv_sbc=2322 msc=338 new_recv_sbc=2323
loader_dri3_swap_buffers_msc: new send_sbc=2324 - target_msc=338
dri3_handle_present_event:    old recv_sbc=2323 msc=338 new_recv_sbc=2324
loader_dri3_swap_buffers_msc: new send_sbc=2325 - target_msc=338
dri3_handle_present_event:    old recv_sbc=2324 msc=338 new_recv_sbc=2325
loader_dri3_swap_buffers_msc: new send_sbc=2326 - target_msc=338
loader_dri3_swap_buffers_msc: new send_sbc=2327 - target_msc=338
loader_dri3_swap_buffers_msc: new send_sbc=2328 - target_msc=338
dri3_handle_present_event:    old recv_sbc=2325 msc=338 new_recv_sbc=2327
loader_dri3_swap_buffers_msc: new send_sbc=2329 - target_msc=338
dri3_handle_present_event:    old recv_sbc=2327 msc=338 new_recv_sbc=2328
loader_dri3_swap_buffers_msc: new send_sbc=2330 - target_msc=338
dri3_handle_present_event:    old recv_sbc=2328 msc=338 new_recv_sbc=2329
loader_dri3_swap_buffers_msc: new send_sbc=2331 - target_msc=338
dri3_handle_present_event:    old recv_sbc=2329 msc=338 new_recv_sbc=2330
dri3_handle_present_event:    old recv_sbc=2330 msc=338 new_recv_sbc=2326 # oops
dri3_handle_present_event:    old recv_sbc=2326 msc=339 new_recv_sbc=2331

It's usually harmless, except if Mesa ends up using
loader_dri3_swapbuffer_barrier right after the out-of-order event.

In this example it's ok because more swaps are executed after 2330, so
waiting for read_sbc>=2330 would work anyway.
But if this wasn't the case, loader_dri3_swapbuffer_barrier would never
return, waiting for recv_sbc to become >= 2330 while it's stuck at 2326
because the later swaps were processed earlier.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39857>
2026-02-23 21:35:20 +00:00
Pierre-Eric Pelloux-Prayer
d616d9aed8 mesa/vbo: update NeedFlush before flushing
This prevents re-entering the flush if during the flush
of a context X we end up in vbo_exec_FlushVertices_internal.

I had this issue on one machine, with the following simplified
call sequence:

  glthread_unmarchash_batch
  ...
  vbo_exec_FlushVertices(ctxA)
  ...
  st_validate_state
  ...
  dri3_get_buffer
  loader_dri3_blit_context_get
  ...
  dri_destroy_context(ctxB)
  ...
  _mesa_make_current(ctxB)
  vbo_exec_FlushVertices(ctxA)

The last vbo_exec_FlushVertices would hit the assert checking
flush_call_depth == 1.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39857>
2026-02-23 21:35:20 +00:00
Faith Ekstrand
e166027e52 pan/ci: Mark couple of WSI crashes as flakes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I don't know why but these seem to fail only intermittantly now.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:17 +00:00
Faith Ekstrand
1f51daf309 panvk: Optimize resolves if possible
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:17 +00:00
Faith Ekstrand
22a98b2445 pan: Add a pan_format_supports_hw_blend() helper
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:17 +00:00
Faith Ekstrand
46f611c932 panvk: Also use resolve shaders for Z/S
As a side-effect, we're now also respecting storeOp for separate Z/S.
For interleaved, we still always store because interleaved is annoyingly
complicated.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:17 +00:00
Faith Ekstrand
b8de34da2b panvk: Use resolve shaders for color resolves
This massively improves the performance of the Sascha Willems
multisampling example:

 - With 2x MSAA: 590 -> 2605 (4.4x speedup)
 - With 4x MSAA: 347 -> 2570 (7.4x speedup)
 - With 8x MSAA: 188 FPS -> 2494 FPS (13.2x speedup)
 - With 16x MSAA: 96.7 FPS -> 2483 FPS (25.7x speedup)

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:17 +00:00
Faith Ekstrand
0d78b72f91 panvk: Respect storeOp for color attachments
The new framebuffer code properly handles attachments without a store
and the incremental rendering code doesn't rely on the store, either, so
we don't need to always store.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:17 +00:00
Faith Ekstrand
82ee60d375 panvk/frame_shaders: Add support for resolve shaders
This is mostly a matter of reworking the frame shader code to pull image
views from a temp struct instead of always reaching for the pan_fb_load.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:16 +00:00
Faith Ekstrand
d598424f80 panvk/frame_shaders: Only allow preload shaders to be killed
We already have this check for the JM back-end but the CSF back-end
based the choice on whether or not the shader is writing color which
isn't quite what we want.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:16 +00:00
Faith Ekstrand
72fb84c213 panvk/frame_shaders: Set modes in cmd_preload_*_attachments()
This makes cmd_emit_dcd() about actually emitting the DCD and moves the
bit that's operation-specific to the operation-specific function.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:16 +00:00
Faith Ekstrand
3fd9071070 panvk/frame_shaders: Set no_shader_depth/stencil_read
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:16 +00:00
Faith Ekstrand
ae2fc52cfd panvk: Move cmd_fb_preload to cmd_frame_shaders
Also rename some stuff internally to stop using the word "preload".

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:16 +00:00
Faith Ekstrand
aacbfc9da2 panvk: Always set pan_fb_layout.rt_count to at least 1
Instead of having the pan_fb code have to `max(rt_count, 1)` add then
constantly be doing the same in the driver, just make the condition an
assert and do the `max(colorAttachmentCount, 1)` up-front.  This way
we're not constantly worried if everyone has the same count or not.  The
pan_fb code will handle having an empty render target just fine.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:15 +00:00
Faith Ekstrand
fee3c420b3 panvk/meta: Set color_attachment_count based on bound attachments
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:15 +00:00
Faith Ekstrand
1b2fe6831a pan/fb: Add a concept of resolve ops and resolve shaders
The resolve sits between the render pass and the write at the end.  This
adds the resolve ops themselves, support in the shader builder for
building the post-frame shaders to handle them, and an optimization pass
that attempts to fold the resolve op into the store and potentially
eliminate the post-frame shader.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:15 +00:00
Faith Ekstrand
d777656b97 pan/fb: Add an option to only write sample0 of a render target
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:15 +00:00
Faith Ekstrand
0ffb5c3425 pan/fb: Add new shader ops for copying from RTs
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:15 +00:00
Faith Ekstrand
23b5d40052 pan/fb: Separate MSAA ops into in_bounds and border
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
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/39759>
2026-02-23 21:00:15 +00:00