SPIRV-Cross/reference/shaders-msl-no-opt/asm/packing/packed-vector-extract-insert.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

23 lines
339 B
Plaintext

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct SSBOScalar
{
float2 a;
packed_float3 b;
packed_float3 c;
float3 d;
};
kernel void main0(device SSBOScalar& _6 [[buffer(0)]])
{
float3 _23 = float3(_6.b);
float3 _24 = _23;
_24.z = 2.0;
_6.a = _23.xy * _23.z;
_6.b = _24;
}