summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2019-08-02 15:38:36 -0700
committerNanley Chery <[email protected]>2019-10-28 10:47:06 -0700
commitd298740a1c1c7798d21a0978d6fa5f72ee97b9fe (patch)
treeaeb39343d59a925f8a726e7f65feb20c34382a8b /src
parentf2fc5dece93019f0bab203247985cf350d541156 (diff)
iris: Disallow incomplete resource creation
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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_resource.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index a45bcdb71ae..61b47ae73b1 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -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;