From 290f3fe8972163c6a2b4374958ee9b186eaf27f0 Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Wed, 7 Oct 2020 14:27:57 -0700 Subject: [PATCH] Revert "anv: Add driconf option to disable compression for 16bpp format" This reverts commit bcfec61d1ee2675b8aaaf3adec8109ce6fa6c003. The previous patch fixed the underlying issue that the above commit was actually working around. It turns out that the previously observed performance regression was due to invalid aux-map entries for multi-layer HiZ+CCS buffers. Reviewed-by: Sagar Ghuge Part-of: --- src/intel/vulkan/anv_device.c | 3 --- src/intel/vulkan/anv_image.c | 15 +-------------- src/intel/vulkan/anv_private.h | 1 - src/util/00-mesa-defaults.conf | 5 ----- src/util/driconf.h | 8 -------- 5 files changed, 1 insertion(+), 31 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 3b0a121..6db7e8e 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -54,7 +54,6 @@ static const driOptionDescription anv_dri_options[] = { DRI_CONF_SECTION_PERFORMANCE DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0) DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false) - DRI_CONF_DISABLE_D16UNORM_COMPRESSION(false) DRI_CONF_SECTION_END DRI_CONF_SECTION_DEBUG @@ -766,8 +765,6 @@ VkResult anv_CreateInstance( VG(VALGRIND_CREATE_MEMPOOL(instance, 0, false)); anv_init_dri_options(instance); - instance->disable_d16unorm_compression = - driQueryOptionb(&instance->dri_options, "disable_d16unorm_compression"); *pInstance = anv_instance_to_handle(instance); diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index a949ea4..cfb61e9 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -420,20 +420,7 @@ add_aux_surface_if_supported(struct anv_device *device, * TODO: This is a heuristic trade-off; we haven't tuned it at all. */ assert(device->info.gen >= 12); - /* The experiment showed that running the benchmark with HIZ performs - * better than HIZ_CCS and HIZ_CCS_WT. Because the benchmark uses the - * depth pass with D16_UNORM surfaces format which fills the L3 cache - * and next pass doesn't make use of it where we end up clearing cache - * which results in performance regression. - * - * In order to avoid perf regression, disable HIZ_CCS_WT compression - * for D16_UNORM surface format on Fallout4 via driconf option. - */ - if (plane_format.isl_format == ISL_FORMAT_R16_UNORM && - device->physical->instance->disable_d16unorm_compression) - image->planes[plane].aux_usage = ISL_AUX_USAGE_HIZ; - else - image->planes[plane].aux_usage = ISL_AUX_USAGE_HIZ_CCS_WT; + image->planes[plane].aux_usage = ISL_AUX_USAGE_HIZ_CCS_WT; } else { assert(device->info.gen >= 12); image->planes[plane].aux_usage = ISL_AUX_USAGE_HIZ_CCS; diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index afe60b8..4ebfa0d 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1171,7 +1171,6 @@ struct anv_instance { struct driOptionCache dri_options; struct driOptionCache available_dri_options; - bool disable_d16unorm_compression; }; VkResult anv_init_wsi(struct anv_physical_device *physical_device); diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf index ba3fc5d..2d21c9c 100644 --- a/src/util/00-mesa-defaults.conf +++ b/src/util/00-mesa-defaults.conf @@ -733,11 +733,6 @@ TODO: document the other workarounds.