iris: Disallow incomplete resource creation
authorNanley Chery <nanley.g.chery@intel.com>
Fri, 2 Aug 2019 22:38:36 +0000 (15:38 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Mon, 28 Oct 2019 17:47:06 +0000 (10:47 -0700)
If a modifier specifies an aux, it must be created.

Fixes: 75a3947af46 ("iris/resource: Fall back to no aux if creation fails")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_resource.c

index a45bcdb71ae028fe4f91040ece2955a5eb5e5bfe..61b47ae73b16dddd7e3e1ef94d5a1e4450b77417 100644 (file)
@@ -888,8 +888,12 @@ iris_resource_create_with_modifiers(struct pipe_screen *pscreen,
       }
    }
 
-   if (!aux_enabled)
-      iris_resource_disable_aux(res);
+   if (!aux_enabled) {
+      if (res->mod_info && res->mod_info->aux_usage != ISL_AUX_USAGE_NONE)
+         goto fail;
+      else
+         iris_resource_disable_aux(res);
+   }
 
    return &res->base;