Commit graph

201696 commits

Author SHA1 Message Date
Hans-Kristian Arntzen
3fdc14b089 wsi/wayland: Implement EXT_present_timing on Wayland.
Only weakness right now is that we cannot implement VRR vs FRR query reliably.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:51 +00:00
Hans-Kristian Arntzen
9f32fc6d3c vulkan/wsi: Add no-op present timing support to most backends.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:50 +00:00
Hans-Kristian Arntzen
c18b14aea2 anv: Add PRESENT_STAGE_LOCAL_EXT path for calibration.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:50 +00:00
Hans-Kristian Arntzen
c7b70b2e2e vulkan/runtime: Expose PRESENT_STAGE_LOCAL as calibrateable domain.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:50 +00:00
Hans-Kristian Arntzen
47d69664d8 vulkan/wsi: Add common infrastructure for EXT_present_timing.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38770>
2026-01-27 11:09:50 +00:00
Aitor Camacho
f08a542756 kk: Remove primitive type from pipeline and rely on dynamic one
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39543>
2026-01-27 10:52:09 +00:00
Samuel Pitoiset
14d3fb5f1b radv: add a workaround for a synchronization bug in Strange Brigade Vulkan
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This game has broken synchronization reported by VVL and it indeed
doesn't wait for idle right before present. Workaround this by
injecting a full barrier (easier than rewriting the dep struct).

This only applies to the Vulkan backend.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14705
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39480>
2026-01-27 09:18:25 +00:00
Francisco Jerez
ffb4d3a032 iris: Rework iris_sample_with_depth_aux() into helper that returns aux usage.
Since this does most of the work to determine the right aux usage for
a depth texture, turn it into a helper that returns that aux usage in
order to avoid duplication of logic between it and its callers.

Suggested-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:18 +00:00
Francisco Jerez
c0cf14f0e2 intel/isl: Add unit tests for ISL_AUX_STATE_COMPRESSED_HIER_DEPTH.
v2: Add additional AUX state transition test-cases for HIZ_CCS (Nanley).

v3: Assume partial resolve is equivalent to full resolve on legacy HiZ
    surfaces during isl_aux_state_transition_aux_op() instead of
    asserting (Nanley).

v4: Move some tests into different group, add more MCS tests (Nanley).

Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:18 +00:00
Francisco Jerez
35512cebb1 iris/gfx12.5: Apply HIZ-CCS resolve DC flush after full resolves for all gfx12.5.
This appears to be needed to guarantee that a resolved depth surface
has no remaining fast-cleared blocks on DG2 as well as MTL.  After
this series this should no longer be hit in practice since we'll be
doing partial resolves in most cases, but it seems sensible to keep
and correct the workaround for our peace of mind to make sure that
full resolves are truly resolving the main surface.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:18 +00:00
Francisco Jerez
349b09f8a2 anv/gfx12.5: Apply HIZ-CCS resolve TC flush on full resolves for all gfx12.5.
This appears to be needed to guarantee that a resolved depth surface
has no remaining fast-cleared blocks on DG2 as well as MTL.  After
this series this should no longer be hit in practice since we'll be
doing partial resolves in most cases, but it seems sensible to keep
and correct the workaround for our peace of mind to make sure that
full resolves are truly resolving the main surface.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:17 +00:00
Francisco Jerez
8e1b4b62ce anv/gfx12.5: Take advantage of partial resolves in depth layout transitions.
Issue a partial resolve instead of a full resolve from
transition_depth_buffer() when the final usage requires the
CCS-compressed surface to provide a complete representation of the
image.

This significantly improves performance of applications that
frequently interleave depth rendering and sampling on non-WT surfaces
(e.g. MSAA surfaces).  Nba2K23-trace-dx11-2160p-ultra improves
performance by about 260% with this on MTL, DG2 shows a similar
benefit.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:17 +00:00
Francisco Jerez
ef95d5243f intel/isl: Teach ISL about HIZ CCS partial resolves.
This updates the isl_aux_state transition helpers to consider partial
resolves for HiZ-CCS surfaces, and as a side effect of the update to
isl_aux_prepare_access() partial resolves should be implicitly enabled
in iris now for platforms that support it.

v2: HiZ partial resolves aren't enough to remove cleared blocks unlike
    color partial resolves (Nanley).

v3: Treat ISL_AUX_STATE_CLEAR similar to
    ISL_AUX_STATE_COMPRESSED_HIER_DEPTH so we can continue using it
    after depth buffer fast clears.  Drop flagging partial_resolve ==
    true for HiZ usages so we don't do the wrong thing while preparing
    access of a surface in ISL_AUX_STATE_CLEAR state.

