gallium/dri2: Report I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS num_planes
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 11 Sep 2019 22:34:46 +0000 (15:34 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 9 Sep 2020 20:02:03 +0000 (20:02 +0000)
Return the expected number of planes in a DMA buffer that has the
I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS modifier.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>

src/gallium/frontends/dri/dri2.c

index 43c57c1..8c62e8b 100644 (file)
@@ -847,9 +847,10 @@ dri2_get_modifier_num_planes(uint64_t modifier, int fourcc)
       return 0;
 
    switch (modifier) {
+   case I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS:
    case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS:
    case I915_FORMAT_MOD_Y_TILED_CCS:
-      return 2;
+      return 2 * util_format_get_num_planes(map->pipe_format);
    case DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED:
    case DRM_FORMAT_MOD_ARM_AFBC(
                         AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 |