diff --git a/spirv_msl.cpp b/spirv_msl.cpp index d96ae735..d45da450 100644 --- a/spirv_msl.cpp +++ b/spirv_msl.cpp @@ -8264,8 +8264,9 @@ bool CompilerMSL::emit_tessellation_access_chain(const uint32_t *ops, uint32_t l // We're not going to emit the actual member name, we let any further OpLoad take care of that. // Tag the access chain with the member index we're referencing. - bool defer_access_chain = flatten_composites && (is_matrix(result_ptr_type) || is_array(result_ptr_type) || - result_ptr_type.basetype == SPIRType::Struct); + auto& result_pointee_type = get_pointee_type(result_ptr_type); + bool defer_access_chain = flatten_composites && (is_matrix(result_pointee_type) || is_array(result_pointee_type) || + result_pointee_type.basetype == SPIRType::Struct); if (!defer_access_chain) {