SPIRV-Cross/reference
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
..
opt MSL: Cast uses of builtin vectors to their declared SPIR-V type. 2018-09-08 21:17:54 -05:00
shaders Remove extra newline. 2018-08-29 14:04:20 -05:00
shaders-hlsl MSL: Fix naming issue of aliased global variables. 2018-08-27 09:59:55 +02:00
shaders-hlsl-no-opt Declare OpSpecConstantOp up-front on relevant targets. 2018-05-15 14:20:16 +02:00
shaders-msl MSL: Cast uses of builtin vectors to their declared SPIR-V type. 2018-09-08 21:17:54 -05:00
shaders-msl-no-opt Update a bunch of test cases that I missed. 2018-09-03 17:31:15 -05:00
shaders-no-opt Declare OpSpecConstantOp up-front on relevant targets. 2018-05-15 14:20:16 +02:00
shaders-reflection Prefix integer types with underscore 2018-06-21 09:24:22 -07:00