SPIRV-Cross/reference/opt/shaders-msl/asm/comp
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
..
bitcast_iadd.asm.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
bitcast_sar.asm.comp Expand the implementation of inherit_expression_dependencies. 2018-03-09 13:21:38 +01:00
bitcast_sdiv.asm.comp Expand the implementation of inherit_expression_dependencies. 2018-03-09 13:21:38 +01:00
bitcast_slr.asm.comp Expand the implementation of inherit_expression_dependencies. 2018-03-09 13:21:38 +01:00
buffer-write-relative-addr.asm.comp MSL: Cast uses of builtin vectors to their declared SPIR-V type. 2018-09-08 21:17:54 -05:00
buffer-write.asm.comp MSL: Emit spvTexelBufferCoord() on ImageWrite to a Buffer as well. 2018-09-04 12:14:34 -05:00
global-parameter-name-alias.asm.comp MSL: Fix naming issue of aliased global variables. 2018-08-27 09:59:55 +02:00
multiple-entry.asm.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
quantize.asm.comp Add reference output for --opt. 2017-11-23 09:50:11 +01:00
specialization-constant-workgroup.asm.comp Update glslang/SPIRV-Tools on Travis. 2018-03-24 04:16:18 +01:00
storage-buffer-basic.invalid.asm.comp Deal with scoping for Private variables. 2018-05-16 10:49:30 +02:00
vector-builtin-type-cast-func.asm.comp MSL: Cast uses of builtin vectors to their declared SPIR-V type. 2018-09-08 21:17:54 -05:00
vector-builtin-type-cast.asm.comp MSL: Cast uses of builtin vectors to their declared SPIR-V type. 2018-09-08 21:17:54 -05:00