summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_resource.c
diff options
context:
space:
mode:
authorFritz Koenig <[email protected]>2019-02-26 18:31:38 -0800
committerRob Clark <[email protected]>2019-03-01 15:51:16 +0000
commit12af6b30a34cf7522fc07276ec6b1aa7874b6c74 (patch)
tree69b2d5d309fcf6af60e468c7b404901be037d0db /src/gallium/drivers/freedreno/freedreno_resource.c
parent4715e7a98afbb43872ead144e35272f256549be0 (diff)
freedreno/a6xx: Enable UBWC modifier
Adding the supported_modifiers allows buffers to be created with UBWC
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_resource.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 22e3874a246..36d61d715ef 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -922,6 +922,12 @@ fd_resource_create_with_modifiers(struct pipe_screen *pscreen,
if (tmpl->bind & PIPE_BIND_SHARED)
allow_ubwc = find_modifier(DRM_FORMAT_MOD_QCOM_COMPRESSED, modifiers, count);
+ /* TODO turn on UBWC for all internal buffers
+ * Manhattan benchmark shows artifacts when enabled. Once this
+ * is fixed the following line can be removed.
+ */
+ allow_ubwc &= !!(fd_mesa_debug & FD_DBG_UBWC);
+
if (screen->tile_mode &&
(tmpl->target != PIPE_BUFFER) &&
!linear) {