aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-07-31 19:43:03 +0200
committerMarek Olšák <maraeo@gmail.com>2010-07-31 19:43:10 +0200
commit9646844437fa6d48f97acdc86eab62a8d00c61b6 (patch)
tree68b36f0585236424650d5f1694a07e676e5499f8
parentc905374da83d79dfd9ff1007f1fdf0201c72a69c (diff)
vp-arl-constant-array-huge-relative-offset: new test for ARB_vp issue with Mesa
-rw-r--r--tests/all.tests1
-rw-r--r--tests/shaders/generic/vp-arl-constant-array-huge-relative-offset.vpfp147
2 files changed, 148 insertions, 0 deletions
diff --git a/tests/all.tests b/tests/all.tests
index 812784ae..2137627e 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -426,6 +426,7 @@ add_vpfpgeneric('vp-arl-constant-array-huge-varying')
add_vpfpgeneric('vp-arl-constant-array-huge-offset')
add_vpfpgeneric('vp-arl-constant-array-huge-offset-neg')
add_vpfpgeneric('vp-arl-constant-array-huge-overwritten')
+add_vpfpgeneric('vp-arl-constant-array-huge-relative-offset')
add_vpfpgeneric('vp-arl-constant-array-varying')
add_vpfpgeneric('vp-arl-env-array')
add_vpfpgeneric('vp-arl-local-array')
diff --git a/tests/shaders/generic/vp-arl-constant-array-huge-relative-offset.vpfp b/tests/shaders/generic/vp-arl-constant-array-huge-relative-offset.vpfp
new file mode 100644
index 00000000..7160817a
--- /dev/null
+++ b/tests/shaders/generic/vp-arl-constant-array-huge-relative-offset.vpfp
@@ -0,0 +1,147 @@
+; Tests loading of a variable entry in a large constant array with an offset.
+
+!!ARBvp1.0
+OPTION ARB_position_invariant;
+PARAM vals[] = {
+ {0.5, 1.0, 2.0, 0.0},
+ {1.0, 0.0, 0.8, 0.0},
+ {1.0, 0.0, 0.5, 0.0},
+ {0.8, 1.0, 0.0, 0.0},
+ {0.5, 1.0, 2.0, 0.0},
+ {1.0, 0.0, 0.8, 0.0},
+ {1.0, 0.0, 0.5, 0.0},
+ {0.8, 1.0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+ {0.5, 1.0, 2.0, 0.0},
+ {1.0, 0.0, 0.8, 0.0},
+ {1.0, 0.0, 0.5, 0.0},
+ {0.8, 1.0, 0.0, 0.0},
+ {0.5, 1.0, 2.0, 0.0},
+ {1.0, 0.0, 0.8, 0.0},
+ {1.0, 0.0, 0.5, 0.0},
+ {0.8, 1.0, 0.0, 0.0},
+ {0.5, 1.0, 2.0, 0.0},
+ {1.0, 0.0, 0.8, 0.0},
+ {1.0, 0.0, 0.5, 0.0},
+ {0.8, 1.0, 0.0, 0.0},
+ {0.5, 1.0, 2.0, 0.0},
+ {1.0, 0.0, 0.8, 0.0},
+ {1.0, 0.0, 0.5, 0.0},
+ {0.8, 1.0, 0.0, 0.0}
+ };
+ADDRESS A0;
+
+ARL A0.x, program.local[0].x;
+MOV result.color, vals[A0.x+109];
+END
+
+!!ARBfp1.0
+MOV result.color, fragment.color;
+END
+
+!!test
+vertex.local[0] -1.0 0.0 0.0 0.0
+expected 0.5 1.0 1.0 0.0
+!!test
+vertex.local[0] 0.0 0.0 0.0 0.0
+expected 1.0 0.0 0.8 0.0
+!!test
+vertex.local[0] 1.0 0.0 0.0 0.0
+expected 1.0 0.0 0.5 0.0
+!!test
+vertex.local[0] 2.0 0.0 0.0 0.0
+expected 0.8 1.0 0.0 0.0
+