From 3b05a120a319121dc5a174fc3a61fd96cc51b7d2 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 7 Jun 2019 09:12:52 -0700 Subject: [PATCH] freedreno: correct modifier for UBWC buffers Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen --- src/gallium/drivers/freedreno/freedreno_resource.c | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.30.2