aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2020-05-12 17:45:26 +0200
committerMarge Bot <[email protected]>2020-05-13 13:39:04 +0000
commit40e842c009699a3e8b7ffff2f75b3070df41c752 (patch)
tree53cfd6eb1d16a43f6628fced759b87a068dde45d /src/freedreno/vulkan
parented79f805faf1ac5919a30d3284e37cc3f394e464 (diff)
tu: Add noubwc debug flag to disable UBWC
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5007>
Diffstat (limited to 'src/freedreno/vulkan')
-rw-r--r--src/freedreno/vulkan/tu_device.c1
-rw-r--r--src/freedreno/vulkan/tu_image.c3
-rw-r--r--src/freedreno/vulkan/tu_private.h1
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