SPIRV-Cross/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding.asm.comp
Chip Davis 68f0257f26 Use --preserve-numeric-ids when assembling test shaders.
This makes it easier to debug codegen for these shaders.
2023-06-23 14:54:16 -07:00

24 lines
631 B
Plaintext

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
typedef packed_float3 packed_rm_float3x3[3];
struct SSBOScalar
{
packed_float3 a;
packed_rm_float3x3 b;
packed_rm_float3x3 c;
};
kernel void main0(device SSBOScalar& _6 [[buffer(0)]])
{
float3x3 _24 = transpose(float3x3(float3(_6.b[0]), float3(_6.b[1]), float3(_6.b[2])));
_6.b[0] = float3x3(float3(_6.c[0]), float3(_6.c[1]), float3(_6.c[2]))[0];
_6.b[1] = float3x3(float3(_6.c[0]), float3(_6.c[1]), float3(_6.c[2]))[1];
_6.b[2] = float3x3(float3(_6.c[0]), float3(_6.c[1]), float3(_6.c[2]))[2];
_6.a = _24 * float3(_6.a);
}