diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2015-09-21 17:57:13 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2015-09-29 14:33:56 -0700 |
commit | 59726f003b75c01ac7d0025067e755b6f1b715da (patch) | |
tree | c9ef9dba2a5e957deb31cf8aac7b40214d928d96 /tests | |
parent | fd459e7fecd418c2c8e85af4c844876b0de5f228 (diff) |
fbo-depth-sample-compare: Use piglit_build_simple_program
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Thanked-by: Kristian Høgsberg <krh@bitplanet.net>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fbo/fbo-depth-sample-compare.c | 12 |
1 files 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); |