Commit graph

7213 commits

Author SHA1 Message Date
Karol Herbst
528ceeb49b rusticl: link the C++ runtime statically
Apparently some applications don't have their C++ situation under control.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14090
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41037>
2026-04-29 16:55:39 +00:00
Mike Blumenkrantz
d4d7055aee radv: add RADV_QUEUE_DISABLE env var for selectively disabling queues
it is sometimes useful to test radv without certain queues disabled in order
to exercise alternative codepaths. this exposes that capability

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41086>
2026-04-29 15:08:28 +00:00
squidbus
76a3951e03 kk: Fix issues with maximal reconvergence
If a loop has only one break case, Metal appears to re-order it to after
the loop ends, which goes against the expected behavior for reconvergence.
Work around this by putting the break statement into a trivial, always-true
runtime conditional, when maximal reconvergence is requested.

Fixes dEQP-VK.reconvergence.maximal.compute.nesting*

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41229>
2026-04-28 18:50:36 +00:00
Nick Hamilton
b205c7d592 pvr: Enable shaderImageGatherExtended
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Enables the shaderImageGatherExtended feature and sets the
{min,max}TexelGatherOffset physical device properties.

The properties are queried via Zink and are expected to be non-zero.

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40687>
2026-04-28 12:04:09 +01:00
Christian Gmeiner
7d59c62fde panvk: Wire up VK_EXT_conservative_rasterization on v11+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Mali >= v11 has a Conservative Rast Mode field in DCD Flags 0 with
values Disabled and Over Estimate. Wire it to vk_runtime's
rasterization state and expose the extension on PAN_ARCH >= 11, with
caps restricted to overestimate only — HW has no underestimate value
and no overestimation-size granularity.

On v11-v13, degenerate triangles produce a wrong fragment w when
overestimate is enabled, so cull_zero_area is forced on alongside
the mode bit and degenerateTrianglesRasterized is reported as false.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41189>
2026-04-28 09:34:28 +02:00
Matt Turner
acba4c9fd8 radv: expose VK_KHR_performance_query on GFX11
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Enable VK_KHR_performance_query on GFX11 (RDNA3 / RDNA3.5) now that the
selector tables and packet emission are in place.

Tested on Strix Halo with dEQP-VK.query_pool.performance_query.* (6 pass,
6 not-supported for the allowCommandBufferQueryCopies cases).

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41157>
2026-04-27 16:16:00 +00:00
squidbus
f13bec7934 kk: Add support for VK_EXT_depth_clip_control.
Uses dynamic lowering pass pulled from asahi.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41088>
2026-04-27 11:01:00 +00:00
Trigger Huang
8d60001d69 radv: enable protected memory
Advertise protectedMemory feature for application when TMZ is available

Signed-off-by: Trigger Huang <Trigger.Huang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40619>
2026-04-27 09:03:34 +00:00
Julia Zhang
6496f9d123 radv: add new option RADV_DEBUG=notmz
Used for enable/disable TMZ support of radv.

Signed-off-by: Julia Zhang <Julia.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40619>
2026-04-27 09:03:32 +00:00
Christian Gmeiner
aed60946a1 panvk: Advertise VK_EXT_dynamic_rendering_unused_attachments
The Vulkan runtime and panvk already handle unused attachments
correctly. Enable the extension and feature flags.

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/40920>
2026-04-24 07:09:33 +00:00
Samuel Pitoiset
91f5fcdcd5 radv: advertise VK_KHR_shader_constant_data
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: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40722>
2026-04-23 11:12:06 +00:00
Eric Engestrom
0458a47cf9 docs: update calendar for 26.1.0-rc2
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/41114>
2026-04-22 21:05:58 +00:00
squidbus
7d023db5b2 kk: Enable VK_AMD_shader_image_load_store_lod
This extension is already supported by the shader compiler,
it just needs to be enabled.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41082>
2026-04-22 06:42:08 +00:00
Erik Faye-Lund
c4287eaa04 gallium: delete leftovers of post-processing infrastructure
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This was removed, but driconfs and docs were left behind.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41048>
2026-04-21 18:04:11 +00:00
Eric Engestrom
4731fc588e docs: add stub of vk_struct_type_cast.h for vk_util.h
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41029>
2026-04-21 17:29:04 +00:00
Samuel Pitoiset
87e95c5e50 radv: advertise VK_EXT_host_image_copy by default on GFX10.3+
Latest addrlib supports SIMD (AVX2) and it's definitely fast enough to
be used in production now.

GFX10 is still not enabled by default due to some regressions from the
addrlib bump, also still missing AVX for some formats.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40996>
2026-04-21 10:14:43 +00:00
Erik Faye-Lund
8cb89853b8 panvk: do not enable extension without required feature
The Vulkan spec states that if VK_ARM_shader_core_builtins is supported,
shaderCoreBuiltins is a required feature. So let's not enable that
extension unless we can...