v4: Assume partial resolve is equivalent to full resolve on legacy HiZ
    surfaces during isl_aux_state_transition_aux_op() instead of
    asserting (Nanley).

Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:17 +00:00
Francisco Jerez
cc66f5ff1d intel/blorp: Add support for partial resolves of HiZ-CCS surfaces.
v2: Define additional enum BLORP_OP_HIZ_PARTIAL_RESOLVE to track
    partial resolves (Nanley).
v3: Add comment regarding fall back to full resolve on Gfx12.0 (Nanley).

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:17 +00:00
Francisco Jerez
79ab5db71b intel/measure: Define snapshot type for HiZ partial resolves.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:16 +00:00
Francisco Jerez
f9ce1b9c40 anv/gfx12.5+: Keep HIZ_CCS aux usage while sampling from depth surfaces.
As long as the surface is in a state with valid AUX state with
identity contents of the HiZ surface (E.g. in
ISL_AUX_STATE_COMPRESSED_CLEAR, ISL_AUX_STATE_COMPRESSED_NO_CLEAR,
ISL_AUX_STATE_RESOLVED or ISL_AUX_STATE_PASS_THROUGH states) we can
keep compression enabled, which works around hardware bugs on MTL and
DG2, and will be helpful to switch to partial resolves in a future
commit.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:16 +00:00
Francisco Jerez
baf39d4322 anv/gfx12.5: Infer ISL_AUX_STATE_COMPRESSED_HIER_DEPTH from anv_layout_to_aux_state().
Update anv_layout_to_aux_state() to return the
ISL_AUX_STATE_COMPRESSED_HIER_DEPTH state in cases where we may be
rendering into a HiZ surface in non-WT aux mode, instead of
ISL_AUX_STATE_COMPRESSED_CLEAR.

v2: No need to handle ISL_AUX_STATE_COMPRESSED_HIER_DEPTH in
    anv_layout_to_fast_clear_type() since it should never be reached
    (Nanley).

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:16 +00:00
Francisco Jerez
157a4cc6d0 anv/gfx12.5: Resolve depth during layout transitions from ISL_AUX_STATE_COMPRESSED_HIER_DEPTH.
For transitions to a state that requires the image to be fully defined
by the primary+CCS surface without necessarily requiring a valid
primary we have to perform a resolve if the initial state was
ISL_AUX_STATE_COMPRESSED_HIER_DEPTH, which isn't fully defined by its
primary+CCS surface.  This full resolve will be replaced with a more
efficient partial resolve in a future commit, but we have to do this
up front in order to avoid breaking bisectability.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:16 +00:00
Francisco Jerez
7f1ed1e411 anv/gfx12.5: Can't fast clear multisampled Z/S with HIZ CCS WT aux usage.
We can end up in this situation in cases where the application uses a
layout that allows both rendering and sampling from a depth surface,
since in such cases we will attempt to render with HIZ CCS WT usage as
a side effect of using ISL_AUX_USAGE_HIZ_CCS_WT for all layouts that
allow the image to be sampled from.

Disabling fast clears for that case isn't expected to cause
performance regression since before this series for HiZ CCS non-WT
images transitioning to such a layout we would have issued a full
resolve and used ISL_AUX_USAGE_NONE, which also doesn't support fast
clears.

Multisample depth images should still get fast clears after this
commit in cases where the rendering and sampling is split into
separate render pasess with a layout transition between them that
transitions the image from a W/O layout into a R/W one -- Such
transitions will be handled with a relatively cheap partial resolve in
a subsequent commit.

v2: Add details of additional findings about these hardware issues in
    comment.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>

v3: Pass aspect bit consistent with layout to
    anv_layout_to_aux_usage() instead of defaulting to
    VK_IMAGE_ASPECT_DEPTH_BIT.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:15 +00:00
Francisco Jerez
02030b4b8f anv: Use actual layout in anv_fast_clear_depth_stencil() instead of ANV_IMAGE_LAYOUT_EXPLICIT_AUX.
Currently anv_fast_clear_depth_stencil() doesn't know the correct
layout of the depth and stencil images, instead it uses
ANV_IMAGE_LAYOUT_EXPLICIT_AUX to force the base AUX usage of each
plane, which can be inconsistent with the VkImageLayout currently in
use.  Plumb the correct depth and stencil layouts.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:15 +00:00
Francisco Jerez
d283e44634 anv/gfx12.5: Allocate indirect color state for depth surfaces.
The clear color state has to be allocated since we will be sampling
from non-WT HiZ CCS depth surfaces without disabling compression.

