Closed chaoticbob closed 6 days ago
The shader below is generating a baffling error message for a post-op multiplication expression:
error 39999: ambiguous call to 'mul' with arguments of type (matrix<int,2,2>, vector<int,2>) b.zw = mul(a, b.yx); ^ hlsl.meta.slang(10850): note 39999: candidate: func mul<int, 2, 2>(int2x2, int2) -> int2 hlsl.meta.slang(10826): note 39999: candidate: func mul<int, 2, 2>(int2x2, int2) -> int2
As far as I can tell this is a int2x2 * int2 which should work?
int2x2 * int2
CMD
slangc.exe -target spirv -lang slang -D__spirv__ -emit-spirv-directly -profile ps_6_0 -entry main shader.slang
Shader
void main() { int2x2 a; int4 b; b.zw = mul(a, b.yx); }
The error message means that Slang found two functions matching to the given expression and it cannot decide which one to use. Most likely it is a bug in our Slang stdlib. I will take a look at it tomorrow.
The shader below is generating a baffling error message for a post-op multiplication expression:
As far as I can tell this is a
int2x2 * int2
which should work?CMD
Shader