On 04/03/2018 12:03 PM, Alejandro Piñeiro wrote:


On 03/04/18 09:01, Tapani Pälli wrote:
Signed-off-by: Tapani Pälli <tapani.pa...@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105438
---
  tests/shaders/glsl-fs-vec4-indexing-8.shader_test | 24 +++++++++++++++++++++++
  1 file changed, 24 insertions(+)
  create mode 100644 tests/shaders/glsl-fs-vec4-indexing-8.shader_test

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..ab01fa900
--- /dev/null
+++ b/tests/shaders/glsl-fs-vec4-indexing-8.shader_test
@@ -0,0 +1,24 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+void main()
+{
+       gl_Position = gl_Vertex;
+}

Why not just "[vertex shader passthrough]"?

Sure, will change this, this part was just copy-paste.


+
+[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

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to