Merge pull request #2289 from KhronosGroup/fix-2279

Fix crash when traversing PtrAccessChain to OpTypeStruct.
This commit is contained in:
Hans-Kristian Arntzen 2024-03-06 14:32:27 +01:00 committed by GitHub
commit c2eb27c172
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4428,11 +4428,9 @@ bool Compiler::ActiveBuiltinHandler::handle(spv::Op opcode, const uint32_t *args
for (uint32_t i = 0; i < count; i++)
{
// Pointers
// PtrAccessChain functions more like a pointer offset. Type remains the same.
if (opcode == OpPtrAccessChain && i == 0)
{
type = &compiler.get<SPIRType>(type->parent_type);
continue;
}
// Arrays
if (!type->array.empty())