From 65dc4db08e57e30222bd1be30cd8080ed30f1f38 Mon Sep 17 00:00:00 2001 From: Yevhenii Kolesnikov Date: Wed, 20 Feb 2019 15:42:27 +0200 Subject: [PATCH] glsl/standalone: meson test for --dump-builder 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 Reviewed-by: Ian Romanick Reviewed-by: Dylan Baker --- src/compiler/glsl/tests/meson.build | 11 +++++++++++ src/compiler/glsl/tests/standalone_dump-builder.frag | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/compiler/glsl/tests/standalone_dump-builder.frag diff --git a/src/compiler/glsl/tests/meson.build b/src/compiler/glsl/tests/meson.build index a7a0a5b7c7f..dc017ca4072 100644 --- a/src/compiler/glsl/tests/meson.build +++ b/src/compiler/glsl/tests/meson.build @@ -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 index 00000000000..680f3347451 --- /dev/null +++ b/src/compiler/glsl/tests/standalone_dump-builder.frag @@ -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)); +} -- 2.30.2