freedreno: correct modifier for UBWC buffers
authorRob Clark <robdclark@chromium.org>
Fri, 7 Jun 2019 16:12:52 +0000 (09:12 -0700)
committerRob Clark <robdclark@chromium.org>
Tue, 11 Jun 2019 17:55:27 +0000 (10:55 -0700)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/gallium/drivers/freedreno/freedreno_resource.c

index 249a4580893a4096e3a98e713c72d50fd19fe84f..e83143f239c312ea0874dd836042a2503a7a80f3 100644 (file)
@@ -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;
 }