summaryrefslogtreecommitdiff
path: root/tests/shaders
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2018-04-03 10:01:36 +0300
committerTapani Pälli <tapani.palli@intel.com>2018-04-04 13:20:56 +0300
commit965b55efbdf37985c731d68259012fdc5cef3d09 (patch)
tree0eb6684c059e568d6bd433d772c8ab187b32d692 /tests/shaders
parentccb54c5fe8d21194495922cf8d6ab41dbd3aa649 (diff)
add new indexing test with dynamic indexing of integer vector
Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105438 Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Diffstat (limited to 'tests/shaders')
-rw-r--r--tests/shaders/glsl-fs-vec4-indexing-8.shader_test20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/shaders/glsl-fs-vec4-indexing-8.shader_test b/tests/shaders/glsl-fs-vec4-indexing-8.shader_test
new file mode 100644
index 000000000..3ff99785d
--- /dev/null
+++ b/tests/shaders/glsl-fs-vec4-indexing-8.shader_test
@@ -0,0 +1,20 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader passthrough]
+
+[fragment shader]
+uniform float id;
+void main()
+{
+ ivec4 test = ivec4(0, 1, 0, 0);
+ vec4 test2 = vec4(0.0, 1.0, 0.0, 0.0);
+ int index = int(id);
+ float col = test2[test[index]];
+ gl_FragColor = vec4(col);
+}
+
+[test]
+uniform float id 1
+draw rect -1 -1 2 2
+probe rgb 1 1 1.0 1.0 1.0