From a921486e2a6ca5fc873a6e2f9c61fb5bef4cf3d9 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 12 Dec 2022 15:32:22 +0200 Subject: [PATCH] anv: disable Wa_1806565034 when robustImageAccess is enabled Signed-off-by: Lionel Landwerlin Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5711 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7859 Reviewed-by: Ivan Briano Part-of: --- src/intel/vulkan/anv_image.c | 5 ++++- src/intel/vulkan/anv_pipeline.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 97a7553..1ad42e8 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -2497,7 +2497,10 @@ anv_image_fill_surface_state(struct anv_device *device, .mocs = anv_mocs(device, state_inout->address.bo, view_usage), .x_offset_sa = tile_x_sa, - .y_offset_sa = tile_y_sa); + .y_offset_sa = tile_y_sa, + .robust_image_access = + device->vk.enabled_features.robustImageAccess || + device->vk.enabled_features.robustImageAccess2); /* With the exception of gfx8, the bottom 12 bits of the MCS base address * are used to store other information. This should be ok, however, diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 6d77168..70ba8fe 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -224,6 +224,9 @@ anv_shader_stage_to_nir(struct anv_device *device, struct brw_nir_compiler_opts opts = { .softfp64 = device->fp64_nir, + .robust_image_access = + device->vk.enabled_features.robustImageAccess || + device->vk.enabled_features.robustImageAccess2, }; brw_preprocess_nir(compiler, nir, &opts); -- 2.7.4