From: Nanley Chery Date: Fri, 2 Aug 2019 22:38:36 +0000 (-0700) Subject: iris: Disallow incomplete resource creation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d298740a1c1c7798d21a0978d6fa5f72ee97b9fe;p=mesa.git 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 --- 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;