iris: Support MC modifier in plane count queries
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 15 Apr 2020 23:47:46 +0000 (16:47 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 9 Sep 2020 20:02:03 +0000 (20:02 +0000)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>

src/gallium/drivers/iris/iris_resource.c

index b8c54c7..4cb9612 100644 (file)
@@ -1145,7 +1145,7 @@ iris_resource_get_param(struct pipe_screen *pscreen,
    switch (param) {
    case PIPE_RESOURCE_PARAM_NPLANES:
       if (mod_with_aux) {
-         *value = 2;
+         *value = 2 * util_format_get_num_planes(res->external_format);
       } else {
          unsigned count = 0;
          for (struct pipe_resource *cur = resource; cur; cur = cur->next)