From d298740a1c1c7798d21a0978d6fa5f72ee97b9fe Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Fri, 2 Aug 2019 15:38:36 -0700 Subject: [PATCH] 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 Reviewed-by: Kenneth Graunke --- src/gallium/drivers/iris/iris_resource.c | 8 ++++++-- 1 file 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; -- 2.30.2