f7dad9da66
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. |
||
---|---|---|
.. | ||
opt | ||
shaders | ||
shaders-hlsl | ||
shaders-hlsl-no-opt | ||
shaders-msl | ||
shaders-msl-no-opt | ||
shaders-no-opt | ||
shaders-reflection |