Fixes: dff1d91c64 ("panvk: Enable VK_ARM_shader_core_builtins")
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40944>
2026-04-20 17:36:20 +00:00
Erik Faye-Lund
bf460a525d gallium: completely remove T{EX,XF}_LZ opcode
This isn't in use, let's cull it.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40993>
2026-04-20 17:09:21 +00:00
Erik Faye-Lund
ffe77d756f gallium: remove defunct pipe-cap
This is no longer in use, let's just drop the cap here.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40993>
2026-04-20 17:09:21 +00:00
Patrick Lerda
ecb9bebdef docs/features: add GL_EXT_texture_shadow_lod
Here is the new line:
GL_EXT_texture_shadow_lod DONE (asahi, crocus/gen6+, iris, llvmpipe, nvc0, radeonsi, r600/evergreen+, virgl)

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39915>
2026-04-20 12:49:53 +00:00
Christian Gmeiner
917c3dc77a panvk: Advertise VK_EXT_shader_uniform_buffer_unsized_array
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The extension permits a SPIR-V OpTypeRuntimeArray as the trailing
member of a UBO block.

panvk's compiler path handles this correctly without changes: UBO
access goes through nir_lower_explicit_io with address formats that
carry no compile-time size (bounds are enforced by the hardware UBO
descriptor at runtime), so a runtime array inside a UBO is
indistinguishable from any other dynamically-indexed UBO access.

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/40963>
2026-04-20 12:10:19 +02:00
Karol Herbst
fcfdd4cfea iris: advertise support for subgroup rotate
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The compiler side already supports it, so we just need to enable it.

Needed for cl_khr_subgroup_rotate.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41013>
2026-04-18 00:23:33 +02:00
Karol Herbst
2cc5d8ce48 radeonsi: advertise support for subgroup rotate
Everything needed it already supported on the compiler side, so advertise
the feature.

This is needed for cl_khr_subgroup_rotate.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41015>
2026-04-17 21:47:34 +00:00
Eric Engestrom
d6cc17cbdb docs: add sha sum for 26.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40986>
2026-04-15 17:44:45 +02:00
Eric Engestrom
d0b459ec0e docs: add release notes for 26.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40986>
2026-04-15 17:44:45 +02:00
Eric Engestrom
486b307265 docs: update calendar for 26.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40986>
2026-04-15 17:44:45 +02:00
Eric Engestrom
1e03ef5c38 docs: update calendar for 26.1.0-rc1
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/40981>
2026-04-15 14:37:28 +00:00
Eric Engestrom
9444b9c2c5 docs: reset new_features.txt
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40978>
2026-04-15 13:15:35 +00:00
Christian Gmeiner
713cecb1df panvk: Advertise VK_EXT_rgba10x6_formats
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Map X6R10X6G10X6B10X6A10_UNORM to the native R10X6G10X6B10X6A10X6_UNORM
HW format on PAN_ARCH >= 11 where it is supported.

