From: Ian Romanick <[email protected]>
Signed-off-by: Ian Romanick <[email protected]>
---
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
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit