glsl: fix spirv sso validation

The api validation calls will segfault without this as it will
try to fallback to string matching names which are NULL. This
would be incorrect behaviour even if the names weren't NULL so
here we correctly set the explicit location flag.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9483
Fixes: ffdb44d3a0 ("nir/linker: Add inputs/outputs to the program resource list")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24529>
This commit is contained in:
Timothy Arceri 2023-08-07 13:58:57 +10:00 committed by Marge Bot
parent ae6be7a44a
commit a7850f8cf3

View file

@ -589,6 +589,7 @@ add_vars_with_modes(const struct gl_constants *consts,
resource_name_updated(&sh_var->name);
sh_var->type = var->type;
sh_var->location = var->data.location - loc_bias;
sh_var->explicit_location = var->data.explicit_location;
sh_var->index = var->data.index;
if (!link_util_add_program_resource(prog, resource_set,