diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index f4284dfc795..a19547d61a6 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -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. */ - 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); const nir_lower_tex_options tex_options = { diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index 90cd6403c50..6860c0552cb 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -388,19 +388,21 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state, unreachable("bad SurfaceType"); } -#if GFX_VER >= 12 - /* Wa_1806565034: - * - * "Only set SurfaceArray if arrayed surface is > 1." - * - * Since this is a performance workaround, we only enable it when robust - * image access is disabled. Otherwise layered robust access is not - * specification compliant. - */ - s.SurfaceArray = info->surf->dim != ISL_SURF_DIM_3D && - (info->robust_image_access || info->view->array_len > 1); -#elif GFX_VER >= 7 - s.SurfaceArray = info->surf->dim != ISL_SURF_DIM_3D; +#if GFX_VER >= 7 + if (INTEL_NEEDS_WA_1806565034) { + /* Wa_1806565034: + * + * "Only set SurfaceArray if arrayed surface is > 1." + * + * Since this is a performance workaround, we only enable it when robust + * image access is disabled. Otherwise layered robust access is not + * specification compliant. + */ + s.SurfaceArray = info->surf->dim != ISL_SURF_DIM_3D && + (info->robust_image_access || info->view->array_len > 1); + } else { + s.SurfaceArray = info->surf->dim != ISL_SURF_DIM_3D; + } #endif if (info->view->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) {