v2: Use isl_aux_usage_has_ccs() instead of open coding (Nanley).
v3: Use stricter condition on Gfx12.0 to avoid allocating buffer
    unnecessarily (Nanley).

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:14 +00:00
Francisco Jerez
39b3a83ebf iris/gfx12.5+: Keep HIZ_CCS aux usage while sampling from resolved depth surfaces.
This works around graphics corruption seen on MTL and DG2 platforms
when sampling from a HIZ-CCS depth surface that was previously fast
cleared and resolved for sampling.  Apparently full resolves no longer
guarantee that the CCS surface ends up in a pass-through state due to
the behavior of the L3 cache in presence of compressible data.  In
order to work around the problem this makes sure that we use a
CCS-enabled AUX mode for depth textures if the base surface has a CCS
control surface, even if we are instructed to use ISL_AUX_USAGE_NONE.

This appears to fix the corruption without the need to add extra L3
flushes after resolves (as was done in the Vulkan driver, see
5178ad761c).

v2: Use ISL_AUX_USAGE_HIZ_CCS_WT instead of ISL_AUX_USAGE_HIZ_CCS
    usage to represent the requirements of sampling from a depth
    surface (Nanley).
v3: Add some comments, remove redundant check, disallow creation of
    ISL_AUX_USAGE_NONE surface state for depth sampler views since the
    hardware is buggy (Nanley).
v4: Preserve use of ISL_AUX_STATE_CLEAR when fast-clearing a surface
    (Nanley).
v5: Set ISL_AUX_STATE_COMPRESSED_NO_CLEAR state after clearing a HiZ
    CCS WT resource on xe2+ (Nanley).

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:14 +00:00
Francisco Jerez
06e48229e6 iris/gfx12.5: Allocate indirect color state for depth surfaces.
The clear color state has to be allocated since we will be sampling
from non-WT HiZ CCS depth surfaces without disabling compression.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:13 +00:00
José Roberto de Souza
8fdec3d161 intel/isl/gfx12.5: Alow hierarchial depth buffer write through for multi sampled surfaces
Documentation is kinda of ambiguos but at least gfx12.5 is allowed to
do hierarchial depth buffer write through for multi sampled surfaces.

BSpec: 46965
BSpec: 56419
Suggested-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:12 +00:00
Francisco Jerez
5ed23c14da intel/isl: Define ISL_AUX_STATE_COMPRESSED_HIER_DEPTH aux state.
This state is helpful to track when resolves are needed for HiZ-CCS
non-WT surfaces, since the ISL_AUX_STATE_COMPRESSED_* states that
currently exist don't distinguish between the CCS and the HiZ surfaces
being in a non-passthrough compression state, so we would have had to
pre-emptively issue a resolve before sampling from any
ISL_AUX_STATE_COMPRESSED_* HiZ-CCS surface just in case its HiZ
surface has non-trivial contents, even if its HiZ surface is in
pass-through state and the surface only has non-trivial CCS
compression.

This commit introduces a new ISL_AUX_STATE_COMPRESSED_HIER_DEPTH state
that indicates that the hierarchical depth surface has non-trivial
contents that have to be considered to get a complete representation
of the image.  While in this state the surface may also have
fast-cleared blocks.  The pre-existing ISL_AUX_STATE_COMPRESSED_*
states now unambiguously indicate that the HiZ surface is in an
identity state, so it's unnecessary to obtain a complete
representation of the image e.g. while sampling from a HiZ-CCS depth
surface.

v2: Use more abstract aux state name instead of
    ISL_AUX_STATE_COMPRESSED_HIZ, don't transition legacy HIZ surfaces
    to new aux state on write by using COMPRESS write behavior instead
    of COMPRESS_HIZ (Nanley).
v3: Comment clarifications (Nanley).
v4: Re-apply change to transition legacy HIZ surfaces to new aux state
    on write by using COMPRESS_HIZ for consistent semantics of the aux
    state irrespective of the aux usage, this is particularly
    important because the HIZ aux usage coexists with HIZ_CCS in some
    platforms, so pretending write_behavior is just "COMPRESS" for HIZ
    as on v2 would cause the ISL_AUX_STATE_COMPRESSED_CLEAR state to
    have different meaning and require different handling depending on
    the aux usage that was used with the surface before.
