Description
sign() called on a uint matrix with at least two rows and two columns generates invalid SPIR-V, as codegen attempts to construct an array of unsigned integer vectors from signed integer vectors.
Steps to Reproduce
Godbolt
Compile with dxc -T cs_6_0 -E main -Od -spirv source.hlsl:
[numthreads(1,1,1)]
void main() {
uint2x2 u;
int2x2 result = sign(u);
}
Actual Behavior
fatal error: generated SPIR-V is invalid: Expected Constituent type to be equal to the column type Result Type array
%34 = OpCompositeConstruct %_arr_v2uint_uint_2 %30 %33
Disabling validation shows that we are trying to construct an array of unsigned integer vectors from signed integer vectors:
%30 = OpSelect %v2int %29 %11 %10
[...]
%33 = OpSelect %v2int %32 %11 %10
%34 = OpCompositeConstruct %_arr_v2uint_uint_2 %30 %33
Environment
- DXC version:
libdxcompiler.so: 1.10(5474-942eeceb)(1.9.0.15470)
- Host Operating System: Fedora Linux 43 <!--- Host operating system and version --->
Description
sign()called on a uint matrix with at least two rows and two columns generates invalid SPIR-V, as codegen attempts to construct an array of unsigned integer vectors from signed integer vectors.Steps to Reproduce
Godbolt
Compile with
dxc -T cs_6_0 -E main -Od -spirv source.hlsl:Actual Behavior
Disabling validation shows that we are trying to construct an array of unsigned integer vectors from signed integer vectors:
Environment
libdxcompiler.so: 1.10(5474-942eeceb)(1.9.0.15470)