From 7c7b6e600f801052c23270c6799806d94ed24f67 Mon Sep 17 00:00:00 2001 From: Hugo Devillers Date: Mon, 4 Dec 2023 18:49:22 +0100 Subject: [PATCH] msl: look at the pointee type in emit_tessellation_access_chain --- spirv_msl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) {