From 59726f003b75c01ac7d0025067e755b6f1b715da Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 21 Sep 2015 17:57:13 -0700 Subject: fbo-depth-sample-compare: Use piglit_build_simple_program MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ian Romanick Reviewed-by: Matt Turner Thanked-by: Kristian Høgsberg --- tests/fbo/fbo-depth-sample-compare.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/fbo/fbo-depth-sample-compare.c b/tests/fbo/fbo-depth-sample-compare.c index d6f7504cb..7a2b1e7b4 100644 --- a/tests/fbo/fbo-depth-sample-compare.c +++ b/tests/fbo/fbo-depth-sample-compare.c @@ -165,17 +165,11 @@ create_frag_shader(void) " gl_FragColor = vec4(diff, 0, 0, 0); \n" " gl_FragDepth = gl_FragCoord.z; \n" "} \n"; - GLuint fs; GLint zTex, errorScale, sizeScale; + const char *const fs_source = (TexTarget == GL_TEXTURE_2D) + ? text_2d : text_rect; - if (TexTarget == GL_TEXTURE_2D) - fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, text_2d); - else - fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, text_rect); - - assert(fs); - - ShaderProg = piglit_link_simple_program(0, fs); + ShaderProg = piglit_build_simple_program(NULL, fs_source); assert(ShaderProg); glUseProgram(ShaderProg); -- cgit v1.2.3