Merge pull request #2290 from KhronosGroup/fix-2287

MSL: Fix type hierarchy for extended vectors.
This commit is contained in:
Hans-Kristian Arntzen 2024-03-06 15:26:57 +01:00 committed by GitHub
commit 2a7c818492
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2377,7 +2377,9 @@ uint32_t CompilerMSL::build_extended_vector_type(uint32_t type_id, uint32_t comp
if (basetype != SPIRType::Unknown)
type->basetype = basetype;
type->self = new_type_id;
type->parent_type = type_id;
// We want parent type to point to the scalar type.
type->parent_type = is_scalar(*p_old_type) ? TypeID(p_old_type->self) : p_old_type->parent_type;
assert(is_scalar(get<SPIRType>(type->parent_type)));
type->array.clear();
type->array_size_literal.clear();
type->pointer = false;