Commit graph

909 commits

Author SHA1 Message Date
Calder Young
b6b13bf9df isl: Make sure isl_device::requires_padding is always initialized
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We have to make sure all fields are being initialized in isl_device_init,
the isl_device struct is not guaranteed to be zero-initialized

Fixes: 8d13628f ("isl: Add additional alignment/padding requirements to prevent overfetch")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41354>
2026-05-05 19:44:06 +00:00
Calder Young
fd7c094f7b isl: Add and use isl_tiling_get_intratile_range_el/sa
Consolidates the logic for calculating the intratile extent of a slice of a
surface to avoid duplicating code in the next patch.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
f5c848ef57 isl: Add function to calculate the amount of overfetch for an unpadded surface
Adds a function to calculate the total size of a 2D linear sampling engine
surface, including overfetch, for a buffer to image copy.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
3cd9b14c80 isl: Optimize the sampler cache to overlap as few 64B cachelines as possible
Since we now have a ISL_SURF_USAGE_NO_OVERFETCH_PADDING_BIT flag to turn extra
padding calculations on and off, we can align the row pitch of linear surfaces
that are accessed through the sampler to minimize the number of L3 cachelines
that each sampler cacheline overlaps for added efficiency.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
8d13628f7f isl: Add additional alignment/padding requirements to prevent overfetch
Bspec 58779 describes various cases where additional padding is required on the
bottom and right sides of a sampling engine surface to avoid page faults.

Since we don't want to mess up the other drivers that also use ISL, there's now
a requires_padding boolean in isl_dev that can be used to enable/disable the
extra padding calculations per device and driver.

