From: Rob Clark Date: Fri, 7 Jun 2019 16:12:52 +0000 (-0700) Subject: freedreno: correct modifier for UBWC buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3b05a120a319121dc5a174fc3a61fd96cc51b7d2;p=mesa.git freedreno: correct modifier for UBWC buffers Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen --- 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; }