diff --git a/Modules/Graphics/RHI/Metal/Sources/Methane/Graphics/Metal/Shader.mm b/Modules/Graphics/RHI/Metal/Sources/Methane/Graphics/Metal/Shader.mm index af680a25c..81480758d 100644 --- a/Modules/Graphics/RHI/Metal/Sources/Methane/Graphics/Metal/Shader.mm +++ b/Modules/Graphics/RHI/Metal/Sources/Methane/Graphics/Metal/Shader.mm @@ -118,7 +118,7 @@ static uint32_t GetBindingBufferSize(id mtl_binding) switch(mtl_struct_member.dataType) { case MTLDataTypeArray: - return GetResourceTypeByMetalDataType(static_cast(mtl_struct_member).elementType); + return GetResourceTypeByMetalDataType(mtl_struct_member.arrayType.elementType); default: return GetResourceTypeByMetalDataType(mtl_struct_member.dataType); @@ -129,7 +129,7 @@ static uint32_t GetBindingBufferSize(id mtl_binding) static uint32_t GetArraySizeOfStructMember(MTLStructMember* mtl_struct_member) { return mtl_struct_member.dataType == MTLDataTypeArray - ? static_cast(mtl_struct_member).arrayLength + ? mtl_struct_member.arrayType.arrayLength : 1U; }