The extra padding can also be disabled per-surface by adding the usage flag
ISL_SURF_USAGE_NO_OVERFETCH_PADDING_BIT, like when a specific row pitch is
needed.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
aee9602fea isl: Add usage flag to force SurfaceArray to false
When sampling BUFFER, 1D, or 2D surfaces, with no MSAA, no mipmap levels,
linear tiling, and SurfaceArray set to false, the surface padding
requirements are relaxed and its much easier to use the sampler to do
buffer-to-image copies in BLORP. We can't have it like this by default
though because we need SurfaceArray true for robustness.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Paulo Zanoni
4167b7d51f intel/isl: warn about excessive num_elements only once
Commit f3c7e14f09 ("isl: don't assert(num_elements > (1ull << 27))")
replaced an assert(num_elements <= (1 << 27)) with a mesa_logw(). At
that time, the only games I knew that printed this message (Marvel's
Spider-Man Remastered and Assassin's Creed: Valhalla) only printed
it a few times during startup.

It turns out that The Last Of Us Part II Remastered constantly prints
this message during gameplay. Downgrade it to mesa_logw_once() so we
don't spam the terminal, don't fill disks with log messages and don't
make things slower in general.

Fixes: f3c7e14f09 ("isl: don't assert(num_elements > (1ull << 27))")
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41251>
2026-04-30 21:32:23 +00:00
Paulo Zanoni
c4b6df29bf intel/isl: fix assert when surf->size_B is > UINT_MAX
I have some local tests for Sparse Resources that I wrote when I was
working on that for Anv. One of them tries to create a sparse buffer
with size 4294967296 (which doesn't fit in an uint32_t). Without this
patch, the right side of the assertion overflows and we get:

sparse: ../../src/intel/isl/isl.c:3787: isl_surf_from_mem: Assertion `surf->size_B == surf->row_pitch_B * extent.h * extent.a' failed

Fixes: fcdae4d4c0 ("intel: Add and use isl_surf_from_mem()")
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41253>
2026-04-30 21:07:02 +00:00
Lionel Landwerlin
fdc1fae740 isl: speedup buffer fills by dropping swizzle programming
In vkoverhead ubo/ssbo tests, this is about 15/20% improvement.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40697>
2026-03-30 12:05:28 +00:00
Nanley Chery
558053ef20 isl: Apply VALIGN_8 fast-clear restriction on Xe3P+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Bpec 57340 and HSD 22021327133 state that this restriction applies to
Xe3P+.

Ref: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15067
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40471>
2026-03-20 21:25:39 +00:00
Nanley Chery
e0859f5ca1 intel/isl: Use a fixed alignment for single slices
We're going to start changing the surface format during blorp_copy().
Changing the surface format could lead to incorrect image alignment
parameters, so return a fixed halign and valign for images with a single
subresource. That's all that will be needed for the upcoming
blorp_copy() changes.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:17 +00:00
Nanley Chery
b16b9b5591 intel/isl: Relax some alignments in get_image_surf()
Aux-tt alignment only applies to the beginning of the resource. Drop it
if we're pointing to an image that is not in the first tile of the
image. Likewise for the alignment we add for sequential multi-engine
access.

We allow sparse on 1D images. When getting an image from such a surface,
the alignment likely won't be aligned to 64KB. So, in this case, remove
the flag to avoid the alignment expectation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:16 +00:00
Nanley Chery
8d82d06cbc intel/isl: Generalize and move some Yf/Ys miptail limits
Increase the scope of Yf/Ys miptail workarounds to drop the dependency
on format type (compressed or uncompressed) and make this information
more publically accessible. If I recall correctly, the affected tests
only performed blorp_copy() uploads and downloads and never accessed
images with compressed formats. So, we likely should be increasing the
scope.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:16 +00:00
Nanley Chery
9cbf14690f intel/isl: Increase 3D miptail workaround scope
Fixes the following test case on ICL:

$ INTEL_DEBUG=noccs ./deqp-vk -n
  dEQP-VK.api.image_clearing.core.clear_color_image.3d.optimal.
  single_layer.r32g32b32a32_uint

Fixes: 78e24605db ("intel/isl: Reduce scope of Yf-disabling workaround")
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:15 +00:00
Nanley Chery
27d515772e intel/isl: Replace mc_format with aux_format
We're going to be changing the surface format of images but need to
maintain a consistent render compression format to properly
encode/decode. Generalize and use the field that was previously specific
to ISL_AUX_USAGE_MC.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:15 +00:00
Jordan Justen
218ba16232 intel/isl: Build for Xe3P (GFX_VERx10 == 350)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40208>
2026-03-04 11:10:34 -08:00
Lionel Landwerlin
d956957153 isl: fix 32bit math with 4GB buffer size
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35160>
2026-02-12 16:45:21 +00:00
Nanley Chery
381f4a658f intel/isl: Add YCRCB CMF mappings for Xe2+
These formats are listed under "media mapping" on Bspec 63919.

Reviewed-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39628>
2026-02-04 02:23:48 +00:00
Nanley Chery
23a3c8c972 intel: Disable CCS_E support for YCRCB on gfx12
The table in Bspec 47715 lists these formats as "Not Supported" in the
"Lossless Compression Support" column.

Reviewed-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39628>
2026-02-04 02:23:48 +00:00
Nanley Chery
eb4a581e44 intel/isl: Fix QPitch of arrayed MCS
From RENDER_SURFACE_STATE::AuxiliarySurfaceQPitch on BDW+,

   This field must be set to an integer multiple of the Surface
   Vertical Alignment

Accomplish this by aligning the height of each MCS layer to main
surface's vertical alignment. Prevents the following test group from
failing on Xe2 when a future commit enables multi-layer fast-clears in
anv:

   dEQP-VK.api.image_clearing.*.
   clear_color_attachment.multiple_layers.
   *_clamp_input_sample_count_*

The main test I used to debug this:

   dEQP-VK.api.image_clearing.core.
   clear_color_attachment.multiple_layers.
   a8b8g8r8_unorm_pack32_64x11_clamp_input_sample_count_2

Backport-to: 25.3
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37660>
2026-01-27 18:46:47 +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
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
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
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
Nanley Chery
bbd45bb9d1 intel/isl: Prefer suggested tilings which use CCS
Try to use a tiling which would not result in a loss of CCS.

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
Nanley Chery
07539af097 intel/isl: Drop HIZ/MCS checks in CCS support query
We'll use isl_surf_supports_ccs() in a scenario in which we want to
check for CCS support without creating a HIZ or MCS surface beforehand.

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
Nanley Chery
b7c5779ede intel/isl: Prefer the smallest suggested tiling
When choosing between the suggested tilings, create one of each allowed
and pick the smallest one. One benefit of using the standard tilings is
that miptails can avoid space waste in mipmapped compressed textures.

From the ICL PRM, Volume 5: Memory Data Formats, "MIP Layout":

   If Tiling is enabled, then each MIP is layed out using one or more
   tiles.  If TileYf or TileYs tiling is enabled (TR_MODE != NONE), then
   some of the MIPs may actually be stored in a MIPTail which fits in a
   single 64K or 4K tile. The layout above, then only applied to MIPs
   which are not packed in the MIP Tail. Note that, depending on surface
   height the Vertical Alignment that surface can actually have the last
   few mips layed out below LOD1. Using MIP Tail (if supported)
   eliminates this possibility.

In the performance CI, this helps:

   * Hogwarts Legacy on DG2 by 0.64%
   * Satisfactory on BMG by 0.89%
   * Wukong on BMG by 0.77%

Highlights on memory saved by using Tile64 from at most 10k frames in
game traces on DG2:

   * Hogwarts. 32 instances of:
	Saved 128 4KB page(s). extent=4096x4096x1 dim=2d levels=13 fmt=BC7_UNORM
   * Assassin's Creed. 8 instances of:
        Saved 768 4KB page(s). extent=120x68x192 dim=3d levels=1 fmt=R16G16B16A16_FLOAT
   * Black Ops 3. 3 instances of:
	Saved 864 4KB page(s). extent=172x140x288 dim=3d levels=1 fmt=BC6H_UF16
   * God of War. 1 instance of:
        Saved 1920 4KB page(s). extent=320x170x192 dim=3d levels=1 fmt=R16G16B16A16_FLOAT

This patch may cause regressions on SKL-TGL because the smaller surface
may not support compression. This will be fixed in a coming patch.

v2. Don't factor in the image alignments when comparing their sizes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14074
Reviewed-by: Rohan Garg <rohan.garg@intel.com> (v1)
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:04 +00:00
Nanley Chery
13dabd941e intel/isl: Refactor tiling selection in isl_surf_init_s
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:04 +00:00
Nanley Chery
ab07c4066a intel: Add and use ISL_SURF_USAGE_PREFER_4K_ALIGNMENT
Does nothing for now. This will be used in future patch where a
64K-aligned image may be selected over a 4K-aligned one.

Follows the alignment request behavior specified in
VkImageAlignmentControlCreateInfoMESA. Specifically, this preference
does not override attempts by ISL to enable compression.

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:04 +00:00
Nanley Chery
78e24605db intel/isl: Reduce scope of Yf-disabling workaround
The missing bits for correct operation with compressed textures and
multisampled textures were added in previous commits.

The issues with lossless compression and higher miptail slots seem to
affect 128bpb formats as well. However, we're only failing tests which
use compression (even if those tests never actually use the compression
format, just blorp_copy() up and down). Limit the workaround only to
compressed formats until we get more information/testing.

Tests:

   dEQP-VK.api.copy_and_blit.core.image_to_buffer.3d_images.mip_copies_etc2_r8g8b8a8_unorm_block_16x8x24
   dEQP-VK.pipeline.monolithic.sampler.view_type.3d.format.astc_10x6_unorm_block.mipmap.linear.lod.select_bias_3_1
   dEQP-VK.api.copy_and_blit.core.image_to_buffer.2d_images.mip_copies_astc_12x12_unorm_block_64x192

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:02 +00:00
Nanley Chery
ec37a06d93 intel/isl: Rework miptail restrictions with CCS
This will be used to clarify some undocumented restrictions with 64bpb
and 128bpb formats. Changes include:

* Drop a redundant tiling check
* Restrict workarounds to the right ISL_SURF_DIM
* Handle the Yf case for the 2D workaround
* Implement a narrower workaround for the 3D workaround

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:02 +00:00
Nanley Chery
add742fca6 intel/isl: Fix miptail selection for compressed textures
When determining if an LOD can fit within a miptail, we must minify in
pixel space and then convert to elements.

Prevents the following test case from failing when Yf is force-enabled:

   dEQP-VK.image.texel_view_compatible.graphic.extended.3d_image.texture_read.astc_8x5_srgb_block.r32g32b32a32_uint

Fixes: 46f45d62d1 ("intel/isl: Start using miptails")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
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:08:59 +00:00
Nanley Chery
fa85978b58 intel/isl: Set TileAddressMappingMode for CMS/UMS
This bit seems to affect whether the SKL or ICL swizzles are used for
multisampled surfaces.

Prevents the following test case from failing when Yf is force-enabled:

dEQP-VK.pipeline.monolithic.multisample.misc.dynamic_rendering.multi_renderpass.r8g8b8a8_unorm_r16g16b16a16_sfloat_r16g16b16a16_sint_d32_sfloat_s8_uint.random_203

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:08:59 +00:00
Nanley Chery
aa09fc3de0 intel/isl: Use 1x Ys/Yf swizzle for IMS layout
From the ICL PRMs Volume 5: Memory Data Formats, "Compressed
Multisampled Surfaces":

   Tiling for CMS and UMS Surfaces

   Multisampled CMS and UMS use a modified table from
   non-mulitsampled 2D surfaces.

   [...]

   TileYS: In addition to u and v, the sample slice index “ss” is
   included in the address swizzling according to the following
   table.

   [...]

   TileYF: In addition to u and v, the sample slice index “ss” is
   included in the address swizzling according to the following
   table.

For depth/stencil surfaces with Yf/Ys tiling, don't use the MSAA
swizzles.

With the driver modified forced to prefer Ys/Yf for depth buffers, this
fixes 14 failing tests in the VK CTS group:

   dEQP-VK.pipeline.monolithic.multisample.misc.clear*16x*

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
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:08:59 +00:00
Nanley Chery
33a8b6b765 intel/isl: Use 1x ACM Tile64 swizzle on Xe2
They're the same.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
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:08:58 +00:00
Nanley Chery
d2f336c108 intel/isl: Only assert surface addresses on gfx9+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Restrict the surface address assertions to platforms with soft-pin. We
technically could check for (gfx8+ && !CHV), but we choose to use the
simpler condition instead.

Fixes: 8e96b516ca ("intel/isl: Assert alignments of surface addresses")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11331
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38905>
2025-12-12 18:06:16 +00:00
Emma Anholt
10ba7675c8 nir/uub: Use an optional max_samples from drivers for sample counts.
This triggers some unrolling in Fallout 4, GTAV, and Rocky Planet in my
shader-db.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38585>
2025-12-11 14:26:11 +00:00
Jianxun Zhang
33074e3ebe isl: Add a macro for number of maximum planes of modifiers
We will need it in multiple places in the following changes.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36825>
2025-12-09 14:16:42 -08:00
Gil Pedersen
858364be71 intel: Add PIPE_FORMAT_R10G10B10X2_UNORM support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This utilizes the RGBX format faking logic from e8cd7a30 to enable
PIPE_FORMAT_R10G10B10X2_UNORM renderer support using swizzling.

This format is needed for better HDR rendering support in the iris driver, to
support the Proton / Wine DXGI implementation, which requires an RGBA ordered
renderer for its Vulkan implementation. This in turn requires the Wayland
display to support both alpha and opaque formats. The check currently fails,
since only PIPE_FORMAT_R10G10B10A2_UNORM is exposed when Gallium (iris) is
the DRI Wayland renderer.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38616>
2025-12-03 11:22:38 +00:00
Lionel Landwerlin
ef5a0def76 intel/isl: add INTEL_DEBUG=noccs-modifier to disable CCS modifiers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
To help figure out whether a CCS related corruption is tied to
modifier setup or internal driver state tracking.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38382>
2025-11-13 09:52:27 +00:00
Yonggang Luo
ecb0ccf603 treewide: Replace calling to function ALIGN with align
This is done by grep ALIGN( to align(

docs,*.xml,blake3 is excluded

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
2025-11-12 21:58:40 +00:00
Alyssa Rosenzweig
5f53e6edc0 intel: use util_is_aligned more
Coccinelle + filtering hunks manually.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38169>
2025-10-31 15:03:58 +00:00
Alyssa Rosenzweig
7be63ef956 intel: do not NIH util_is_aligned
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38169>
2025-10-31 15:03:57 +00:00
Sagar Ghuge
77d2197c18 Revert "intel: Always set Cube Face Enables for all surfaces."
This reverts commit bf15dc7a1b.

All credit goes to Lionel, he spotted this difference. How much effort
went in for this god knows.

Closes: #12348 #12816 #12446 #12387 #12827 Related #12847 #12520
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37498>
2025-10-13 11:54:11 -07:00
Calder Young
2bfc62e825 isl: Fix noncoherent framebuffer fetch when base_level != 0
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37736>
2025-10-07 13:35:40 +00:00
Nanley Chery
ef4f4d3f84 intel/isl: Update the aux-state of zeroed HiZ
By dumping the contents of a HiZ buffer before and after fast-clearing,
I've observed that a zeroed HiZ block corresponds to the CLEAR state
until gfx12. The fast-clearing application was piglit's bin/hiz. I ran
this test on a couple bare metal platforms (ICL and BDW) and many
simulated ones (SKL, TGL, DG2, and LNL).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36383>
2025-10-06 13:50:39 +00:00
Nanley Chery
a13aab1859 intel/isl: Update the initial HiZ state for Xe2+
Avoids ambiguating in iris and anv.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36383>
2025-10-06 13:50:39 +00:00
Nanley Chery
b709d7dd39 intel: Delete the has_illegal_ccs_values bool
This was only used in one location.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36383>
2025-10-06 13:50:39 +00:00
Nanley Chery
7d284fe399 intel/isl: Define initial state of non-zeroed CCS on gfx9-11
isl_aux_get_initial_state() will soon be used for non-zeroed CCS on
gfx9+. Update the function to avoid hitting an unreachable().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36383>
2025-10-06 13:50:37 +00:00