aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/all.tests1
-rw-r--r--tests/shaders/generic/vp-constant-negate.vpfp22
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/all.tests b/tests/all.tests
index 632d357b..8422586f 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -758,6 +758,7 @@ add_vpfpgeneric('vp-arl-neg-array')
add_vpfpgeneric('vp-arl-neg-array-2')
add_vpfpgeneric('vp-constant-array')
add_vpfpgeneric('vp-constant-array-huge')
+add_vpfpgeneric('vp-constant-negate')
add_vpfpgeneric('vp-exp-alias')
add_vpfpgeneric('vp-max')
add_vpfpgeneric('vp-min')
diff --git a/tests/shaders/generic/vp-constant-negate.vpfp b/tests/shaders/generic/vp-constant-negate.vpfp
new file mode 100644
index 00000000..b33f9f1f
--- /dev/null
+++ b/tests/shaders/generic/vp-constant-negate.vpfp
@@ -0,0 +1,22 @@
+; Checks for a bug in the 965 driver in handling negation of constants.
+
+!!ARBvp1.0
+OPTION ARB_position_invariant;
+
+TEMP temp1, temp2;
+MOV temp1, 2.0;
+MOV temp2, -2.0;
+ADD temp1, temp1, temp2;
+ABS temp1, temp1;
+SLT temp1, -temp1, {0.0};
+MOV result.color, {0.0, 1.0, 0.0, 0.0};
+MOV result.color.x, temp1;
+END
+
+!!ARBfp1.0
+MOV result.color, fragment.color;
+END
+
+!!test
+expected 0.0 1.0 0.0 0.0
+