v5: Additional comment clarifications, express aux_state_possible()
    result and isl_aux_prepare_access() check in terms of
    aux_usage_info::write_behavior (Nanley).  Move changes in behavior
    for ISL_AUX_STATE_CLEAR from future ISL partial resolve commit
    into this commit since the change is already required for
    correctness as part of the split of hierarchical depth states.

Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31139>
2026-01-27 08:52:12 +00:00
Wang Ruitang
e11c04c0cc amd/common/virtio: use device fd to init sync provider
Use fd after dup instead of the one before dup to avoid
drm_syncobj_find failed in guest kernel when dev is found in
dev_list.

When dev is not found in dev_list, it uses device fd which is
duplicated, to init sync provider. And when it's found, the same
device fd should be used. Otherwise, it would caused inconsistency
and failures like in the Android domU CTS test where the guest
kernel attempts to locate a syncobj. This occurs because
vdrm_device_connect and VIRTGPU_EXECBUFFER ioctl use fd after dup
while util_sync_provider_drm uses the one before dup.

The fix has been validated with the CtsSdkSandboxWebkitTestCases in
Android domU, and the previously failing test cases no longer occur.

Signed-off-by: Ruitang.Wang@amd.com
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39520>
2026-01-27 08:24:35 +00:00
Samuel Pitoiset
d679236e09 radv: fix applying radv_ssbo_non_uniform=true for Crysis 2/3 remastered
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
DX11 games that use Vulkan interop for RT with a broken and too generic
app/engin name. This is very specific to these two games.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14718
Fixes: 56813236f4 ("radv: use app names instead of exec name for shader based drirc workarounds")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39518>
2026-01-27 06:54:10 +00:00
Emma Anholt
72c12f62ff tu: Implement VK_QCOM_image_processing.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This includes the block matching, box filtering, and weighted sample
features.  Passes all of the dEQP-VK.image_processing.* CTS tests that
were recently landed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38559>
2026-01-27 02:00:40 +00:00
Emma Anholt
431c7a6e36 ir3: Add support for VK_QCOM_image_processing opcodes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38559>
2026-01-27 02:00:40 +00:00
Emma Anholt
bd6c1fea1f ir3: Refactor bindless tex src info collection.
I want to reuse this for QCOM_image_processing, which encodes the constant
case differently.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38559>
2026-01-27 02:00:40 +00:00
Emma Anholt
e922c2cabc nir,spirv: Add support for SPV_QCOM_image_processing.
Initial work was done by Mark Collins, which I significantly rewrote.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38559>
2026-01-27 02:00:40 +00:00
Emma Anholt
a70cb908e4 ir3/tests: Print a helpful bit number on re-assembly failures.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38559>
2026-01-27 02:00:40 +00:00
Emma Anholt
f289c460eb isaspec: Print the bit number when just a single bit is undefined.
I'm tired of counting my bits by hand.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38559>
2026-01-27 02:00:40 +00:00
Emma Anholt
8a2a14a31a isaspec: Print the bitset we're processing when missing a field.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38559>
2026-01-27 02:00:40 +00:00
Emma Anholt
3d8cfa77d7 isaspec: Improve debug info for extractor_fallback().
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38559>
2026-01-27 02:00:39 +00:00
Emma Anholt
e8e6e42e71 isaspec: Print a useful error for an assert I hit.
Trying to write new isaspec xml makes me wish for rust's anyhow crate.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38559>
2026-01-27 02:00:39 +00:00
Rob Clark
670ded35c1 freedreno/a6xx: Better program state size calc
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Most of the time we were significantly over-allocating the size of
program stateobjs.  Except when the shader had a very large # of
immediates, in which case we were under-allocating (and crashing).

Fixes: 598928d7e7 ("nir/loop_analyze: determine whether all control flow gets eliminated upon loop unrolling")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14731
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39545>
2026-01-27 01:38:56 +00:00
Christian Gmeiner
c156da579c etnaviv: blt: Enable masked clear for color and stencil
This commit adds support for masked clear operations in the BLT path,
allowing partial clears of specific color channels and stencil bits.

For color clears, calculate which bits to clear based on the clear_mask
by examining the format's channel layout. The clear_bits field is now
set according to the mask instead of clearing all channels.

For stencil clears, use the clear_mask parameter through to mask the
stencil bits in the S8_UINT_Z24_UNORM format path, which was previously
hardcoded to 0xff.

Update etna_blt_will_fastclear() to check that clear_mask is 0xf (all
channels) before allowing fast clear, since masked clears require the
full clear path.

