Commit 9cad8566 authored by Chris Forbes's avatar Chris Forbes Committed by Chad Versace

Convert all glutSwapBuffers to piglit_present_results

V2: Don't break tests/general/read-front
Reviewed-by: Paul Berry's avatarPaul Berry <stereotype441@gmail.com>
Reviewed-by: default avatarChad Versace <chad.versace@linux.intel.com>
parent 9c6ac73c
......@@ -88,7 +88,7 @@ piglit_display(void)
pass = pass && piglit_probe_pixel_rgb(200, 150, gray);
glFinish();
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -78,7 +78,7 @@ piglit_display(void)
pass &= piglit_probe_pixel_rgb(0, 0, red);
pass &= piglit_probe_pixel_rgb(2, 0, white);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......@@ -74,7 +74,7 @@ piglit_display(void)
pass &= piglit_probe_rect_rgb(50, 50, 20, 10, red);
pass &= piglit_probe_rect_rgb(50, 60, 20, 10, black);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......@@ -151,7 +151,7 @@ piglit_display(void)
}
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......@@ -140,7 +140,7 @@ piglit_display(void)
}
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......@@ -98,7 +98,7 @@ piglit_display(void)
pass &= test(GL_MIRROR_CLAMP_TO_BORDER_EXT, 3, 1);
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -104,7 +104,7 @@ piglit_display(void)
else
result = PIGLIT_FAIL;
glutSwapBuffers();
piglit_present_results();
return result;
}
......
......@@ -76,7 +76,7 @@ piglit_display(void)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0,
GL_RGBA, GL_UNSIGNED_BYTE, image);
glutSwapBuffers();
piglit_present_results();
return PIGLIT_PASS;
}
......
......@@ -137,7 +137,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -178,7 +178,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -137,7 +137,7 @@ piglit_display(void)
pass = piglit_probe_pixel_rgba(piglit_width * 5 / 8, 0, gray) && pass;
pass = piglit_probe_pixel_rgba(piglit_width * 7 / 8, 0, gray) && pass;
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -245,7 +245,7 @@ static enum piglit_result test_format(const struct format_desc *format)
glDeleteFramebuffersEXT(1, &fb);
if (!pass) {
glutSwapBuffers();
piglit_present_results();
return PIGLIT_FAIL;
}
......@@ -304,7 +304,7 @@ static enum piglit_result test_format(const struct format_desc *format)
pass = GL_FALSE;
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -136,7 +136,7 @@ enum piglit_result piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -153,7 +153,7 @@ enum piglit_result piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -205,7 +205,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -296,7 +296,7 @@ static enum piglit_result test_format(const struct format_desc *format)
glDeleteFramebuffersEXT(1, &fb);
if (!pass) {
glutSwapBuffers();
piglit_present_results();
return PIGLIT_FAIL;
}
......@@ -346,7 +346,7 @@ static enum piglit_result test_format(const struct format_desc *format)
pass = GL_FALSE;
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -250,7 +250,7 @@ run_test(void)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
assert(glGetError() == 0);
glutSwapBuffers();
piglit_present_results();
return pass;
}
......
......@@ -196,7 +196,7 @@ run_test(void)
pass = verify_color_rect(PAD, y1, SIZE, SIZE) && pass;
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
glutSwapBuffers();
piglit_present_results();
return pass;
}
......
......@@ -165,7 +165,7 @@ piglit_display(void)
x += dim + 1;
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......@@ -193,7 +193,7 @@ run_test(void)
pass = verify_color_rect(PAD, y1, SIZE, SIZE) && pass;
pass = verify_color_rect(PAD, y2, SIZE, SIZE) && pass;
glutSwapBuffers();
piglit_present_results();
return pass;
}
......
......@@ -135,7 +135,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -138,7 +138,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glDisable(GL_TEXTURE_2D);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -195,7 +195,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -228,7 +228,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -485,7 +485,7 @@ piglit_display(void)
result = count_and_report_bad_pixels();
glutSwapBuffers();
piglit_present_results();
return result;
}
......
......@@ -194,7 +194,7 @@ enum piglit_result piglit_display(void)
glDeleteTextures(1, &tex);
glDeleteTextures(1, &ds);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -302,7 +302,7 @@ enum piglit_result piglit_display(void)
glDeleteFramebuffersEXT(1, &fb);
glDeleteRenderbuffersEXT(1, &rb);
glutSwapBuffers();
piglit_present_results();
assert(glGetError() == 0);
return res;
......
......@@ -471,7 +471,7 @@ enum piglit_result piglit_display(void)
glDeleteRenderbuffersEXT(1, &rb);
}
glutSwapBuffers();
piglit_present_results();
assert(glGetError() == 0);
return res;
......
......@@ -146,7 +146,7 @@ enum piglit_result piglit_display(void)
pass &= piglit_probe_pixel_rgb(expected[i].x, expected[i].y, expected[i].color);
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -132,7 +132,7 @@ piglit_display(void)
pass = pass && piglit_probe_rect_rgba(piglit_width / 2, 0, piglit_width / 2, piglit_height,
result1);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -215,7 +215,7 @@ piglit_display(void)
}
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -163,7 +163,7 @@ piglit_display(void)
}
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -171,7 +171,7 @@ piglit_display(void)
}
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -118,7 +118,7 @@ piglit_display(void)
pass = pass && piglit_probe_rect_rgb(0, 0, piglit_width, piglit_height,
green);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -129,7 +129,7 @@ piglit_display(void)
pass = pass && piglit_probe_rect_rgb(piglit_width/2, 0, piglit_width/2,
piglit_height, blue);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -127,7 +127,7 @@ piglit_display(void)
pass = pass && piglit_probe_rect_rgb(piglit_width/2, 0, piglit_width/2,
piglit_height, blue);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -124,7 +124,7 @@ piglit_display(void)
draw_green = !draw_green;
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -122,7 +122,7 @@ piglit_display(void)
y += size + 5;
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -131,7 +131,7 @@ piglit_display(void)
}
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -191,7 +191,7 @@ test(void)
result = PIGLIT_FAIL;
}
glutSwapBuffers();
piglit_present_results();
return result;
}
......
......@@ -382,7 +382,7 @@ piglit_display(void)
glDeleteTextures(1, &tex1d);
glDeleteTextures(1, &tex2d);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -128,7 +128,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -470,7 +470,7 @@ piglit_display(void)
test_sets[test_index].basetype);
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -164,7 +164,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -158,7 +158,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -164,7 +164,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -154,7 +154,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -158,7 +158,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -370,7 +370,7 @@ test_fbo(const struct format_info *info)
}
}
glutSwapBuffers();
piglit_present_results();
glDeleteTextures(1, &texObj);
glDeleteFramebuffers(1, &fbo);
......
......@@ -143,7 +143,7 @@ piglit_display(void)
printf("Testing window result, blending SRC_ALPHA.\n");
pass = piglit_probe_pixel_rgba(piglit_width * 7 / 8, 0, win_blend2) && pass;
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -216,7 +216,7 @@ piglit_display(void)
glDeleteTextures(1, &tex);
glDisable(GL_TEXTURE_2D);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -87,7 +87,7 @@ piglit_display(void)
0, 0, 1, 1);
glDisable(GL_TEXTURE_2D);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -87,7 +87,7 @@ piglit_display(void)
0, 0, 1, 1);
glDisable(GL_TEXTURE_2D);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -156,7 +156,7 @@ piglit_display(void)
glDeleteFramebuffersEXT(1, &fbo);
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -196,7 +196,7 @@ run_test(void)
pass = verify_color_rect(PAD, y1, SIZE, SIZE) && pass;
pass = verify_color_rect(PAD, y2, SIZE, SIZE) && pass;
glutSwapBuffers();
piglit_present_results();
return pass;
}
......
......@@ -194,7 +194,7 @@ piglit_display(void)
0, (BUF_HEIGHT + 1) * 2);
pass &= test_with_format(GL_RGB5_A1, GL_BGRA,
0, (BUF_HEIGHT + 1) * 3);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -87,7 +87,7 @@ piglit_display(void)
piglit_draw_rect_tex(0.0, -1.0, 1.0, 2.0,
0.0, 0.0, 1.0, 1.0);
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -342,7 +342,7 @@ static void display_texture_to_window(GLint texture)
glDisable(GL_TEXTURE_2D);
glutSwapBuffers();
piglit_present_results();
}
enum piglit_result
......
......@@ -114,7 +114,7 @@ enum piglit_result piglit_display(void)
pass &= piglit_probe_pixel_rgb(expected[i].x, expected[i].y, expected[i].color);
}
glutSwapBuffers();
piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
......
......@@ -161,7 +161,7 @@ framebuffer_srgb_fbo(int srgb_format)
glDeleteFramebuffersEXT(1, &fbo);
glDeleteTextures(1, &tex);
glutSwapBuffers();
piglit_present_results();
return pass;
}
......
......@@ -320,7 +320,7 @@ enum piglit_result piglit_display(void)
glDeleteFramebuffersEXT(1, &fb);