summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-06-07 09:12:52 -0700
committerRob Clark <[email protected]>2019-06-11 10:55:27 -0700
commit3b05a120a319121dc5a174fc3a61fd96cc51b7d2 (patch)
tree2e16a3cf0f23ec19762b7f34a058e060b65274a2 /src/gallium/drivers/freedreno
parent15323c14fd9cacfa157bbfc16355e695f2e0bf9f (diff)
freedreno: correct modifier for UBWC buffers
Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 249a4580893..e83143f239c 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -681,6 +681,9 @@ fd_resource_modifier(struct fd_resource *rsc)
if (!rsc->tile_mode)
return DRM_FORMAT_MOD_LINEAR;
+ if (rsc->ubwc_size)
+ return DRM_FORMAT_MOD_QCOM_COMPRESSED;
+
/* TODO invent a modifier for tiled but not UBWC buffers: */
return DRM_FORMAT_MOD_INVALID;
}