vkd3d-shader/msl: Implement support for VKD3DSPR_TEMP registers.
Introduce a union type for representing 4-components vector registers.
union vkd3d_vec4
{
uint4 u;
int4 i;
float4 f;
};
So add r0.xyzw, r1.xyzw, r2.xyzw
becomes
vkd3d_vec4 r[3];
...
r[0].f.xyzw = r[1].f.xyzw + r[2].f.xyzw;
...
I tested several handcrafted shaders. Metal compiler can always yield the simplest LLVM IR, it can even eliminate bitcast.