isl: use generated workaround helpers for Wa_1806565034

This workaround was enabled for gen12+, but only applies to gen12.0.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21912>
This commit is contained in:
Mark Janes
2023-03-14 14:50:00 -07:00
committed by Marge Bot
parent 3a5a7203af
commit a98f246857
2 changed files with 16 additions and 14 deletions

View File

@@ -946,7 +946,7 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir,
* *
* So when robust image access is enabled, just avoid the workaround. * So when robust image access is enabled, just avoid the workaround.
*/ */
if (devinfo->ver >= 12 && !opts->robust_image_access) if (intel_needs_workaround(devinfo, 1806565034) && !opts->robust_image_access)
OPT(brw_nir_clamp_image_1d_2d_array_sizes); OPT(brw_nir_clamp_image_1d_2d_array_sizes);
const nir_lower_tex_options tex_options = { const nir_lower_tex_options tex_options = {

View File

@@ -388,7 +388,8 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
unreachable("bad SurfaceType"); unreachable("bad SurfaceType");
} }
#if GFX_VER >= 12 #if GFX_VER >= 7
if (INTEL_NEEDS_WA_1806565034) {
/* Wa_1806565034: /* Wa_1806565034:
* *
* "Only set SurfaceArray if arrayed surface is > 1." * "Only set SurfaceArray if arrayed surface is > 1."
@@ -399,8 +400,9 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
*/ */
s.SurfaceArray = info->surf->dim != ISL_SURF_DIM_3D && s.SurfaceArray = info->surf->dim != ISL_SURF_DIM_3D &&
(info->robust_image_access || info->view->array_len > 1); (info->robust_image_access || info->view->array_len > 1);
#elif GFX_VER >= 7 } else {
s.SurfaceArray = info->surf->dim != ISL_SURF_DIM_3D; s.SurfaceArray = info->surf->dim != ISL_SURF_DIM_3D;
}
#endif #endif
if (info->view->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) { if (info->view->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) {