glsl/standalone: meson test for --dump-builder
authorYevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Wed, 20 Feb 2019 13:42:27 +0000 (15:42 +0200)
committerDylan Baker <dylan@pnwbakers.com>
Wed, 3 Jul 2019 19:13:37 +0000 (12:13 -0700)
Added meson test for standalone compiler with --dump-builder option
on builtin texture* functions.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107767
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
src/compiler/glsl/tests/meson.build
src/compiler/glsl/tests/standalone_dump-builder.frag [new file with mode: 0644]

index a7a0a5b7c7f22f3fd581e51457b6234cc242f7a3..dc017ca4072f5cc07303ce1a891d0920da201db9 100644 (file)
@@ -111,3 +111,14 @@ test(
   ],
   suite : ['compiler', 'glsl'],
 )
+
+if with_tools.contains('glsl')
+  test(
+    'glsl dump-builder test',
+    glsl_compiler,
+    args : ['--version', '110', '--dump-builder',
+            join_paths(meson.current_source_dir(), 'standalone_dump-builder.frag'),
+           ],
+    suite : ['compiler', 'glsl'],
+  )
+endif
diff --git a/src/compiler/glsl/tests/standalone_dump-builder.frag b/src/compiler/glsl/tests/standalone_dump-builder.frag
new file mode 100644 (file)
index 0000000..680f334
--- /dev/null
@@ -0,0 +1,12 @@
+varying vec2 Var_18;
+uniform sampler2D Var_19;
+uniform sampler2D Var_1A;
+uniform float Var_1B;
+void main()
+{
+   vec3 Var_21 = texture2D(Var_19, Var_18).xyz;
+   vec3 Var_22 = texture2D(Var_1A, Var_18).xyz;
+   vec3 Var_23 = ((Var_22 - Var_21) / Var_1B);
+   (Var_22 += (Var_23 * Var_1B));
+   (gl_FragColor = vec4(Var_22, 1.0));
+}