summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2014-10-15 14:36:43 +0300
committerTapani Pälli <tapani.palli@intel.com>2015-01-07 08:31:51 +0200
commitfa7dcba7cf4b442060e6d485bcbe2e6469fbdc2e (patch)
tree796dbdba9f488376942aae7b2fabd628934f0e1e
parent4adb082244889c7ae3ed0a8f9716599bac17cb39 (diff)
glsl: test for sampling using same unit but different uniform
Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
-rw-r--r--tests/shaders/glsl-fs-texture-uniforms-share-same-unit.shader_test24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/shaders/glsl-fs-texture-uniforms-share-same-unit.shader_test b/tests/shaders/glsl-fs-texture-uniforms-share-same-unit.shader_test
new file mode 100644
index 000000000..48085776b
--- /dev/null
+++ b/tests/shaders/glsl-fs-texture-uniforms-share-same-unit.shader_test
@@ -0,0 +1,24 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader passthrough]
+
+[fragment shader]
+
+uniform sampler2D tex0;
+uniform sampler2D tex1;
+
+void main()
+{
+ // 2 samples using same unit but different uniform
+ vec4 a = texture2D(tex0, vec2(0.0, 0.0));
+ vec4 b = texture2D(tex1, vec2(0.0, 0.5));
+ gl_FragColor = mix(a, b, 0.5);
+}
+
+[test]
+uniform int tex0 0
+uniform int tex1 0
+texture rgbw 0 (8, 8)
+draw rect -1 -1 2 2
+relative probe rgb (0.25, 0.25) (0.5, 0.0, 0.5)