diff options
author | Connor Abbott <[email protected]> | 2020-05-12 17:45:26 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-13 13:39:04 +0000 |
commit | 40e842c009699a3e8b7ffff2f75b3070df41c752 (patch) | |
tree | 53cfd6eb1d16a43f6628fced759b87a068dde45d /src | |
parent | ed79f805faf1ac5919a30d3284e37cc3f394e464 (diff) |
tu: Add noubwc debug flag to disable UBWC
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5007>
Diffstat (limited to 'src')
-rw-r--r-- | src/freedreno/vulkan/tu_device.c | 1 | ||||
-rw-r--r-- | src/freedreno/vulkan/tu_image.c | 3 | ||||
-rw-r--r-- | src/freedreno/vulkan/tu_private.h | 1 |
3 files changed, 4 insertions, 1 deletions
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 |