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>
This commit is contained in:
Nanley Chery 2025-10-29 13:34:07 -04:00 committed by Marge Bot
parent aa09fc3de0
commit fa85978b58

View file

@ -534,8 +534,31 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
assert(isl_tiling_is_any_y(info->surf->tiling));
s.TileMode = isl_encode_tiling[info->surf->tiling];
if (isl_tiling_is_std_y(info->surf->tiling))
if (isl_tiling_is_std_y(info->surf->tiling)) {
s.TiledResourceMode = isl_tiling_encode_trmode[info->surf->tiling];
#if GFX_VER >= 11
/* Use the ICL swizzles for CMS and UMS surfaces. Although the
* RENDER_SURFACE_STATE field of the ICL+ PRMs command us to leave this
* bit cleared (and thus use the SKL swizzles), the TGL and DG1 PRMs
* seem to explain that the command was based on the lack of driver
* support. ISL has support for these swizzles however. From the TGL
* PRM:
*
* This field should always be programmed to 0h. Tiling mode is the
* standard tile layout for 3D.
*
* This field should NOT be programmed to 1h as the Tiling (for
* Standard Tiling) Address Mapping mode is not supported by SW.
*
* Additionally, the multisampled SKL swizzles for Yf are not explicitly
* defined as being applicable for ICL+ in the ICL PRM, Volume 5,
* "Tiling for CMS and UMS Surfaces" section. Compare this to the SKL
* PRM which provides the same table for multisampled Yf/Ys.
*/
s.TileAddressMappingMode =
info->surf->msaa_layout == ISL_MSAA_LAYOUT_ARRAY;
#endif
}
#elif GFX_VER >= 8
assert(isl_format_get_layout(info->view->format)->txc != ISL_TXC_ASTC);
assert(!isl_tiling_is_std_y(info->surf->tiling));