diff options
author | Brian Paul <brianp@vmware.com> | 2014-09-22 10:30:18 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2014-09-23 16:47:26 -0600 |
commit | 419831044f2e255f27936ce207cc2558bc6d94cc (patch) | |
tree | 2630481fe6d30ed2cd918d16bf1f23d0d8d8b3b3 /tests/spec/arb_es2_compatibility | |
parent | ccb3df4d3ed4bcf0962206cb8c74ca3b42e3c9fd (diff) |
fbo-missing-attachment-clear: probe correct buffer size
The piglit_probe_rect_depth() was invalid because it was using the
piglit window size rather than the FBO size.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Diffstat (limited to 'tests/spec/arb_es2_compatibility')
-rw-r--r-- | tests/spec/arb_es2_compatibility/fbo-missing-attachment-clear.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/spec/arb_es2_compatibility/fbo-missing-attachment-clear.c b/tests/spec/arb_es2_compatibility/fbo-missing-attachment-clear.c index 381253c5e..4b1ffd202 100644 --- a/tests/spec/arb_es2_compatibility/fbo-missing-attachment-clear.c +++ b/tests/spec/arb_es2_compatibility/fbo-missing-attachment-clear.c @@ -51,6 +51,8 @@ PIGLIT_GL_TEST_CONFIG_BEGIN PIGLIT_GL_TEST_CONFIG_END +#define BUF_SIZE 32 + enum piglit_result piglit_display(void) { @@ -72,7 +74,7 @@ piglit_init(int argc, char **argv) */ glGenTextures(1, &tex); glBindTexture(GL_TEXTURE_2D, tex); - glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 32, 32, 0, + glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, BUF_SIZE, BUF_SIZE, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL); glGenFramebuffers(1, &fb); @@ -95,14 +97,14 @@ piglit_init(int argc, char **argv) printf("Clearing depth buffer to 0.0...\n"); glClearDepth(0.0); glClear(GL_DEPTH_BUFFER_BIT); - pass = piglit_probe_rect_depth(0, 0, piglit_width, piglit_height, 0.0); + pass = piglit_probe_rect_depth(0, 0, BUF_SIZE, BUF_SIZE, 0.0); /* Clear the depth buffer and the color buffer to different values. */ printf("Clearing depth buffer to 0.5...\n"); glClearDepth(0.5); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - pass = piglit_probe_rect_depth(0, 0, piglit_width, piglit_height, 0.5) + pass = piglit_probe_rect_depth(0, 0, BUF_SIZE, BUF_SIZE, 0.5) && pass; if (!piglit_check_gl_error(GL_NO_ERROR)) |