msl: look at the pointee type in emit_tessellation_access_chain

This commit is contained in:
Hugo Devillers 2023-12-04 18:49:22 +01:00
parent 8632f67109
commit 7c7b6e600f

View File

@ -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)
{