Enable the extension with formatRgba10x6WithoutYCbCrSampler in the
physical device, allowing VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16
to be used as a regular color format without YCbCr sampler conversion.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40653>
2026-04-15 12:16:53 +00:00
Frank Binns
63c47734a9 pvr: re-enable wideLines
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Partial revert of a22ad99bdd ("pvr: set device features/props/extensions to
Vulkan 1.0 minimums (unless implemented)"), as this optional feature is fully
implemented already.

Tested with:
dEQP-VK.*wide*
dEQP-VK.dynamic_state.monolithic.line_width.*

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40890>
2026-04-14 15:30:57 +01:00
Frank Binns
ffce80d242 pvr: re-enable depthBiasClamp
Partial revert of a22ad99bdd ("pvr: set device features/props/extensions to
Vulkan 1.0 minimums (unless implemented)"), as this optional feature is fully
implemented already.

Tested with:
dEQP-VK.*depth_bias*
dEQP-VK.*bias_clamp*

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40890>
2026-04-14 15:30:53 +01:00
Frank Binns
50b06b888f pvr: re-enable multiDrawIndirect
Partial revert of a22ad99bdd ("pvr: set device features/props/extensions to
Vulkan 1.0 minimums (unless implemented)"), as this optional feature is fully
implemented already.

Tested with:
dEQP-VK.draw.*_multi_draw

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40890>
2026-04-14 15:30:49 +01:00
Frank Binns
e946d6754e pvr: re-enable fullDrawIndexUint32
Partial revert of a22ad99bdd ("pvr: set device features/props/extensions to
Vulkan 1.0 minimums (unless implemented)"), as this optional feature is fully
implemented already.

It also turns out that Vulkan CTS was already testing this feature even though
it wasn't being advertised as supported,
dEQP-VK.draw.renderpass.indexed_draw.draw_instanced_indexed_triangle_list being
an example of this.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40890>
2026-04-14 15:30:45 +01:00
Yiwei Zhang
e99e275c56 docs/vulkan: fix the order of platform and vendor extensions
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40946>
2026-04-14 14:15:32 +00:00
Yiwei Zhang
bd8b288cd0 docs/vulkan: fix the order of KHR and EXT extensions
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40946>
2026-04-14 14:15:32 +00:00
Samuel Pitoiset
f4f2a966e3 radv: advertise VK_EXT_descriptor_heap with RADV_EXPERIMENTAL=heap
It's not yet enabled by default because it's quite a big extension
and I expect bugs because test coverage isn't very good. It will be
enabled by default in one or two Mesa releases when it's more stable.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39483>
2026-04-14 10:10:29 +00:00
Erik Faye-Lund
739e3d20f0 docs/panfrost: fix heading-levels
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These headings shouldn't all be on the same level; the first one is the
heading for the article, but the subsequent ones should be subheadings.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40933>
2026-04-14 05:39:23 +00:00
Mike Blumenkrantz
ab6cdd64c1 lavapipe: VK_EXT_primitive_restart_index
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40783>
2026-04-13 10:40:17 -04:00
Danylo Piliaiev
5b87bbfad3 tu: Support EXT_shader_image_atomic_int64
Required for SM6.6 in vkd3d-proton and used in a number of UE5 titles.
From descriptor side R64 images are R32G32_UINT, and to get storage_descriptor
we have to move early-return if format doesn't support rendering after
storage_descriptor setup.

Passes vkd3d-proton test:
test_shader_sm66_64bit_atomics

CTS tests:
dEQP-VK.image.atomic_operations.*.r64*

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39932>
2026-04-11 19:46:13 +00:00
Rhys Perry
93340aa80d docs/aco: add live variable analysis documentation
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: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40825>
2026-04-10 10:34:45 +00:00
Simon Perretta
590d1d7274 pvr: advertise VK_KHR_shader_integer_dot_product
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40607>
2026-04-10 09:38:25 +00:00
Christian Gmeiner
41b34334a6 panvk: Advertise VK_EXT_attachment_feedback_loop_dynamic_state
The Vulkan runtime provides the dynamic state infrastructure via
vk_common_CmdSetAttachmentFeedbackLoopEnableEXT(). This builds on the
attachment feedback loop layout support.

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/40498>
2026-04-09 12:30:21 +02:00
Christian Gmeiner
a2d9d2b5f8 panvk: Advertise VK_EXT_attachment_feedback_loop_layout
PanVK treats image layouts as no-ops and already disables Forward Pixel
Kill when the same render target is both read and written.

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/40498>
2026-04-09 12:30:19 +02:00
Samuel Pitoiset
5f1c22037b radv: advertise VK_EXT_primitive_restart_index
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40775>
2026-04-08 17:19:48 +00:00
Natalie Vock
436acc321a radv: Disable RADV_DEBUG=llvm in release builds
The LLVM backend is unmaintained. Let's not encourage users to swap out
entire parts of the driver with an unsupported codepath. Enabling this
option is a footgun nowadays anyway, given that it disables many
features and thus may trigger bigger changes in behavior than intended.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40815>
2026-04-07 09:55:25 +00:00
Karol Herbst
f015600c89 docs: add AI disclosure requirements
Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenz.ca>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40617>
2026-04-06 21:34:11 +00:00
Karol Herbst
90d3ddfc80 docs: clarify the use of autonomously acting tooling
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenz.ca>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40617>
2026-04-06 21:34:11 +00:00
Dhruv Mark Collins
ed643d1766 tu+util: Allow setting autotune mode from driconf
Allows for setting an override for the default autotune mode using
driconf, allowing for setting policy on a per-app basis.

Signed-off-by: Dhruv Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37802>
2026-04-06 14:19:29 +00:00
Dhruv Mark Collins
180c0de746 tu/autotune: Add prefer SYSMEM/GMEM mode
Certain games tend to use rendering patterns that strongly prefer
one mode over the other, and thus we're better off not bothering
with profiling them.

Signed-off-by: Dhruv Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37802>
2026-04-06 14:19:29 +00:00
Dhruv Mark Collins
3fcec4762f tu/autotune: Add "Preempt Optimize" mode
This introduces a new option that makes autotune optimize for low
preemption latency which is crucial to ensure responsiveness on
systems with GPU-based composition. A large enough draw can entirely
block the compositor from running with draw-level preemption, this can
be mitigated by preferring to use GMEM which breaks up the draw into
smaller pieces and generally has a lower latency for preemption.

As a further mitigation, tiles in GMEM are then divided into smaller
and smaller pieces which lowers the non-preemptible duration. There
are static checks in place to avoid doing this when it would incur a
cost that is too large.

Uses performance counters read during ambles to detect preemption
latency events while rendering in SYSMEM. This approach is superior
to using RBBM draw time thresholds which could be imprecise as only
the average was calculated rather than true maximum draw time.

However, converting the preemption latency performance counter value
from CP ticks to wall clock is based on the average GPU frequency of
the whole period from the start of the RP until the switch-away amble
while the preemption latency stars counting from the request. Thus, if
the GPU frequency shifts rapidly throughout the RP, it may cause the
estimated wall clock time to be inaccurate, but it should be good enough
in the vast majority of cases.

Signed-off-by: Dhruv Mark Collins <mark@igalia.com>
Co-authored-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37802>
2026-04-06 14:19:29 +00:00