From 89a550a37b0bb32bc3dfd92062f9fe6eb05c11db Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 12 Dec 2022 15:30:40 +0200 Subject: [PATCH] isl: make Wa_1806565034 conditional to non robust access Signed-off-by: Lionel Landwerlin Reviewed-by: Ivan Briano Part-of: --- src/intel/isl/isl.h | 7 +++++++ src/intel/isl/isl_surface_state.c | 11 +++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) 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