summaryrefslogtreecommitdiffstats
path: root/tests/bugs/implicit-conversion-binary-op.hlsl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs/implicit-conversion-binary-op.hlsl')
-rw-r--r--tests/bugs/implicit-conversion-binary-op.hlsl16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/bugs/implicit-conversion-binary-op.hlsl b/tests/bugs/implicit-conversion-binary-op.hlsl
new file mode 100644
index 000000000..75ff737da
--- /dev/null
+++ b/tests/bugs/implicit-conversion-binary-op.hlsl
@@ -0,0 +1,16 @@
+// implicit-conversion-binary-op.hlsl
+//TEST:COMPARE_HLSL: -profile ps_5_0 -target dxbc-assembly
+
+// Make sure that we can pick resolve the right overload
+// to call when applying a binary operator to vectors
+// with different element types. We should pick
+// the "better" of the two element types, and not
+// get an ambiguity error.
+
+float4 main(
+ float4 a : A,
+ uint4 b : B
+ ) : SV_Target
+{
+ return a * b;
+}