summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@collabora.com>2022-09-01 16:15:43 -0400
committerAlyssa Rosenzweig <alyssa@collabora.com>2022-09-01 16:16:36 -0400
commit71200fc98d65f337dacea7009407ab9dfa342353 (patch)
tree71db05d6483b264c2779862a9490ebf7c75efe3a
parenta63ce3babee727177da3b3e5f28ce43be79db4c9 (diff)
Add shader using Mali "dual texturing" of uniformsdualt
This triggers the bug fixed in the Bifrost compiler by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18378 Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
-rw-r--r--shaders/alyssa/dualtex.shader_test29
1 files changed, 29 insertions, 0 deletions
diff --git a/shaders/alyssa/dualtex.shader_test b/shaders/alyssa/dualtex.shader_test
new file mode 100644
index 0000000..59de789
--- /dev/null
+++ b/shaders/alyssa/dualtex.shader_test
@@ -0,0 +1,29 @@
+[require]
+GLSL >= 1.20
+
+[fragment shader]
+uniform sampler2D sampler0;
+uniform sampler2D sampler1;
+uniform sampler2D sampler2;
+uniform sampler2D sampler3;
+uniform vec2 u_texcoord;
+
+varying vec2 v_texcoord;
+
+void main()
+{
+ gl_FragColor = texture2D(sampler0, u_texcoord) + texture2D(sampler2, v_texcoord) +
+ texture2D(sampler1, v_texcoord) + texture2D(sampler3, u_texcoord);
+}
+
+[vertex shader]
+#version 120
+
+varying vec2 v_texcoord;
+
+void main()
+{
+ gl_Position = gl_Vertex;
+ v_texcoord = (gl_Vertex.xy + vec2(1, 1)) / 2.0;
+}
+