From: Connor Abbott Date: Tue, 12 May 2020 15:45:26 +0000 (+0200) Subject: tu: Add noubwc debug flag to disable UBWC X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40e842c009699a3e8b7ffff2f75b3070df41c752;p=mesa.git tu: Add noubwc debug flag to disable UBWC Part-of: --- diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index dfe4df85e32..3e685e0518e 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -383,6 +383,7 @@ static const struct debug_control tu_debug_options[] = { { "nobin", TU_DEBUG_NOBIN }, { "sysmem", TU_DEBUG_SYSMEM }, { "forcebin", TU_DEBUG_FORCEBIN }, + { "noubwc", TU_DEBUG_NOUBWC }, { NULL, 0 } }; diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c index 8c0e8c5341f..52585a85c8d 100644 --- a/src/freedreno/vulkan/tu_image.c +++ b/src/freedreno/vulkan/tu_image.c @@ -86,7 +86,8 @@ tu_image_create(VkDevice _device, EXTERNAL_MEMORY_IMAGE_CREATE_INFO) != NULL; image->layout.tile_mode = TILE6_3; - bool ubwc_enabled = true; + bool ubwc_enabled = + !(device->physical_device->instance->debug_flags & TU_DEBUG_NOUBWC); /* disable tiling when linear is requested and for compressed formats */ if (pCreateInfo->tiling == VK_IMAGE_TILING_LINEAR || diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index 1c32e60000a..1cba064d0c8 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -353,6 +353,7 @@ enum tu_debug_flags TU_DEBUG_NOBIN = 1 << 3, TU_DEBUG_SYSMEM = 1 << 4, TU_DEBUG_FORCEBIN = 1 << 5, + TU_DEBUG_NOUBWC = 1 << 6, }; struct tu_instance