SPIRV-Cross/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 Fix image load/store on cube arrays in MSL. 2018-05-25 12:43:25 +02:00
desktop-only MSL: Throw error on multisampled array textures. 2018-09-03 10:21:59 +02:00
flatten Use declared binding in SPIR-V as a fallback for explicit MSL binds. 2018-04-04 12:25:11 +02:00
frag Handle interpolation qualifiers on the entire struct, too. 2018-09-06 12:29:42 -05:00
legacy/vert Enhance MSL testing and add numerous MSL test cases. 2017-01-30 22:55:21 -05:00
vert Handle interpolation qualifiers on the entire struct, too. 2018-09-06 12:29:42 -05:00
vulkan MSL: Do not emit function constants for version < 1.2. 2018-09-07 09:33:34 +02:00