SPIRV-Cross/reference/shaders-msl
Chip Davis f7dad9da66 MSL: Cast uses of builtin vectors to their declared SPIR-V type.
In SPIR-V, builtin integral vectors can be either signed or unsigned,
but in MSL they're always unsigned. Unfortunately, the MSL spec forbids
implicit conversions between vector types--even if the corresponding
scalar types would implicitly convert. If you try, the result is a
cryptic error message such as:

```
program_source:37:60: error: cannot convert between vector values of different size ('int4' (aka 'vector_int4') and 'vector_uint4' (vector of 4 'unsigned int' values))
            float4 r3 = as_type<float4>((as_type<int4>(r0) * gl_LocalInvocationID.xyyy) + as_type<int4>(r2));
                                         ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
```

Therefore, uses of these builtins must be explicitly cast, since the
rest of the binary likely assumes that the builtin is of its declared
type.
2018-09-08 21:17:54 -05:00
..
asm MSL: Cast uses of builtin vectors to their declared SPIR-V type. 2018-09-08 21:17:54 -05:00
comp Deduce constant LUTs from read-write variables. 2018-07-05 13:25:57 +02:00
desktop-only MSL: Throw error on multisampled array textures. 2018-09-03 10:21:59 +02:00
flatten MSL: Emit F{Min,Max,Clamp} as fast:: and N{Min,Max,Clamp} as precise::. 2018-09-01 23:01:46 -05:00
frag Handle interpolation qualifiers on the entire struct, too. 2018-09-06 12:29:42 -05:00
legacy/vert CompilerMSL support matrices & arrays in stage-in & stage-out. 2018-06-12 11:41:35 -04:00
vert Handle interpolation qualifiers on the entire struct, too. 2018-09-06 12:29:42 -05:00
vulkan Use correct spirv-cross version when testing MSL 1.1 shaders. 2018-09-07 09:45:25 +02:00