Enable the clear_masked capability when BLT is available and the
BLT_64bpp_MASKED_CLEAR_FIX cap is supported.

Passes the following dEQPs:
 - dEQP-GLES2.functional.*_clear.*masked*
 - dEQP-GLES3.functional.*_clear.*masked*

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31512>
2026-01-27 00:57:26 +00:00
Christian Gmeiner
8d3945219d etnaviv: hwdb: Add BLT_64BPP_MASKED_CLEAR_FIX cap
Used to tell if the GPU core correctly can do masked clear
for 64bpp formats.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31512>
2026-01-27 00:57:26 +00:00
Christian Gmeiner
9c972a61d5 gallium: Add pipe cap for masked clears and support stencil masking
Add a new PIPE_CAP_CLEAR_MASKED capability that allows drivers to
handle buffer clears with color and stencil masks directly, instead
of falling back to drawing a quad in Mesa.

This patch introduces several changes:

1. Add the new pipe cap PIPE_CAP_CLEAR_MASKED to pipe_defines.h and
   document it in the Gallium screen documentation.

2. Add color_clear_mask and stencil_clear_mask parameters to the
   pipe_context::clear() hook:
   - color_clear_mask (uint32_t): contains 4 color mask bits per draw buffer
     (max 8 buffers = 32 bits)
   - stencil_clear_mask (uint8_t): contains the stencil write mask (8 bits)

3. Update the state tracker to use the masked clear path when the
   driver supports it:
   - Pass ctx->Color.ColorMask for color buffer clears
   - Pass ctx->Stencil.WriteMask for stencil clears
   - Allow both color and stencil clears to avoid the quad path when
     masks are present and the driver advertises support

4. Update all existing driver clear() hooks to accept the new
   color_clear_mask and stencil_clear_mask parameter.

This optimization allows drivers that can efficiently handle masked
clears in hardware to do so, improving performance for applications
that frequently clear buffers with masks enabled.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31512>
2026-01-27 00:57:26 +00:00
Alyssa Rosenzweig
3361ca86cf brw: hoist fsat lower OOTL
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: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39539>
2026-01-26 23:24:49 +00:00
Alyssa Rosenzweig
f16ec90caa brw: move fsign lower OOTL
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39539>
2026-01-26 23:24:49 +00:00
Dave Airlie
f36392c64c lavapipe: add support for NV_cooperative_matrix2 per element operations
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38964>
2026-01-26 22:39:40 +00:00
Dave Airlie
2db1a624e3 lavapipe: add NV_cooperative_matrix2 reductions support
This adds support for the coopmat2 reductions

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38964>
2026-01-26 22:39:40 +00:00
Dave Airlie
6d53931cf4 nir: add cmat call to propogate invariants
This just adds this as lavapipe uses this pass.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38964>
2026-01-26 22:39:40 +00:00
Dave Airlie
58f7fa3f6c lavapipe: add NV_cooperative_matrix2 conversions support
This adds the conversions/transpose support.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38964>
2026-01-26 22:39:40 +00:00
Dave Airlie
485728e2cf lavapipe: add NV_cooperative_matrix2 flexible dimensions support
This adds flex dimensions support.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38964>
2026-01-26 22:39:40 +00:00
Konstantin Seurer
20322687e0 vulkan: Avoid NAN in the IR BVH
Build and encoding stages should be able to assume that AABBs don't have
NANs. This commit covers all possible sources of NAN.

Fixes: 091b43b ("radv: Use HPLOC for TLAS builds")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14696
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39508>
2026-01-26 22:14:31 +00:00
Konstantin Seurer
0817551f00 vulkan: Handle inactive primitives with LBVH builds
cc: mesa-stable

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39378>
2026-01-26 21:49:17 +00:00
Nanley Chery
f208ac9f4b intel: Enable CCS support for Yf and Ys
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Enable CCS with Ys on all systems, and with Yf on gfx9-11.

Unfortunately, Yf + CCS isn't supported on gfx12. Tests fail and systems
hang in the CI with this enabled. The simulator also complains about
this combination on tests such as:

   dEQP-VK.api.image_clearing.core.clear_color_attachment.multiple_layers.r4g4b4a4_unorm_pack16
   dEQP-VK.api.image_clearing.core.clear_color_attachment.single_layer.r4g4b4a4_unorm_pack16_200x180_sample_count_2

The simulator doesn't complain about this combination on depth/stencil
surfaces, but actual hardware still has issues with this.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11057
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38063>
2026-01-26 21:09:05 +00:00