From: Yevhenii Kolesnikov Date: Wed, 20 Feb 2019 13:42:27 +0000 (+0200) Subject: glsl/standalone: meson test for --dump-builder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=65dc4db08e57e30222bd1be30cd8080ed30f1f38;p=mesa.git 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 --- 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)); +}