[Piglit] [PATCH 14/17] fbo-depth-sample-compare: Use piglit_build_simple_program

Ian Romanick idr at freedesktop.org
Tue Sep 22 08:36:39 PDT 2015


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 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 d6f7504..7a2b1e7 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);
-- 
2.1.0



More information about the Piglit mailing list