aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-03-11 13:27:43 -0600
committerBrian Paul <brianp@vmware.com>2013-03-11 13:27:43 -0600
commitec734117570c94b0ad1bfa114d4a204b296dea24 (patch)
treeeff0b78b564e66c0ea364f88f53b15677bcacd0b /tests
parent40e482e4a7e4907422f13248750ee0db2954f497 (diff)
fbo-maxsize: minor test improvements
Clear the large FBO to a non-black color and probe for it in the final test. This uncovers a bug in Mesa's llvmpipe driver where we ran out of bin commmand memory and skipped some tiles, leaving them black. Setting the clear color to white (and actually clearing the FBO) helps to detect that.
Diffstat (limited to 'tests')
-rw-r--r--tests/fbo/fbo-maxsize.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/fbo/fbo-maxsize.c b/tests/fbo/fbo-maxsize.c
index ef886007..905afc05 100644
--- a/tests/fbo/fbo-maxsize.c
+++ b/tests/fbo/fbo-maxsize.c
@@ -140,6 +140,9 @@ static int create_fbo(void)
glViewport(0, 0, maxsize, maxsize);
piglit_ortho_projection(maxsize, maxsize, GL_FALSE);
+ glClearColor(1.0, 1.0, 1.0, 1.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+
x0 = maxsize / 4;
x1 = maxsize * 3 / 4;
y0 = maxsize / 4;
@@ -188,10 +191,13 @@ piglit_display(void)
int x2 = (piglit_width / 4) * 3;
int y1 = piglit_height / 4;
int y2 = (piglit_height / 4) * 3;
+ int cx = piglit_width / 2;
+ int cy = piglit_height / 2;
float c1[3] = {0.25, 0.25, 0.25};
float c2[3] = {0.75, 0.25, 0.25};
float c3[3] = {0.25, 0.75, 0.75};
float c4[3] = {0.75, 0.75, 0.75};
+ float white[3] = {1.0, 1.0, 1.0};
glClearColor(0.5, 0.5, 0.5, 0.5);
glClear(GL_COLOR_BUFFER_BIT);
@@ -212,11 +218,13 @@ piglit_display(void)
draw_tex_sub_rect(x2, y1);
draw_tex_sub_rect(x1, y2);
draw_tex_sub_rect(x2, y2);
+ draw_tex_sub_rect(cx, cy);
pass &= piglit_probe_pixel_rgb(x1, y1, c1);
pass &= piglit_probe_pixel_rgb(x2, y1, c2);
pass &= piglit_probe_pixel_rgb(x1, y2, c3);
pass &= piglit_probe_pixel_rgb(x2, y2, c4);
+ pass &= piglit_probe_pixel_rgb(cx, cy, white);
glDeleteTextures(1, &tex);
glDisable(GL_TEXTURE_2D);