iris: Disallow incomplete resource creation

If a modifier specifies an aux, it must be created.

Fixes: 75a3947af4 ("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>
(cherry picked from commit d298740a1c)
This commit is contained in:
Nanley Chery 2019-08-02 15:38:36 -07:00 committed by Dylan Baker
parent 8cb1070ea3
commit 7affc43e81

View file

@ -863,8 +863,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;