diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h index 7a35605a23e..f3abbd5db0e 100644 --- a/src/intel/isl/isl.h +++ b/src/intel/isl/isl.h @@ -1707,6 +1707,13 @@ struct isl_surf_fill_state_info { /* Intra-tile offset */ uint16_t x_offset_sa, y_offset_sa; + + /** + * Robust image access enabled + * + * This is used to turn off a performance workaround. + */ + bool robust_image_access; }; struct isl_buffer_fill_state_info { diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index 139c196d23a..59158f8e240 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -362,9 +362,16 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state, } #if GFX_VER >= 12 - /* Wa_1806565034: Only set SurfaceArray if arrayed surface is > 1. */ + /* 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->view->array_len > 1; + (info->robust_image_access || info->view->array_len > 1); #elif GFX_VER >= 7 s.SurfaceArray = info->surf->dim != ISL_SURF_DIM_3D; #endif