summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/hlsl-intrinsic/matrix-int-mul.slang18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/hlsl-intrinsic/matrix-int-mul.slang b/tests/hlsl-intrinsic/matrix-int-mul.slang
new file mode 100644
index 000000000..d78a486a9
--- /dev/null
+++ b/tests/hlsl-intrinsic/matrix-int-mul.slang
@@ -0,0 +1,18 @@
+//TEST:SIMPLE(filecheck=CHECK):-target hlsl -entry main -stage compute
+
+//CHECK-NOT: error 39999: ambiguous call to 'mul'
+
+[shader("compute")]
+void main() {
+ int2x2 matrixA = {
+ 1, 2,
+ 3, 4
+ };
+ int2 vecA = {
+ 1, 2
+ };
+
+ int2x2 matrixB = mul(matrixA, matrixA); // M * M
+ int2 vecB = mul(vecA, matrixA); // V * M
+ int2 vecC = mul(matrixA, vecA); // M * V
+}