diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2012-06-11 21:14:42 -0700 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2012-06-20 16:49:34 -0700 |
commit | 29bbf12760b537a2a3b30d18ed22f88c6c89f7f7 (patch) | |
tree | 5643fc32eb96b09f98b2955335a4b07e7bc51183 | |
parent | 7b90e1b18fd694014d453139ecdbbb31c7625999 (diff) |
tests: Let each test define main()
Each test that did not define main() now does so using
PIGLIT_GL_TEST_MAIN().
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
614 files changed, 2514 insertions, 1610 deletions
diff --git a/tests/asmparsertest/asmparsertest.c b/tests/asmparsertest/asmparsertest.c index 728ea560a..2481af3ed 100644 --- a/tests/asmparsertest/asmparsertest.c +++ b/tests/asmparsertest/asmparsertest.c @@ -30,8 +30,10 @@ #define TRUE (!FALSE) #endif -int piglit_width = 250, piglit_height = 250; -int piglit_window_mode = GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 250 /*window_width*/, + 250 /*window_height*/, + GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH) char * unix_line_endings(const char *input, size_t length) diff --git a/tests/bugs/crash-cubemap-order.c b/tests/bugs/crash-cubemap-order.c index d8a59d2ca..2d07fc059 100644 --- a/tests/bugs/crash-cubemap-order.c +++ b/tests/bugs/crash-cubemap-order.c @@ -8,8 +8,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA) enum piglit_result piglit_display(void) diff --git a/tests/bugs/crash-texparameter-before-teximage.c b/tests/bugs/crash-texparameter-before-teximage.c index 485f2af23..581cb1b55 100644 --- a/tests/bugs/crash-texparameter-before-teximage.c +++ b/tests/bugs/crash-texparameter-before-teximage.c @@ -9,9 +9,10 @@ #include "piglit-util.h" - -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA) enum piglit_result piglit_display(void) diff --git a/tests/bugs/drawbuffer-modes.c b/tests/bugs/drawbuffer-modes.c index 240782731..94ee90d70 100644 --- a/tests/bugs/drawbuffer-modes.c +++ b/tests/bugs/drawbuffer-modes.c @@ -35,8 +35,11 @@ * \Author Yi Sun <yi.sun@intel.com>, Anuj Phogat <anuj.phogat@gmail.com> */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; + +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) float color[7][4] = { { 0.1, 0.2, 0.3, 1.0 }, diff --git a/tests/bugs/fdo10370.c b/tests/bugs/fdo10370.c index 470535712..996c0ee10 100644 --- a/tests/bugs/fdo10370.c +++ b/tests/bugs/fdo10370.c @@ -5,8 +5,11 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_SINGLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_SINGLE | GLUT_RGB) + #define BITMAP_WIDTH 1 #define BITMAP_HEIGHT 1 #define ALIGN 1 diff --git a/tests/bugs/fdo14575.c b/tests/bugs/fdo14575.c index 4a7942a51..09d0f5124 100644 --- a/tests/bugs/fdo14575.c +++ b/tests/bugs/fdo14575.c @@ -32,8 +32,10 @@ */ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_SINGLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_SINGLE | GLUT_RGB) void piglit_init(int argc, char**argv) diff --git a/tests/bugs/fdo20701.c b/tests/bugs/fdo20701.c index 84201819b..a00fb149f 100644 --- a/tests/bugs/fdo20701.c +++ b/tests/bugs/fdo20701.c @@ -36,8 +36,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB) static GLuint fb; static GLuint tex; diff --git a/tests/bugs/fdo22540.c b/tests/bugs/fdo22540.c index 5ed7b01cd..f2cd24ec7 100644 --- a/tests/bugs/fdo22540.c +++ b/tests/bugs/fdo22540.c @@ -25,8 +25,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static GLuint vBuffer; diff --git a/tests/bugs/fdo23489.c b/tests/bugs/fdo23489.c index 8269d1a74..afdfb4763 100644 --- a/tests/bugs/fdo23489.c +++ b/tests/bugs/fdo23489.c @@ -5,8 +5,10 @@ #include "piglit-util.h" -int piglit_width = 250, piglit_height = 250; -int piglit_window_mode = GLUT_SINGLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 250 /*window_width*/, + 250 /*window_height*/, + GLUT_SINGLE | GLUT_RGB) enum piglit_result piglit_display(void) diff --git a/tests/bugs/fdo23670-depth_test.c b/tests/bugs/fdo23670-depth_test.c index 685d49928..bef9d71cf 100644 --- a/tests/bugs/fdo23670-depth_test.c +++ b/tests/bugs/fdo23670-depth_test.c @@ -26,9 +26,10 @@ #include "piglit-util.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL) void piglit_init(int argc, char **argv) diff --git a/tests/bugs/fdo23670-drawpix_stencil.c b/tests/bugs/fdo23670-drawpix_stencil.c index ab16e4c51..207223378 100644 --- a/tests/bugs/fdo23670-drawpix_stencil.c +++ b/tests/bugs/fdo23670-drawpix_stencil.c @@ -26,9 +26,10 @@ #include "piglit-util.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL) void piglit_init(int argc, char **argv) diff --git a/tests/bugs/fdo24066.c b/tests/bugs/fdo24066.c index 07aacf801..5308a9ce1 100644 --- a/tests/bugs/fdo24066.c +++ b/tests/bugs/fdo24066.c @@ -35,10 +35,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_RGBA; -int piglit_width = 16; -int piglit_height = 16; - +PIGLIT_GL_TEST_MAIN( + 16 /*window_width*/, + 16 /*window_height*/, + GLUT_RGBA) enum piglit_result piglit_display(void) { diff --git a/tests/bugs/fdo25614-genmipmap.c b/tests/bugs/fdo25614-genmipmap.c index aaaa3f964..15f208d2d 100644 --- a/tests/bugs/fdo25614-genmipmap.c +++ b/tests/bugs/fdo25614-genmipmap.c @@ -40,9 +40,10 @@ #define TEST_COLS 5 #define BOX_SIZE (1 << (TEST_COLS + 1)) -int piglit_width = (BOX_SIZE + 2) * TEST_COLS + 1; -int piglit_height = (BOX_SIZE + 1) + 1; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + (BOX_SIZE + 2) * TEST_COLS + 1 /*window_width*/, + (BOX_SIZE + 1) + 1 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint tex[1]; diff --git a/tests/bugs/fdo28551.c b/tests/bugs/fdo28551.c index 3a0de62ea..cf4ea8e17 100644 --- a/tests/bugs/fdo28551.c +++ b/tests/bugs/fdo28551.c @@ -26,10 +26,10 @@ #include "piglit-util.h" - -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL) enum piglit_result piglit_display(void) diff --git a/tests/bugs/fdo31934.c b/tests/bugs/fdo31934.c index 1400d4787..644d6e1e2 100644 --- a/tests/bugs/fdo31934.c +++ b/tests/bugs/fdo31934.c @@ -1,7 +1,9 @@ #include "piglit-util.h" -int piglit_width = 512, piglit_height = 512; -int piglit_window_mode = GLUT_RGBA; +PIGLIT_GL_TEST_MAIN( + 512 /*window_width*/, + 512 /*window_height*/, + GLUT_RGBA) void piglit_init(int argc, char *argv[]) diff --git a/tests/bugs/fdo9833.c b/tests/bugs/fdo9833.c index eade55e62..5f5a7dcf6 100644 --- a/tests/bugs/fdo9833.c +++ b/tests/bugs/fdo9833.c @@ -5,8 +5,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA) enum piglit_result piglit_display(void) diff --git a/tests/bugs/point-sprite.c b/tests/bugs/point-sprite.c index 574b07dda..f7e27f663 100644 --- a/tests/bugs/point-sprite.c +++ b/tests/bugs/point-sprite.c @@ -35,9 +35,10 @@ #define TEST_COLS 6 #define TEST_ROWS 2 -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = 1 + ((BOX_SIZE + 1) * TEST_COLS); -int piglit_height = 1 + ((BOX_SIZE + 1) * TEST_ROWS); +PIGLIT_GL_TEST_MAIN( + 1 + ((BOX_SIZE + 1) * TEST_COLS) /*window_width*/, + 1 + ((BOX_SIZE + 1) * TEST_ROWS) /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static float maxSize = 0.0f; static GLuint tex; diff --git a/tests/bugs/r300-readcache.c b/tests/bugs/r300-readcache.c index e7587fa56..24db1d389 100644 --- a/tests/bugs/r300-readcache.c +++ b/tests/bugs/r300-readcache.c @@ -18,8 +18,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA) static GLfloat colors[8][3] = { { 1.0, 1.0, 1.0 }, diff --git a/tests/bugs/tex1d-2dborder.c b/tests/bugs/tex1d-2dborder.c index 881ab4709..dc294ea5e 100644 --- a/tests/bugs/tex1d-2dborder.c +++ b/tests/bugs/tex1d-2dborder.c @@ -33,8 +33,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 256, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const GLfloat TextureColor[3] = { 1.0, 0.5, 0.0 }; diff --git a/tests/bugs/tri-tex-crash.c b/tests/bugs/tri-tex-crash.c index e36c447ea..36bbca2ef 100644 --- a/tests/bugs/tri-tex-crash.c +++ b/tests/bugs/tri-tex-crash.c @@ -30,10 +30,10 @@ #include "piglit-util.h" - -int piglit_width = 400, piglit_height = 400; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static void make_texture(void) diff --git a/tests/bugs/vbo-buffer-unmap.c b/tests/bugs/vbo-buffer-unmap.c index 021a75eee..d19d8c48a 100644 --- a/tests/bugs/vbo-buffer-unmap.c +++ b/tests/bugs/vbo-buffer-unmap.c @@ -33,10 +33,10 @@ #include "piglit-util.h" #include "piglit-framework.h" - -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = 100, piglit_height = 100; - +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-1d.c b/tests/fbo/fbo-1d.c index b998f0b4b..2a5351d5f 100644 --- a/tests/fbo/fbo-1d.c +++ b/tests/fbo/fbo-1d.c @@ -34,9 +34,11 @@ #include "piglit-util.h" #define BUF_WIDTH 32 -int piglit_width = 50; -int piglit_height = 20; -int piglit_window_mode = GLUT_DOUBLE | GLUT_DEPTH; + +PIGLIT_GL_TEST_MAIN( + 50 /*window_width*/, + 20 /*window_height*/, + GLUT_DOUBLE | GLUT_DEPTH) static int create_1d_fbo(void) diff --git a/tests/fbo/fbo-3d.c b/tests/fbo/fbo-3d.c index 5cfa88204..e1a2e0fb8 100644 --- a/tests/fbo/fbo-3d.c +++ b/tests/fbo/fbo-3d.c @@ -35,9 +35,11 @@ #define BUF_WIDTH 32 #define BUF_HEIGHT 32 -int piglit_width = 200; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) #define NUM_DEPTHS 6 #define POT_DEPTHS 8 diff --git a/tests/fbo/fbo-alpha.c b/tests/fbo/fbo-alpha.c index 48da59ba5..69efec667 100644 --- a/tests/fbo/fbo-alpha.c +++ b/tests/fbo/fbo-alpha.c @@ -33,9 +33,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-alphatest-formats.c b/tests/fbo/fbo-alphatest-formats.c index 3718d7bb3..8cef6d2de 100644 --- a/tests/fbo/fbo-alphatest-formats.c +++ b/tests/fbo/fbo-alphatest-formats.c @@ -30,10 +30,10 @@ #include "piglit-util.h" #include "fbo-formats.h" -int piglit_width = 128; -int piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) /** * Draw a quad with alpha testing diff --git a/tests/fbo/fbo-alphatest-nocolor-ff.c b/tests/fbo/fbo-alphatest-nocolor-ff.c index f44e8d8f1..9c983f37e 100644 --- a/tests/fbo/fbo-alphatest-nocolor-ff.c +++ b/tests/fbo/fbo-alphatest-nocolor-ff.c @@ -31,9 +31,11 @@ #include "piglit-util.h" #define BUF_WIDTH 32 -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_DEPTH | GLUT_ALPHA; + +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_DEPTH | GLUT_ALPHA) static void create_fbo(GLuint *out_tex) { diff --git a/tests/fbo/fbo-alphatest-nocolor.c b/tests/fbo/fbo-alphatest-nocolor.c index 0bc37ee5d..503ef1143 100644 --- a/tests/fbo/fbo-alphatest-nocolor.c +++ b/tests/fbo/fbo-alphatest-nocolor.c @@ -30,9 +30,12 @@ #include "piglit-util.h" #define BUF_WIDTH 32 -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_DEPTH | GLUT_ALPHA; + +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_DEPTH | GLUT_ALPHA) + GLuint prog; static const char *vs_source = diff --git a/tests/fbo/fbo-array.c b/tests/fbo/fbo-array.c index 2efce555d..01d96bf91 100644 --- a/tests/fbo/fbo-array.c +++ b/tests/fbo/fbo-array.c @@ -37,9 +37,11 @@ #define BUF_WIDTH 32 #define BUF_HEIGHT 32 -int piglit_width = 200; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) #define NUM_LAYERS 6 diff --git a/tests/fbo/fbo-bind-renderbuffer.c b/tests/fbo/fbo-bind-renderbuffer.c index 226b6256c..7de68ab9e 100644 --- a/tests/fbo/fbo-bind-renderbuffer.c +++ b/tests/fbo/fbo-bind-renderbuffer.c @@ -33,9 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; - +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) /* Test binding and return error code */ static GLenum diff --git a/tests/fbo/fbo-blending-formats.c b/tests/fbo/fbo-blending-formats.c index c7e5abb8b..31832f5e2 100644 --- a/tests/fbo/fbo-blending-formats.c +++ b/tests/fbo/fbo-blending-formats.c @@ -30,10 +30,10 @@ #include "piglit-util.h" #include "fbo-formats.h" -int piglit_width = 128; -int piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static void blend(const float *rect, const float *src, const float *dst, const float *blendcol, GLenum blendsrc, GLenum blenddst) diff --git a/tests/fbo/fbo-blit-d24s8.c b/tests/fbo/fbo-blit-d24s8.c index 91d75ddd5..1e55cc9a9 100644 --- a/tests/fbo/fbo-blit-d24s8.c +++ b/tests/fbo/fbo-blit-d24s8.c @@ -38,9 +38,11 @@ #include "piglit-util.h" -int piglit_width = 150; -int piglit_height = 150; -int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE | GLUT_STENCIL | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 150 /*window_width*/, + 150 /*window_height*/, + GLUT_RGBA | GLUT_DOUBLE | GLUT_STENCIL | GLUT_DEPTH) + #define PAD 10 #define SIZE 20 diff --git a/tests/fbo/fbo-blit.c b/tests/fbo/fbo-blit.c index c1b8b2a81..5b4c697a9 100644 --- a/tests/fbo/fbo-blit.c +++ b/tests/fbo/fbo-blit.c @@ -36,9 +36,11 @@ #include "piglit-util.h" -int piglit_width = 150; -int piglit_height = 150; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 150 /*window_width*/, + 150 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) + #define PAD 10 #define SIZE 20 diff --git a/tests/fbo/fbo-clear-formats.c b/tests/fbo/fbo-clear-formats.c index 046a8dafe..13faba8a9 100644 --- a/tests/fbo/fbo-clear-formats.c +++ b/tests/fbo/fbo-clear-formats.c @@ -36,9 +36,11 @@ #define TEX_WIDTH 256 #define TEX_HEIGHT 256 -int piglit_width = 700; -int piglit_height = 300; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; + +PIGLIT_GL_TEST_MAIN( + 700 /*window_width*/, + 300 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) /* Do piglit_rgbw_texture() image but using glClear */ static bool diff --git a/tests/fbo/fbo-clearmipmap.c b/tests/fbo/fbo-clearmipmap.c index 36a2b8d3a..0f0c3670c 100644 --- a/tests/fbo/fbo-clearmipmap.c +++ b/tests/fbo/fbo-clearmipmap.c @@ -34,9 +34,10 @@ #include "piglit-util.h" -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; -int piglit_width = 700; -int piglit_height = 300; +PIGLIT_GL_TEST_MAIN( + 700 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define TEX_WIDTH 256 #define TEX_HEIGHT 256 diff --git a/tests/fbo/fbo-copypix.c b/tests/fbo/fbo-copypix.c index 2a96f0bae..3ba88ba70 100644 --- a/tests/fbo/fbo-copypix.c +++ b/tests/fbo/fbo-copypix.c @@ -33,9 +33,11 @@ #include "piglit-util.h" -int piglit_width = 150; -int piglit_height = 150; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 150 /*window_width*/, + 150 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) + #define PAD 10 #define SIZE 20 diff --git a/tests/fbo/fbo-copyteximage-simple.c b/tests/fbo/fbo-copyteximage-simple.c index a22f2f9e7..e1ea28212 100644 --- a/tests/fbo/fbo-copyteximage-simple.c +++ b/tests/fbo/fbo-copyteximage-simple.c @@ -37,9 +37,11 @@ #define TEX_WIDTH 256 #define TEX_HEIGHT 256 -int piglit_width = TEX_WIDTH; -int piglit_height = TEX_HEIGHT; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + TEX_WIDTH /*window_width*/, + TEX_HEIGHT /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const float red[] = {1, 0, 0, 0}; static const float green[] = {0, 1, 0, 0}; diff --git a/tests/fbo/fbo-copyteximage.c b/tests/fbo/fbo-copyteximage.c index 876bb9032..5a294f036 100644 --- a/tests/fbo/fbo-copyteximage.c +++ b/tests/fbo/fbo-copyteximage.c @@ -35,9 +35,11 @@ #define TEX_WIDTH 254 #define TEX_HEIGHT 254 -int piglit_width = 700; -int piglit_height = 300; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 700 /*window_width*/, + 300 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const float red[] = {1, 0, 0, 0}; static const float green[] = {0, 1, 0, 0}; diff --git a/tests/fbo/fbo-cubemap.c b/tests/fbo/fbo-cubemap.c index 266a0cad1..71db3c238 100644 --- a/tests/fbo/fbo-cubemap.c +++ b/tests/fbo/fbo-cubemap.c @@ -35,9 +35,11 @@ #define BUF_WIDTH 32 #define BUF_HEIGHT 32 -int piglit_width = 200; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) float face_color[7][4] = { {1.0, 0.0, 0.0, 0.0}, diff --git a/tests/fbo/fbo-depth-array.c b/tests/fbo/fbo-depth-array.c index 0002b5bae..2f1a72741 100644 --- a/tests/fbo/fbo-depth-array.c +++ b/tests/fbo/fbo-depth-array.c @@ -40,9 +40,11 @@ #define BUF_WIDTH 32 #define BUF_HEIGHT 32 -int piglit_width = 200; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) #define NUM_LAYERS 6 diff --git a/tests/fbo/fbo-depth-sample-compare.c b/tests/fbo/fbo-depth-sample-compare.c index 53827be8b..15155d62f 100644 --- a/tests/fbo/fbo-depth-sample-compare.c +++ b/tests/fbo/fbo-depth-sample-compare.c @@ -45,10 +45,10 @@ #define SIZE 256 - -int piglit_width = 3 * SIZE; -int piglit_height = SIZE; -int piglit_window_mode = GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 3 * SIZE /*window_width*/, + SIZE /*window_height*/, + GLUT_DOUBLE | GLUT_DEPTH) static GLfloat ErrorScale = 0.0; static GLuint ColorTex, DepthTex, FBO; diff --git a/tests/fbo/fbo-depth-tex1d.c b/tests/fbo/fbo-depth-tex1d.c index 9d32c62ea..973b40c5f 100644 --- a/tests/fbo/fbo-depth-tex1d.c +++ b/tests/fbo/fbo-depth-tex1d.c @@ -35,9 +35,11 @@ #include "piglit-util.h" #define BUF_WIDTH 16 -int piglit_width = 50; -int piglit_height = 20; -int piglit_window_mode = GLUT_DOUBLE | GLUT_DEPTH; + +PIGLIT_GL_TEST_MAIN( + 50 /*window_width*/, + 20 /*window_height*/, + GLUT_DOUBLE | GLUT_DEPTH) #define F(name) #name, name diff --git a/tests/fbo/fbo-depth.c b/tests/fbo/fbo-depth.c index 21c3ba05c..c6c62668b 100644 --- a/tests/fbo/fbo-depth.c +++ b/tests/fbo/fbo-depth.c @@ -31,9 +31,12 @@ #include "piglit-util.h" #define BUF_SIZE 123 -int piglit_width = BUF_SIZE; -int piglit_height = BUF_SIZE; -int piglit_window_mode = GLUT_DOUBLE; + +PIGLIT_GL_TEST_MAIN( + BUF_SIZE /*window_width*/, + BUF_SIZE /*window_height*/, + GLUT_DOUBLE) + enum { CLEAR, READPIXELS, diff --git a/tests/fbo/fbo-depthstencil.c b/tests/fbo/fbo-depthstencil.c index 094e5ea41..54a8bae3d 100644 --- a/tests/fbo/fbo-depthstencil.c +++ b/tests/fbo/fbo-depthstencil.c @@ -31,9 +31,12 @@ #include "piglit-util.h" #define BUF_SIZE 123 -int piglit_width = BUF_SIZE; -int piglit_height = BUF_SIZE; -int piglit_window_mode = GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL; + +PIGLIT_GL_TEST_MAIN( + BUF_SIZE /*window_width*/, + BUF_SIZE /*window_height*/, + GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL) + enum { CLEAR, READPIXELS, diff --git a/tests/fbo/fbo-depthtex.c b/tests/fbo/fbo-depthtex.c index c31223fcc..1a094219c 100644 --- a/tests/fbo/fbo-depthtex.c +++ b/tests/fbo/fbo-depthtex.c @@ -31,9 +31,10 @@ #include "piglit-util.h" -int piglit_width = 640; -int piglit_height = 480; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 640 /*window_width*/, + 480 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static void check_fbo_status() diff --git a/tests/fbo/fbo-draw-buffers-blend.c b/tests/fbo/fbo-draw-buffers-blend.c index a20f2e914..1a1ffe002 100644 --- a/tests/fbo/fbo-draw-buffers-blend.c +++ b/tests/fbo/fbo-draw-buffers-blend.c @@ -35,9 +35,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) static const char *TestName = "fbo-draw-buffers-blend"; diff --git a/tests/fbo/fbo-drawbuffers-arbfp.c b/tests/fbo/fbo-drawbuffers-arbfp.c index 13086c881..d16e30878 100644 --- a/tests/fbo/fbo-drawbuffers-arbfp.c +++ b/tests/fbo/fbo-drawbuffers-arbfp.c @@ -34,9 +34,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static float result0[] = {0.7, 0.6, 0.3, 0.1}; static float result1[] = {0.2, 0.9, 0.5, 0.8}; diff --git a/tests/fbo/fbo-drawbuffers-blend-add.c b/tests/fbo/fbo-drawbuffers-blend-add.c index d41d9cd78..33fa7404a 100644 --- a/tests/fbo/fbo-drawbuffers-blend-add.c +++ b/tests/fbo/fbo-drawbuffers-blend-add.c @@ -34,9 +34,10 @@ #include <string.h> #include "piglit-util.h" -int piglit_width = 256; -int piglit_height = 256; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static GLint max_targets; diff --git a/tests/fbo/fbo-drawbuffers-fragcolor.c b/tests/fbo/fbo-drawbuffers-fragcolor.c index fdcaac32c..7992853de 100644 --- a/tests/fbo/fbo-drawbuffers-fragcolor.c +++ b/tests/fbo/fbo-drawbuffers-fragcolor.c @@ -34,9 +34,10 @@ #include <string.h> #include "piglit-util.h" -int piglit_width = 256; -int piglit_height = 256; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint max_targets; diff --git a/tests/fbo/fbo-drawbuffers-maxtargets.c b/tests/fbo/fbo-drawbuffers-maxtargets.c index 9fbf9ac6d..e30066efd 100644 --- a/tests/fbo/fbo-drawbuffers-maxtargets.c +++ b/tests/fbo/fbo-drawbuffers-maxtargets.c @@ -34,9 +34,10 @@ #include <string.h> #include "piglit-util.h" -int piglit_width = 256; -int piglit_height = 256; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint max_targets; diff --git a/tests/fbo/fbo-drawbuffers.c b/tests/fbo/fbo-drawbuffers.c index 61127e0b9..b14dc0a9d 100644 --- a/tests/fbo/fbo-drawbuffers.c +++ b/tests/fbo/fbo-drawbuffers.c @@ -33,9 +33,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint attach_texture(int i) diff --git a/tests/fbo/fbo-drawbuffers2-blend.c b/tests/fbo/fbo-drawbuffers2-blend.c index c73591b5b..be41ab821 100644 --- a/tests/fbo/fbo-drawbuffers2-blend.c +++ b/tests/fbo/fbo-drawbuffers2-blend.c @@ -33,9 +33,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint attach_texture(int i) diff --git a/tests/fbo/fbo-drawbuffers2-colormask.c b/tests/fbo/fbo-drawbuffers2-colormask.c index 4c38fd0b4..37f351f64 100644 --- a/tests/fbo/fbo-drawbuffers2-colormask.c +++ b/tests/fbo/fbo-drawbuffers2-colormask.c @@ -33,9 +33,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint attach_texture(int i) diff --git a/tests/fbo/fbo-finish-deleted.c b/tests/fbo/fbo-finish-deleted.c index 2a88993ac..0b7971269 100644 --- a/tests/fbo/fbo-finish-deleted.c +++ b/tests/fbo/fbo-finish-deleted.c @@ -33,9 +33,11 @@ #define BUF_WIDTH 32 #define BUF_HEIGHT 32 -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_RGB) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-flushing-2.c b/tests/fbo/fbo-flushing-2.c index cd430a259..809cf8657 100644 --- a/tests/fbo/fbo-flushing-2.c +++ b/tests/fbo/fbo-flushing-2.c @@ -41,9 +41,10 @@ #define TEX_WIDTH 8 #define TEX_HEIGHT 8 -int piglit_width = 64; -int piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-flushing.c b/tests/fbo/fbo-flushing.c index 3272c8fe1..6b27cea2e 100644 --- a/tests/fbo/fbo-flushing.c +++ b/tests/fbo/fbo-flushing.c @@ -41,9 +41,10 @@ #define TEX_WIDTH 128 #define TEX_HEIGHT 128 -int piglit_width = 300; -int piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 300 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-fragcoord.c b/tests/fbo/fbo-fragcoord.c index 60ffd5bd2..c180e9a74 100644 --- a/tests/fbo/fbo-fragcoord.c +++ b/tests/fbo/fbo-fragcoord.c @@ -31,8 +31,10 @@ #define WIDTH 256 #define HEIGHT 256 -int piglit_width = WIDTH, piglit_height = HEIGHT; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + WIDTH /*window_width*/, + HEIGHT /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) static GLint prog; diff --git a/tests/fbo/fbo-fragcoord2.c b/tests/fbo/fbo-fragcoord2.c index 3823b157b..df2c6e76a 100644 --- a/tests/fbo/fbo-fragcoord2.c +++ b/tests/fbo/fbo-fragcoord2.c @@ -33,9 +33,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 256; -int piglit_height = 256; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint prog; diff --git a/tests/fbo/fbo-generatemipmap-array.c b/tests/fbo/fbo-generatemipmap-array.c index 876ec7354..7095bc0e0 100644 --- a/tests/fbo/fbo-generatemipmap-array.c +++ b/tests/fbo/fbo-generatemipmap-array.c @@ -35,9 +35,11 @@ #define TEX_WIDTH 128 #define TEX_HEIGHT 128 -int piglit_width = 600; -int piglit_height = 560; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 600 /*window_width*/, + 560 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const float red[] = {1, 0, 0, 0}; static const float green[] = {0, 1, 0, 0}; diff --git a/tests/fbo/fbo-generatemipmap-filtering.c b/tests/fbo/fbo-generatemipmap-filtering.c index 9a4926780..5334e2135 100644 --- a/tests/fbo/fbo-generatemipmap-filtering.c +++ b/tests/fbo/fbo-generatemipmap-filtering.c @@ -30,9 +30,11 @@ #define TEX_WIDTH 256 #define TEX_HEIGHT 256 -int piglit_width = 700; -int piglit_height = 300; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 700 /*window_width*/, + 300 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static int create_tex(void) diff --git a/tests/fbo/fbo-generatemipmap-formats.c b/tests/fbo/fbo-generatemipmap-formats.c index 007e2a24d..b6216a2d9 100644 --- a/tests/fbo/fbo-generatemipmap-formats.c +++ b/tests/fbo/fbo-generatemipmap-formats.c @@ -36,10 +36,11 @@ static int tex_width = 256; static int tex_height = 256; -int piglit_width = 700; -int piglit_height = 300; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 700 /*window_width*/, + 300 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static void set_npot(GLboolean npot) { diff --git a/tests/fbo/fbo-generatemipmap-noimage.c b/tests/fbo/fbo-generatemipmap-noimage.c index 35c7889eb..3d7d9efcd 100644 --- a/tests/fbo/fbo-generatemipmap-noimage.c +++ b/tests/fbo/fbo-generatemipmap-noimage.c @@ -31,9 +31,10 @@ #include "piglit-util.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-generatemipmap-nonsquare.c b/tests/fbo/fbo-generatemipmap-nonsquare.c index 214c7fd41..7bbd6a8d0 100644 --- a/tests/fbo/fbo-generatemipmap-nonsquare.c +++ b/tests/fbo/fbo-generatemipmap-nonsquare.c @@ -37,9 +37,11 @@ #define TEX_WIDTH 256 #define TEX_HEIGHT 64 #define TEX_DIFF (TEX_WIDTH/TEX_HEIGHT) -int piglit_width = 700; -int piglit_height = 300; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 700 /*window_width*/, + 300 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const float red[] = {1, 0, 0, 0}; static const float green[] = {0, 1, 0, 0}; diff --git a/tests/fbo/fbo-generatemipmap-npot.c b/tests/fbo/fbo-generatemipmap-npot.c index b70b47686..b8622dee5 100644 --- a/tests/fbo/fbo-generatemipmap-npot.c +++ b/tests/fbo/fbo-generatemipmap-npot.c @@ -34,9 +34,11 @@ #define TEX_WIDTH 254 #define TEX_HEIGHT 254 -int piglit_width = 700; -int piglit_height = 300; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 700 /*window_width*/, + 300 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const float red[] = {1, 0, 0, 0}; static const float green[] = {0, 1, 0, 0}; diff --git a/tests/fbo/fbo-generatemipmap-scissor.c b/tests/fbo/fbo-generatemipmap-scissor.c index 6e65b6dd0..1b8e2a336 100644 --- a/tests/fbo/fbo-generatemipmap-scissor.c +++ b/tests/fbo/fbo-generatemipmap-scissor.c @@ -37,9 +37,11 @@ #define TEX_WIDTH 256 #define TEX_HEIGHT 256 -int piglit_width = 700; -int piglit_height = 300; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 700 /*window_width*/, + 300 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const float red[] = {1, 0, 0, 0}; static const float green[] = {0, 1, 0, 0}; diff --git a/tests/fbo/fbo-generatemipmap-viewport.c b/tests/fbo/fbo-generatemipmap-viewport.c index 998aad362..1a924a128 100644 --- a/tests/fbo/fbo-generatemipmap-viewport.c +++ b/tests/fbo/fbo-generatemipmap-viewport.c @@ -38,9 +38,11 @@ #define TEX_WIDTH 256 #define TEX_HEIGHT 256 -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const float red[] = {1, 0, 0, 0}; static const float green[] = {0, 1, 0, 0}; diff --git a/tests/fbo/fbo-generatemipmap.c b/tests/fbo/fbo-generatemipmap.c index c5513e45c..50a0ba138 100644 --- a/tests/fbo/fbo-generatemipmap.c +++ b/tests/fbo/fbo-generatemipmap.c @@ -34,9 +34,11 @@ #define TEX_WIDTH 256 #define TEX_HEIGHT 256 -int piglit_width = 700; -int piglit_height = 300; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 700 /*window_width*/, + 300 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const float red[] = {1, 0, 0, 0}; static const float green[] = {0, 1, 0, 0}; diff --git a/tests/fbo/fbo-getframebufferattachmentparameter-01.c b/tests/fbo/fbo-getframebufferattachmentparameter-01.c index d80aa3ec2..904d32245 100644 --- a/tests/fbo/fbo-getframebufferattachmentparameter-01.c +++ b/tests/fbo/fbo-getframebufferattachmentparameter-01.c @@ -30,9 +30,10 @@ #include "piglit-util.h" -int piglit_width = 30; -int piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 30 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-gl_pointcoord.c b/tests/fbo/fbo-gl_pointcoord.c index 162572037..e7c5400cc 100644 --- a/tests/fbo/fbo-gl_pointcoord.c +++ b/tests/fbo/fbo-gl_pointcoord.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_SINGLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_SINGLE) static const char vs_text[] = "#version 120 \n" diff --git a/tests/fbo/fbo-incomplete-texture-01.c b/tests/fbo/fbo-incomplete-texture-01.c index 496d1d5f9..b570cd87d 100644 --- a/tests/fbo/fbo-incomplete-texture-01.c +++ b/tests/fbo/fbo-incomplete-texture-01.c @@ -35,9 +35,10 @@ #include "piglit-util.h" -int piglit_width = 30; -int piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 30 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-incomplete-texture-02.c b/tests/fbo/fbo-incomplete-texture-02.c index 4871d4d3d..7cb1ab4bd 100644 --- a/tests/fbo/fbo-incomplete-texture-02.c +++ b/tests/fbo/fbo-incomplete-texture-02.c @@ -35,9 +35,10 @@ #include "piglit-util.h" -int piglit_width = 30; -int piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 30 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-incomplete-texture-03.c b/tests/fbo/fbo-incomplete-texture-03.c index 0b0bdef98..9aca86714 100644 --- a/tests/fbo/fbo-incomplete-texture-03.c +++ b/tests/fbo/fbo-incomplete-texture-03.c @@ -34,9 +34,10 @@ #include "piglit-util.h" -int piglit_width = 30; -int piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 30 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-incomplete-texture-04.c b/tests/fbo/fbo-incomplete-texture-04.c index 5640854cf..f6fa31409 100644 --- a/tests/fbo/fbo-incomplete-texture-04.c +++ b/tests/fbo/fbo-incomplete-texture-04.c @@ -35,9 +35,10 @@ #include "piglit-util.h" -int piglit_width = 30; -int piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 30 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-integer.c b/tests/fbo/fbo-integer.c index 0a25f08a3..39e83ad9d 100644 --- a/tests/fbo/fbo-integer.c +++ b/tests/fbo/fbo-integer.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "texture-integer"; diff --git a/tests/fbo/fbo-luminance-alpha.c b/tests/fbo/fbo-luminance-alpha.c index b8a4766f6..91f09e3a6 100644 --- a/tests/fbo/fbo-luminance-alpha.c +++ b/tests/fbo/fbo-luminance-alpha.c @@ -35,9 +35,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-maxsize.c b/tests/fbo/fbo-maxsize.c index 0719030f3..387bcb41b 100644 --- a/tests/fbo/fbo-maxsize.c +++ b/tests/fbo/fbo-maxsize.c @@ -29,11 +29,10 @@ #include "piglit-util.h" -int piglit_width = 256; -int piglit_height = 256; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; - - +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static int find_max_texture_size(void) diff --git a/tests/fbo/fbo-mipmap-copypix.c b/tests/fbo/fbo-mipmap-copypix.c index d94717616..3f105bb58 100644 --- a/tests/fbo/fbo-mipmap-copypix.c +++ b/tests/fbo/fbo-mipmap-copypix.c @@ -33,9 +33,10 @@ #include "piglit-util.h" - -int piglit_width = 50, piglit_height = 50; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 50 /*window_width*/, + 50 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const GLuint NumLevels = 10; diff --git a/tests/fbo/fbo-nodepth-test.c b/tests/fbo/fbo-nodepth-test.c index d2d292531..40236da35 100644 --- a/tests/fbo/fbo-nodepth-test.c +++ b/tests/fbo/fbo-nodepth-test.c @@ -33,9 +33,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-nostencil-test.c b/tests/fbo/fbo-nostencil-test.c index 46fc676ea..960ccb859 100644 --- a/tests/fbo/fbo-nostencil-test.c +++ b/tests/fbo/fbo-nostencil-test.c @@ -33,9 +33,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/fbo/fbo-pbo-readpixels-small.c b/tests/fbo/fbo-pbo-readpixels-small.c index 1903bbada..e5f5f6ad5 100644 --- a/tests/fbo/fbo-pbo-readpixels-small.c +++ b/tests/fbo/fbo-pbo-readpixels-small.c @@ -38,9 +38,11 @@ #define BUF_WIDTH 8 #define BUF_HEIGHT 8 -int piglit_width = 50; -int piglit_height = 50; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 50 /*window_width*/, + 50 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static void make_fbo(GLuint *fbo, GLuint *tex) diff --git a/tests/fbo/fbo-readdrawpix.c b/tests/fbo/fbo-readdrawpix.c index c17c8afb6..f94a150ed 100644 --- a/tests/fbo/fbo-readdrawpix.c +++ b/tests/fbo/fbo-readdrawpix.c @@ -33,9 +33,11 @@ #include "piglit-util.h" -int piglit_width = 150; -int piglit_height = 150; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 150 /*window_width*/, + 150 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) + #define PAD 10 #define SIZE 20 diff --git a/tests/fbo/fbo-readpixels-depth-formats.c b/tests/fbo/fbo-readpixels-depth-formats.c index 2da487bcc..1f4fc9832 100644 --- a/tests/fbo/fbo-readpixels-depth-formats.c +++ b/tests/fbo/fbo-readpixels-depth-formats.c @@ -32,9 +32,11 @@ #define BUF_WIDTH 15 #define BUF_HEIGHT 15 -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; -int piglit_width = BUF_WIDTH; -int piglit_height = BUF_WIDTH; + +PIGLIT_GL_TEST_MAIN( + BUF_WIDTH /*window_width*/, + BUF_WIDTH /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) /* Width of our stripes of z = 0.0, 0.5, 1.0 */ static int w = BUF_WIDTH / 3; diff --git a/tests/fbo/fbo-readpixels.c b/tests/fbo/fbo-readpixels.c index 212bc9e87..0fae9b7a4 100644 --- a/tests/fbo/fbo-readpixels.c +++ b/tests/fbo/fbo-readpixels.c @@ -35,9 +35,11 @@ #define BUF_WIDTH 32 #define BUF_HEIGHT 32 -int piglit_width = 100; -int piglit_height = 200; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 200 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static GLboolean test_with_format(GLenum internal_format, GLenum format, diff --git a/tests/fbo/fbo-rg.c b/tests/fbo/fbo-rg.c index ec2a151ad..4589cce90 100644 --- a/tests/fbo/fbo-rg.c +++ b/tests/fbo/fbo-rg.c @@ -44,9 +44,10 @@ static GLuint rgba_tex; static GLuint other_tex; static GLboolean pass = GL_TRUE; -int piglit_width = 128; -int piglit_height = 64; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 64 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const char vert_code[] = "attribute vec2 position;\n" diff --git a/tests/fbo/fbo-scissor-bitmap.c b/tests/fbo/fbo-scissor-bitmap.c index baf0e4186..f4199913b 100644 --- a/tests/fbo/fbo-scissor-bitmap.c +++ b/tests/fbo/fbo-scissor-bitmap.c @@ -35,9 +35,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 400; -int piglit_height = 300; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) struct probes { struct test_position { diff --git a/tests/fbo/fbo-srgb-blit.c b/tests/fbo/fbo-srgb-blit.c index fc8d4e145..c9e8195bd 100644 --- a/tests/fbo/fbo-srgb-blit.c +++ b/tests/fbo/fbo-srgb-blit.c @@ -30,9 +30,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static GLuint src_tex, dst_tex; static GLuint src_fbo, dst_fbo; diff --git a/tests/fbo/fbo-srgb.c b/tests/fbo/fbo-srgb.c index 3b6607f48..401c0068a 100644 --- a/tests/fbo/fbo-srgb.c +++ b/tests/fbo/fbo-srgb.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) /* size of texture/renderbuffer (power of two) */ #define FBO_SIZE 128 diff --git a/tests/fbo/fbo-stencil.c b/tests/fbo/fbo-stencil.c index 88b772a82..ea322f176 100644 --- a/tests/fbo/fbo-stencil.c +++ b/tests/fbo/fbo-stencil.c @@ -31,9 +31,12 @@ #include "piglit-util.h" #define BUF_SIZE 123 -int piglit_width = BUF_SIZE; -int piglit_height = BUF_SIZE; -int piglit_window_mode = GLUT_DOUBLE; + +PIGLIT_GL_TEST_MAIN( + BUF_SIZE /*window_width*/, + BUF_SIZE /*window_height*/, + GLUT_DOUBLE) + enum { CLEAR, READPIXELS, diff --git a/tests/fbo/fbo-storage-completeness.c b/tests/fbo/fbo-storage-completeness.c index 59aceef7f..4a163b0e5 100644 --- a/tests/fbo/fbo-storage-completeness.c +++ b/tests/fbo/fbo-storage-completeness.c @@ -34,9 +34,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) static const char *TestName = "fbo-storage-formats"; diff --git a/tests/fbo/fbo-storage-formats.c b/tests/fbo/fbo-storage-formats.c index 4a2b38f26..da96d8399 100644 --- a/tests/fbo/fbo-storage-formats.c +++ b/tests/fbo/fbo-storage-formats.c @@ -33,9 +33,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) static const char *TestName = "fbo-storage-formats"; diff --git a/tests/fbo/fbo-sys-blit.c b/tests/fbo/fbo-sys-blit.c index bf9d3c5ae..d8d942a4f 100644 --- a/tests/fbo/fbo-sys-blit.c +++ b/tests/fbo/fbo-sys-blit.c @@ -29,9 +29,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) enum piglit_result piglit_display(void) { diff --git a/tests/fbo/fbo-sys-sub-blit.c b/tests/fbo/fbo-sys-sub-blit.c index 63482a9ed..fb9e71ef8 100644 --- a/tests/fbo/fbo-sys-sub-blit.c +++ b/tests/fbo/fbo-sys-sub-blit.c @@ -30,9 +30,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) enum piglit_result piglit_display(void) { diff --git a/tests/fbo/fbo-viewport.c b/tests/fbo/fbo-viewport.c index c665ad695..496711eeb 100644 --- a/tests/fbo/fbo-viewport.c +++ b/tests/fbo/fbo-viewport.c @@ -32,10 +32,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 500; -int piglit_height = 500; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 500 /*window_width*/, + 500 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) /** * Draw some simple quads in a bunch of viewports which tile the window. diff --git a/tests/general/array-stride.c b/tests/general/array-stride.c index aa46caadf..10cf56717 100644 --- a/tests/general/array-stride.c +++ b/tests/general/array-stride.c @@ -30,9 +30,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *TestName = "array-stride"; diff --git a/tests/general/bgra-sec-color-pointer.c b/tests/general/bgra-sec-color-pointer.c index e94f545d7..5ae79dd17 100644 --- a/tests/general/bgra-sec-color-pointer.c +++ b/tests/general/bgra-sec-color-pointer.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static GLfloat verts[12] = {225.0, 175.0, 0.0, 225.0, 225.0, 0.0, diff --git a/tests/general/bgra-vert-attrib-pointer.c b/tests/general/bgra-vert-attrib-pointer.c index 7f0d53f2f..cd3e9957d 100644 --- a/tests/general/bgra-vert-attrib-pointer.c +++ b/tests/general/bgra-vert-attrib-pointer.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; static GLint fs; diff --git a/tests/general/blendminmax.c b/tests/general/blendminmax.c index 652135812..325e4e4ff 100644 --- a/tests/general/blendminmax.c +++ b/tests/general/blendminmax.c @@ -34,9 +34,11 @@ #include "piglit-util.h" -int piglit_width = 400; -int piglit_height = 200; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 200 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) + static const GLfloat Near = 5.0, Far = 25.0; enum piglit_result diff --git a/tests/general/blendsquare.c b/tests/general/blendsquare.c index 8850a4137..f8931a167 100644 --- a/tests/general/blendsquare.c +++ b/tests/general/blendsquare.c @@ -34,9 +34,11 @@ #include "piglit-util.h" -int piglit_width = 400; -int piglit_height = 200; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 200 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) + static const GLfloat Near = 5.0, Far = 25.0; enum piglit_result diff --git a/tests/general/clear-accum.c b/tests/general/clear-accum.c index b50579d5a..1647067f2 100644 --- a/tests/general/clear-accum.c +++ b/tests/general/clear-accum.c @@ -32,9 +32,10 @@ #include "piglit-util.h" -int piglit_width = 400; -int piglit_height = 200; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ACCUM; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 200 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ACCUM) enum piglit_result piglit_display(void) diff --git a/tests/general/clear-varray-2.0.c b/tests/general/clear-varray-2.0.c index ac853e4af..d3c1e0a98 100644 --- a/tests/general/clear-varray-2.0.c +++ b/tests/general/clear-varray-2.0.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 200, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH) /* apply MVP and set the color to blue. */ static const GLchar *const vp_code = diff --git a/tests/general/copy-pixels.c b/tests/general/copy-pixels.c index 892db1e74..72df073e9 100644 --- a/tests/general/copy-pixels.c +++ b/tests/general/copy-pixels.c @@ -35,10 +35,10 @@ #define IMAGE_WIDTH 16 #define IMAGE_HEIGHT 16 -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA | - GLUT_STENCIL | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA | GLUT_STENCIL | GLUT_DEPTH); enum piglit_result piglit_display(void) diff --git a/tests/general/copypixels-draw-sync.c b/tests/general/copypixels-draw-sync.c index 54ffc0e07..d811ef436 100644 --- a/tests/general/copypixels-draw-sync.c +++ b/tests/general/copypixels-draw-sync.c @@ -32,9 +32,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 64; -int piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/general/copypixels-sync.c b/tests/general/copypixels-sync.c index 9a13628c5..6de7be05b 100644 --- a/tests/general/copypixels-sync.c +++ b/tests/general/copypixels-sync.c @@ -31,9 +31,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 64; -int piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/general/depth-clamp-range.c b/tests/general/depth-clamp-range.c index c93e7edb3..9cc37b78f 100644 --- a/tests/general/depth-clamp-range.c +++ b/tests/general/depth-clamp-range.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 150, piglit_height = 150; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 150 /*window_width*/, + 150 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH) void piglit_init(int argc, char **argv) diff --git a/tests/general/depth_clamp.c b/tests/general/depth_clamp.c index 645fff473..9b602de13 100644 --- a/tests/general/depth_clamp.c +++ b/tests/general/depth_clamp.c @@ -36,8 +36,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 150; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 150 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH) void piglit_init(int argc, char **argv) diff --git a/tests/general/depthfunc.c b/tests/general/depthfunc.c index 2591f7452..a433b212e 100644 --- a/tests/general/depthfunc.c +++ b/tests/general/depthfunc.c @@ -33,9 +33,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 200; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 200 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH) /** * Convenience function to draw an axis-aligned rectangle. diff --git a/tests/general/depthrange-clear.c b/tests/general/depthrange-clear.c index 0e895b758..e9b6f4ae0 100644 --- a/tests/general/depthrange-clear.c +++ b/tests/general/depthrange-clear.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH) /** * Convenience function to draw an axis-aligned rectangle. diff --git a/tests/general/dlist-clear.c b/tests/general/dlist-clear.c index 7efc5653e..b65a00561 100644 --- a/tests/general/dlist-clear.c +++ b/tests/general/dlist-clear.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/dlist-color-material.c b/tests/general/dlist-color-material.c index 92ff50a16..0e5bfaa6e 100644 --- a/tests/general/dlist-color-material.c +++ b/tests/general/dlist-color-material.c @@ -35,11 +35,10 @@ #include <assert.h> #include "piglit-util.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE; - - +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE) /** * Test glMaterial handling in a display list for one of GL_AMBIENT, diff --git a/tests/general/dlist-fdo3129-01.c b/tests/general/dlist-fdo3129-01.c index b71eabefa..3cbb382e1 100644 --- a/tests/general/dlist-fdo3129-01.c +++ b/tests/general/dlist-fdo3129-01.c @@ -31,9 +31,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; -int piglit_width = 256; -int piglit_height = 256; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint list; diff --git a/tests/general/dlist-fdo3129-02.c b/tests/general/dlist-fdo3129-02.c index 23c2e5077..cdfaab4d8 100644 --- a/tests/general/dlist-fdo3129-02.c +++ b/tests/general/dlist-fdo3129-02.c @@ -31,9 +31,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; -int piglit_width = 256; -int piglit_height = 256; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint list; diff --git a/tests/general/dlist-fdo31590.c b/tests/general/dlist-fdo31590.c index 820b301ff..cd2b53ef4 100644 --- a/tests/general/dlist-fdo31590.c +++ b/tests/general/dlist-fdo31590.c @@ -38,9 +38,10 @@ static const char *TestName = "dlist-fdo31590"; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; -int piglit_width = 500, piglit_height = 500; - +PIGLIT_GL_TEST_MAIN( + 500 /*window_width*/, + 500 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const GLfloat ctrlpoints[4][3] = { { -4.0, -4.0, 0.0}, { -2.0, 4.0, 0.0}, diff --git a/tests/general/draw-arrays-colormaterial.c b/tests/general/draw-arrays-colormaterial.c index a15f558e2..c2c9ce64c 100644 --- a/tests/general/draw-arrays-colormaterial.c +++ b/tests/general/draw-arrays-colormaterial.c @@ -32,9 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE) #define DX0 -0.6 diff --git a/tests/general/draw-batch.c b/tests/general/draw-batch.c index a9cc120ee..2d9126ae4 100644 --- a/tests/general/draw-batch.c +++ b/tests/general/draw-batch.c @@ -24,8 +24,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 130; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 130 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) void piglit_init(int argc, char **argv) diff --git a/tests/general/draw-copypixels-sync.c b/tests/general/draw-copypixels-sync.c index e0832fb8b..a9ed1f8d2 100644 --- a/tests/general/draw-copypixels-sync.c +++ b/tests/general/draw-copypixels-sync.c @@ -31,9 +31,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 64; -int piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/general/draw-elements-base-vertex-bounds.c b/tests/general/draw-elements-base-vertex-bounds.c index bdcdba762..572352f06 100644 --- a/tests/general/draw-elements-base-vertex-bounds.c +++ b/tests/general/draw-elements-base-vertex-bounds.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 300, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 300 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLfloat vertices[][4] = { { 1, -1, 0, 1 }, /* bottom right */ diff --git a/tests/general/draw-elements-base-vertex-neg.c b/tests/general/draw-elements-base-vertex-neg.c index ce45d74d9..0a8cd27ba 100644 --- a/tests/general/draw-elements-base-vertex-neg.c +++ b/tests/general/draw-elements-base-vertex-neg.c @@ -26,8 +26,10 @@ #include "piglit-util.h" -int piglit_width = 320, piglit_height = 80; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 320 /*window_width*/, + 80 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) GLboolean user_va = GL_FALSE; diff --git a/tests/general/draw-elements-base-vertex.c b/tests/general/draw-elements-base-vertex.c index f61d86e0e..04a8af4ce 100644 --- a/tests/general/draw-elements-base-vertex.c +++ b/tests/general/draw-elements-base-vertex.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 300, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 300 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define NUM_QUADS 10 diff --git a/tests/general/draw-elements-vs-inputs.c b/tests/general/draw-elements-vs-inputs.c index 53e91c1b9..eb0e1af8a 100644 --- a/tests/general/draw-elements-vs-inputs.c +++ b/tests/general/draw-elements-vs-inputs.c @@ -39,10 +39,10 @@ #include "piglit-util.h" - -int piglit_width = 300, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 300 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) void piglit_init(int argc, char **argv) diff --git a/tests/general/draw-elements.c b/tests/general/draw-elements.c index ea3b926a3..b26b4fc00 100644 --- a/tests/general/draw-elements.c +++ b/tests/general/draw-elements.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 320, piglit_height = 60; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 320 /*window_width*/, + 60 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) GLboolean user = GL_FALSE; diff --git a/tests/general/draw-instanced-divisor.c b/tests/general/draw-instanced-divisor.c index 19dda7ccf..d7151c05e 100644 --- a/tests/general/draw-instanced-divisor.c +++ b/tests/general/draw-instanced-divisor.c @@ -29,9 +29,10 @@ #include "piglit-util.h" - -int piglit_width = 500, piglit_height = 500; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 500 /*window_width*/, + 500 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "draw-instanced"; diff --git a/tests/general/draw-instanced.c b/tests/general/draw-instanced.c index 445108e76..00ea4d6de 100644 --- a/tests/general/draw-instanced.c +++ b/tests/general/draw-instanced.c @@ -29,9 +29,10 @@ #include "piglit-util.h" - -int piglit_width = 500, piglit_height = 500; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 500 /*window_width*/, + 500 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "draw-instanced"; diff --git a/tests/general/draw-pixel-with-texture.c b/tests/general/draw-pixel-with-texture.c index 952afb129..92e667823 100644 --- a/tests/general/draw-pixel-with-texture.c +++ b/tests/general/draw-pixel-with-texture.c @@ -23,8 +23,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define SCREEN_SIZE_IN_PIXELS (piglit_width * piglit_height * 4) diff --git a/tests/general/draw-pixels.c b/tests/general/draw-pixels.c index 6fe7feb3b..8a6e3390c 100644 --- a/tests/general/draw-pixels.c +++ b/tests/general/draw-pixels.c @@ -51,9 +51,10 @@ /** Convert GLint in [-2147483648,2147483647] to GLfloat in [-1.0,1.0] */ #define INT_TO_FLOAT(I) ((GLfloat) ((2.0F * (I) + 1.0F) * (1.0F/4294967294.0))) -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | - GLUT_DEPTH | GLUT_STENCIL; -int piglit_width = 16, piglit_height = 16; +PIGLIT_GL_TEST_MAIN( + 16 /*window_width*/, + 16 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL) const GLuint idx0 = 0, idx1 = 1, idx2 = 2, idx3 = 3; static GLfloat expected[100][4]; diff --git a/tests/general/draw-sync.c b/tests/general/draw-sync.c index 50804510f..881fc2c89 100644 --- a/tests/general/draw-sync.c +++ b/tests/general/draw-sync.c @@ -31,9 +31,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 64; -int piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/general/draw-vertices-half-float.c b/tests/general/draw-vertices-half-float.c index 3255658f5..95f7b9b88 100644 --- a/tests/general/draw-vertices-half-float.c +++ b/tests/general/draw-vertices-half-float.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 320, piglit_height = 60; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 320 /*window_width*/, + 60 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) GLboolean user_va = GL_FALSE; diff --git a/tests/general/draw-vertices.c b/tests/general/draw-vertices.c index 81408c2c4..b23d5f8f7 100644 --- a/tests/general/draw-vertices.c +++ b/tests/general/draw-vertices.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 320, piglit_height = 60; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 320 /*window_width*/, + 60 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) GLboolean user_va = GL_FALSE; diff --git a/tests/general/drawpix-z.c b/tests/general/drawpix-z.c index 58f0a89b1..3cc4096d6 100644 --- a/tests/general/drawpix-z.c +++ b/tests/general/drawpix-z.c @@ -36,9 +36,9 @@ #include "piglit-util.h" -int piglit_width = 200, piglit_height = 200; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH; - +PIGLIT_GL_TEST_MAIN(200 /*window_width*/, + 200 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); static void draw_z_gradient(GLfloat zLeft, GLfloat zRight) diff --git a/tests/general/early-z.c b/tests/general/early-z.c index a8eca342a..e56c2f021 100644 --- a/tests/general/early-z.c +++ b/tests/general/early-z.c @@ -29,10 +29,10 @@ #include "piglit-util.h" - -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH) GLint u_zval; diff --git a/tests/general/fog-modes.c b/tests/general/fog-modes.c index c06790fd7..35cdf4b5a 100644 --- a/tests/general/fog-modes.c +++ b/tests/general/fog-modes.c @@ -34,9 +34,10 @@ #undef far #endif -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/fragment-center.c b/tests/general/fragment-center.c index 631668d0a..16049dbfb 100644 --- a/tests/general/fragment-center.c +++ b/tests/general/fragment-center.c @@ -23,8 +23,10 @@ #include "piglit-util.h" -int piglit_width = 96, piglit_height = 96; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 96 /*window_width*/, + 96 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/framebuffer-srgb.c b/tests/general/framebuffer-srgb.c index c741ac68e..eca8b87e5 100644 --- a/tests/general/framebuffer-srgb.c +++ b/tests/general/framebuffer-srgb.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) /* size of texture/renderbuffer (power of two) */ #define FBO_SIZE 128 diff --git a/tests/general/getactiveattrib.c b/tests/general/getactiveattrib.c index 8fb3e26a1..fc92d5ade 100644 --- a/tests/general/getactiveattrib.c +++ b/tests/general/getactiveattrib.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) struct attribute { /** Name of the attribute. */ diff --git a/tests/general/geterror-inside-begin.c b/tests/general/geterror-inside-begin.c index aefabb644..cd9bcd2b7 100644 --- a/tests/general/geterror-inside-begin.c +++ b/tests/general/geterror-inside-begin.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/geterror-invalid-enum.c b/tests/general/geterror-invalid-enum.c index 3402601d7..9002d893d 100644 --- a/tests/general/geterror-invalid-enum.c +++ b/tests/general/geterror-invalid-enum.c @@ -22,8 +22,10 @@ */ #include "piglit-util.h" -int piglit_width = 10, piglit_height = 10; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/gl30basic.c b/tests/general/gl30basic.c index 3cb548510..6cc67d8fd 100644 --- a/tests/general/gl30basic.c +++ b/tests/general/gl30basic.c @@ -34,9 +34,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL) static const char *Prog = "gl30basic"; diff --git a/tests/general/hiz.c b/tests/general/hiz.c index 90211cbb2..07d67a3f7 100644 --- a/tests/general/hiz.c +++ b/tests/general/hiz.c @@ -33,9 +33,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE) enum { INSIDE, diff --git a/tests/general/infinite-spot-light.c b/tests/general/infinite-spot-light.c index bcae72dc3..278b54205 100644 --- a/tests/general/infinite-spot-light.c +++ b/tests/general/infinite-spot-light.c @@ -41,8 +41,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) /* Already normalized, and 0.5 would be the expected color */ static GLfloat dir[3] = {0.866025404, 0.0, 0.5}; diff --git a/tests/general/isbufferobj.c b/tests/general/isbufferobj.c index bb369a9b6..5a95a22c6 100644 --- a/tests/general/isbufferobj.c +++ b/tests/general/isbufferobj.c @@ -35,9 +35,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) static const char *TestName = "isbufferobj"; diff --git a/tests/general/line-aa-width.c b/tests/general/line-aa-width.c index 4cd560cf3..604783680 100644 --- a/tests/general/line-aa-width.c +++ b/tests/general/line-aa-width.c @@ -38,8 +38,10 @@ #include "piglit-util.h" -int piglit_width = 300, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 300 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static float y_from_x(float x) diff --git a/tests/general/linestipple.c b/tests/general/linestipple.c index f1e19edd6..36ec57aaa 100644 --- a/tests/general/linestipple.c +++ b/tests/general/linestipple.c @@ -28,8 +28,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static void probe_pixel(int x, int y, const float* expected) { diff --git a/tests/general/longprim.c b/tests/general/longprim.c index 7a3ad68f8..a2f21ed4a 100644 --- a/tests/general/longprim.c +++ b/tests/general/longprim.c @@ -31,9 +31,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *TestName = "longprim"; diff --git a/tests/general/object_purgeable-api-pbo.c b/tests/general/object_purgeable-api-pbo.c index 80cb22694..cab51c22e 100644 --- a/tests/general/object_purgeable-api-pbo.c +++ b/tests/general/object_purgeable-api-pbo.c @@ -32,8 +32,10 @@ #include "piglit-util.h" #include "object_purgeable.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) void piglit_init(int argc, char **argv) diff --git a/tests/general/object_purgeable-api-texture.c b/tests/general/object_purgeable-api-texture.c index 59bce5db9..2e78a879b 100644 --- a/tests/general/object_purgeable-api-texture.c +++ b/tests/general/object_purgeable-api-texture.c @@ -32,8 +32,10 @@ #include "piglit-util.h" #include "object_purgeable.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) void piglit_init(int argc, char **argv) diff --git a/tests/general/object_purgeable-api-vbo.c b/tests/general/object_purgeable-api-vbo.c index 0253497c0..4b8ba88c7 100644 --- a/tests/general/object_purgeable-api-vbo.c +++ b/tests/general/object_purgeable-api-vbo.c @@ -32,8 +32,10 @@ #include "piglit-util.h" #include "object_purgeable.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) void piglit_init(int argc, char **argv) diff --git a/tests/general/occlusion-query-discard.c b/tests/general/occlusion-query-discard.c index 88b039c45..b35fb64db 100644 --- a/tests/general/occlusion-query-discard.c +++ b/tests/general/occlusion-query-discard.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 50, piglit_height = 50; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 50 /*window_width*/, + 50 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static char vs_code[] = "varying float do_discard;\n" diff --git a/tests/general/occlusion_query.c b/tests/general/occlusion_query.c index ed39369db..8a4f7eafa 100644 --- a/tests/general/occlusion_query.c +++ b/tests/general/occlusion_query.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 180, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 180 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH) #define MAX_QUERIES 5 static GLuint occ_queries[MAX_QUERIES]; diff --git a/tests/general/oes-read-format.c b/tests/general/oes-read-format.c index 4a76cbca5..660190a30 100644 --- a/tests/general/oes-read-format.c +++ b/tests/general/oes-read-format.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/pbo-drawpixels.c b/tests/general/pbo-drawpixels.c index e1a17ba78..c60a2a0aa 100644 --- a/tests/general/pbo-drawpixels.c +++ b/tests/general/pbo-drawpixels.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/pbo-read-argb8888.c b/tests/general/pbo-read-argb8888.c index 487b6b136..1947c8628 100644 --- a/tests/general/pbo-read-argb8888.c +++ b/tests/general/pbo-read-argb8888.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLboolean probe(int x, int y, uint32_t expected, uint32_t observed) diff --git a/tests/general/pbo-readpixels-small.c b/tests/general/pbo-readpixels-small.c index 0b9d43c43..54ff1ce48 100644 --- a/tests/general/pbo-readpixels-small.c +++ b/tests/general/pbo-readpixels-small.c @@ -38,8 +38,10 @@ #include "piglit-util.h" -int piglit_width = 2, piglit_height = 2; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 2 /*window_width*/, + 2 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLboolean probe(int x, int y, uint32_t expected, uint32_t observed) diff --git a/tests/general/pbo-teximage-tiling-2.c b/tests/general/pbo-teximage-tiling-2.c index 6677105f8..185e5f51d 100644 --- a/tests/general/pbo-teximage-tiling-2.c +++ b/tests/general/pbo-teximage-tiling-2.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/pbo-teximage-tiling.c b/tests/general/pbo-teximage-tiling.c index 16c0dbafe..6ab31d13f 100644 --- a/tests/general/pbo-teximage-tiling.c +++ b/tests/general/pbo-teximage-tiling.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/pbo-teximage.c b/tests/general/pbo-teximage.c index 058d5191c..3fb840d33 100644 --- a/tests/general/pbo-teximage.c +++ b/tests/general/pbo-teximage.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/point-line-no-cull.c b/tests/general/point-line-no-cull.c index a411ad088..aa5254f6f 100644 --- a/tests/general/point-line-no-cull.c +++ b/tests/general/point-line-no-cull.c @@ -32,10 +32,10 @@ #include "piglit-util.h" - -int piglit_width = 120, piglit_height = 120; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 120 /*window_width*/, + 120 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) /** Test if the pixels at (x,y) and (x,y+1) are black. * We test two pixels to be sure we hit the primitive we drew. We could diff --git a/tests/general/polygon-mode.c b/tests/general/polygon-mode.c index fdd95cc97..4eb515166 100644 --- a/tests/general/polygon-mode.c +++ b/tests/general/polygon-mode.c @@ -30,9 +30,10 @@ #include "piglit-util.h" - -int piglit_width = 500, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 500 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static float ortho_left = -1, ortho_right = 8, ortho_bottom = -2, ortho_top = 2; diff --git a/tests/general/pos-array.c b/tests/general/pos-array.c index e4f0fe9d7..3c1616009 100644 --- a/tests/general/pos-array.c +++ b/tests/general/pos-array.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "pos-array"; diff --git a/tests/general/primitive-restart.c b/tests/general/primitive-restart.c index fc1f9fd03..cbeb882b8 100644 --- a/tests/general/primitive-restart.c +++ b/tests/general/primitive-restart.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *TestName = "primitive-restart"; diff --git a/tests/general/provoking-vertex.c b/tests/general/provoking-vertex.c index d8d6d77b7..07da8e0f6 100644 --- a/tests/general/provoking-vertex.c +++ b/tests/general/provoking-vertex.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) void piglit_init(int argc, char **argv) diff --git a/tests/general/quad-invariance.c b/tests/general/quad-invariance.c index 06ef451cb..9652c148d 100644 --- a/tests/general/quad-invariance.c +++ b/tests/general/quad-invariance.c @@ -38,8 +38,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/read-front.c b/tests/general/read-front.c index 562cf1e86..221042128 100644 --- a/tests/general/read-front.c +++ b/tests/general/read-front.c @@ -37,8 +37,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL) enum piglit_result piglit_display(void) diff --git a/tests/general/readpix-z.c b/tests/general/readpix-z.c index 51867685b..b7506b049 100644 --- a/tests/general/readpix-z.c +++ b/tests/general/readpix-z.c @@ -29,10 +29,9 @@ #include "piglit-util.h" -int piglit_width = 200, piglit_height = 200; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH; - - +PIGLIT_GL_TEST_MAIN(200 /*window_width*/, + 200 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); static void draw_z_gradient(GLfloat zLeft, GLfloat zRight) diff --git a/tests/general/roundmode-getintegerv.c b/tests/general/roundmode-getintegerv.c index e89ce02da..789d5403f 100644 --- a/tests/general/roundmode-getintegerv.c +++ b/tests/general/roundmode-getintegerv.c @@ -44,9 +44,10 @@ #include <fenv.h> -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = 10; -int piglit_height = 10; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/roundmode-pixelstore.c b/tests/general/roundmode-pixelstore.c index 6aac78586..cbc173b94 100644 --- a/tests/general/roundmode-pixelstore.c +++ b/tests/general/roundmode-pixelstore.c @@ -41,9 +41,10 @@ #include <fenv.h> -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = 10; -int piglit_height = 10; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/scissor-bitmap.c b/tests/general/scissor-bitmap.c index b3434129e..94a739d85 100644 --- a/tests/general/scissor-bitmap.c +++ b/tests/general/scissor-bitmap.c @@ -34,9 +34,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) struct probes { struct test_position { diff --git a/tests/general/scissor-clear.c b/tests/general/scissor-clear.c index 8fbf8f20d..c47bd9c2a 100644 --- a/tests/general/scissor-clear.c +++ b/tests/general/scissor-clear.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) enum piglit_result piglit_display(void) diff --git a/tests/general/scissor-copypixels.c b/tests/general/scissor-copypixels.c index 9efc2e06a..91af0f290 100644 --- a/tests/general/scissor-copypixels.c +++ b/tests/general/scissor-copypixels.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLboolean check_red_box_surrounded_by_green(int x, int y, int w, int h) diff --git a/tests/general/scissor-depth-clear.c b/tests/general/scissor-depth-clear.c index b40b1c180..a153b9b1d 100644 --- a/tests/general/scissor-depth-clear.c +++ b/tests/general/scissor-depth-clear.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL) enum piglit_result piglit_display(void) diff --git a/tests/general/scissor-many.c b/tests/general/scissor-many.c index f33e2fa03..6ad4d63ce 100644 --- a/tests/general/scissor-many.c +++ b/tests/general/scissor-many.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL) enum piglit_result piglit_display(void) diff --git a/tests/general/scissor-offscreen.c b/tests/general/scissor-offscreen.c index 9ea970bad..5412bcbba 100644 --- a/tests/general/scissor-offscreen.c +++ b/tests/general/scissor-offscreen.c @@ -36,9 +36,10 @@ #include "piglit-util.h" -int piglit_width = 64; -int piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/scissor-stencil-clear.c b/tests/general/scissor-stencil-clear.c index 96587c613..b3ca4b962 100644 --- a/tests/general/scissor-stencil-clear.c +++ b/tests/general/scissor-stencil-clear.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL) enum piglit_result piglit_display(void) diff --git a/tests/general/select.c b/tests/general/select.c index fa60e39d9..c913b3b4d 100644 --- a/tests/general/select.c +++ b/tests/general/select.c @@ -34,9 +34,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL) GLuint ReferenceHitEntries[3][64]; #define NAME_STACK_DEPTH 0 diff --git a/tests/general/stencil-drawpixels.c b/tests/general/stencil-drawpixels.c index a3df086bc..33b16d444 100644 --- a/tests/general/stencil-drawpixels.c +++ b/tests/general/stencil-drawpixels.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL) enum piglit_result piglit_display(void) diff --git a/tests/general/stencil-twoside.c b/tests/general/stencil-twoside.c index 2d2d623fd..66f93c3a3 100644 --- a/tests/general/stencil-twoside.c +++ b/tests/general/stencil-twoside.c @@ -36,9 +36,12 @@ #include "piglit-util.h" static int use20syntax = 1; -int piglit_width = 650; -int piglit_height = 200; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL; + +PIGLIT_GL_TEST_MAIN( + 650 /*window_width*/, + 200 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL) + static const GLfloat Near = 5.0, Far = 25.0; diff --git a/tests/general/stencil-wrap.c b/tests/general/stencil-wrap.c index cc7fbea35..49c3950d3 100644 --- a/tests/general/stencil-wrap.c +++ b/tests/general/stencil-wrap.c @@ -34,9 +34,10 @@ #include "piglit-util.h" -int piglit_width = 550; -int piglit_height = 200; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 550 /*window_width*/, + 200 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL) enum piglit_result piglit_display(void) diff --git a/tests/general/sync_api.c b/tests/general/sync_api.c index cd9d8c3fa..efb67e383 100644 --- a/tests/general/sync_api.c +++ b/tests/general/sync_api.c @@ -31,9 +31,10 @@ #include "piglit-util.h" -int piglit_window_mode = GLUT_RGB; -int piglit_width = 400; -int piglit_height = 300; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB) #define FAIL_ON_ERROR(string) \ do { \ diff --git a/tests/general/texgen.c b/tests/general/texgen.c index a05eaeafb..88c640f20 100644 --- a/tests/general/texgen.c +++ b/tests/general/texgen.c @@ -28,9 +28,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int CurrentTest = 0; static int UseFragmentProgram = 0; diff --git a/tests/general/texunits.c b/tests/general/texunits.c index 667a7b484..b056df807 100644 --- a/tests/general/texunits.c +++ b/tests/general/texunits.c @@ -30,10 +30,10 @@ #include "piglit-util.h" - -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) /** random number for checking state */ static GLfloat Random[128][4]; diff --git a/tests/general/timer_query.c b/tests/general/timer_query.c index 3e9a29b37..fc42cde59 100644 --- a/tests/general/timer_query.c +++ b/tests/general/timer_query.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 180, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 180 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH) static GLuint timer_query; diff --git a/tests/general/triangle-rasterization-overdraw.cpp b/tests/general/triangle-rasterization-overdraw.cpp index 69d0508c4..073a426a5 100644 --- a/tests/general/triangle-rasterization-overdraw.cpp +++ b/tests/general/triangle-rasterization-overdraw.cpp @@ -70,9 +70,11 @@ bool break_on_fail = false; int random_test_count = 10; /* Piglit variables */ -int piglit_width = 1000; -int piglit_height = 1000; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; + +PIGLIT_GL_TEST_MAIN( + 1000 /*window_width*/, + 1000 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) /* Globals */ int test_id = 0; diff --git a/tests/general/triangle-rasterization.cpp b/tests/general/triangle-rasterization.cpp index 1a9c85511..fd9dae5d1 100644 --- a/tests/general/triangle-rasterization.cpp +++ b/tests/general/triangle-rasterization.cpp @@ -98,9 +98,11 @@ int fbo_width = 256; int fbo_height = 256; /* Piglit variables */ -int piglit_width = fbo_width; -int piglit_height = fbo_height; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; + +PIGLIT_GL_TEST_MAIN( + fbo_width /*window_width*/, + fbo_height /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) /* Globals */ int test_id = 0; diff --git a/tests/general/two-sided-lighting-separate-specular.c b/tests/general/two-sided-lighting-separate-specular.c index 45792df0c..83a986f92 100644 --- a/tests/general/two-sided-lighting-separate-specular.c +++ b/tests/general/two-sided-lighting-separate-specular.c @@ -34,9 +34,10 @@ #include "piglit-util.h" -int piglit_width = 256, piglit_height = 256; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const GLfloat red[4] = {1, 0, 0, 0}; static const GLfloat green[4] = {0, 1, 0, 1}; diff --git a/tests/general/two-sided-lighting.c b/tests/general/two-sided-lighting.c index 8820d3a89..2cc3eeb19 100644 --- a/tests/general/two-sided-lighting.c +++ b/tests/general/two-sided-lighting.c @@ -34,9 +34,10 @@ #include "piglit-util.h" -int piglit_width = 256, piglit_height = 256; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const GLfloat green[4] = {0, 1, 0, 1}; static const GLfloat blue[4] = {0, 0, 1, 1}; diff --git a/tests/general/user-clip.c b/tests/general/user-clip.c index ab95940d0..cbe4d17c7 100644 --- a/tests/general/user-clip.c +++ b/tests/general/user-clip.c @@ -32,13 +32,10 @@ #define BOX_SIZE 32 - -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = 100; -int piglit_height = 100; - - - +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE) static const GLfloat clear_color[4] = { 0.5, 0.5, 0.5, 1.0 }; diff --git a/tests/general/vao-01.c b/tests/general/vao-01.c index 71e4fd782..f0c40ba0f 100644 --- a/tests/general/vao-01.c +++ b/tests/general/vao-01.c @@ -38,9 +38,10 @@ #include "piglit-util.h" -int piglit_width = 400; -int piglit_height = 200; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 200 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/vao-02.c b/tests/general/vao-02.c index 093e0a804..95c26b5d1 100644 --- a/tests/general/vao-02.c +++ b/tests/general/vao-02.c @@ -38,9 +38,10 @@ #include "piglit-util.h" -int piglit_width = 400; -int piglit_height = 200; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 200 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/general/vao-element-array-buffer.c b/tests/general/vao-element-array-buffer.c index fc438ef8c..2f6724711 100644 --- a/tests/general/vao-element-array-buffer.c +++ b/tests/general/vao-element-array-buffer.c @@ -30,9 +30,10 @@ #include "piglit-util.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint vao; diff --git a/tests/general/varray-disabled.c b/tests/general/varray-disabled.c index cbd453d54..b5b403e7a 100644 --- a/tests/general/varray-disabled.c +++ b/tests/general/varray-disabled.c @@ -36,8 +36,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static void set_colors(GLfloat *color_array, GLfloat *color) diff --git a/tests/general/vbo-bufferdata.c b/tests/general/vbo-bufferdata.c index a0469552b..0dba3df50 100644 --- a/tests/general/vbo-bufferdata.c +++ b/tests/general/vbo-bufferdata.c @@ -27,8 +27,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint vbo; diff --git a/tests/general/vbo-map-remap.c b/tests/general/vbo-map-remap.c index 82ab06d67..87e3350cc 100644 --- a/tests/general/vbo-map-remap.c +++ b/tests/general/vbo-map-remap.c @@ -26,8 +26,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint vbo; diff --git a/tests/general/vbo-subdata-sync.c b/tests/general/vbo-subdata-sync.c index e4baef253..af2788cdd 100644 --- a/tests/general/vbo-subdata-sync.c +++ b/tests/general/vbo-subdata-sync.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint vbo; diff --git a/tests/general/vbo-subdata-zero.c b/tests/general/vbo-subdata-zero.c index d0199fadd..cb4787338 100644 --- a/tests/general/vbo-subdata-zero.c +++ b/tests/general/vbo-subdata-zero.c @@ -26,8 +26,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint vbo; diff --git a/tests/general/vs-point_size-zero.c b/tests/general/vs-point_size-zero.c index f44b0bbd4..de8cc3709 100644 --- a/tests/general/vs-point_size-zero.c +++ b/tests/general/vs-point_size-zero.c @@ -24,9 +24,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 50; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 50 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *vstext = "void main() \n" diff --git a/tests/gles2/gles2_shader_runner.c b/tests/gles2/gles2_shader_runner.c index 31fcb5ea7..0d06ef8c8 100644 --- a/tests/gles2/gles2_shader_runner.c +++ b/tests/gles2/gles2_shader_runner.c @@ -35,8 +35,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_RGB | GLUT_DEPTH; -int piglit_width = 250, piglit_height = 250; +PIGLIT_GL_TEST_MAIN( + 250 /*window_width*/, + 250 /*window_height*/, + GLUT_RGB | GLUT_DEPTH) static float gles_version = 0.0; static float essl_version = 0.0; diff --git a/tests/glslparsertest/glslparsertest.c b/tests/glslparsertest/glslparsertest.c index 43ce12378..fbd24226f 100644 --- a/tests/glslparsertest/glslparsertest.c +++ b/tests/glslparsertest/glslparsertest.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 200, piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static char *filename; static int expected_pass; diff --git a/tests/hiz/hiz-depth-read-fbo-d24-s0.c b/tests/hiz/hiz-depth-read-fbo-d24-s0.c index a030d55a9..05b8c9124 100644 --- a/tests/hiz/hiz-depth-read-fbo-d24-s0.c +++ b/tests/hiz/hiz-depth-read-fbo-d24-s0.c @@ -33,9 +33,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-depth-read-fbo-d24-s8.c b/tests/hiz/hiz-depth-read-fbo-d24-s8.c index 5d250724b..b3b2c97d3 100644 --- a/tests/hiz/hiz-depth-read-fbo-d24-s8.c +++ b/tests/hiz/hiz-depth-read-fbo-d24-s8.c @@ -34,9 +34,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-depth-read-fbo-d24s8.c b/tests/hiz/hiz-depth-read-fbo-d24s8.c index f41038733..fea0494fe 100644 --- a/tests/hiz/hiz-depth-read-fbo-d24s8.c +++ b/tests/hiz/hiz-depth-read-fbo-d24s8.c @@ -33,9 +33,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-depth-read-window-stencil0.c b/tests/hiz/hiz-depth-read-window-stencil0.c index c1adc845c..a3d9ed200 100644 --- a/tests/hiz/hiz-depth-read-window-stencil0.c +++ b/tests/hiz/hiz-depth-read-window-stencil0.c @@ -31,9 +31,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH) void piglit_init(int argc, char **argv) diff --git a/tests/hiz/hiz-depth-read-window-stencil1.c b/tests/hiz/hiz-depth-read-window-stencil1.c index 2ba433807..f8cdc9121 100644 --- a/tests/hiz/hiz-depth-read-window-stencil1.c +++ b/tests/hiz/hiz-depth-read-window-stencil1.c @@ -31,9 +31,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL) void piglit_init(int argc, char **argv) diff --git a/tests/hiz/hiz-depth-stencil-test-fbo-d0-s8.c b/tests/hiz/hiz-depth-stencil-test-fbo-d0-s8.c index b980e031c..0834f6b47 100644 --- a/tests/hiz/hiz-depth-stencil-test-fbo-d0-s8.c +++ b/tests/hiz/hiz-depth-stencil-test-fbo-d0-s8.c @@ -41,9 +41,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-depth-stencil-test-fbo-d24-s0.c b/tests/hiz/hiz-depth-stencil-test-fbo-d24-s0.c index dae48e9be..1ebe606cd 100644 --- a/tests/hiz/hiz-depth-stencil-test-fbo-d24-s0.c +++ b/tests/hiz/hiz-depth-stencil-test-fbo-d24-s0.c @@ -41,9 +41,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-depth-stencil-test-fbo-d24-s8.c b/tests/hiz/hiz-depth-stencil-test-fbo-d24-s8.c index 9dd74bb61..b972c7cd8 100644 --- a/tests/hiz/hiz-depth-stencil-test-fbo-d24-s8.c +++ b/tests/hiz/hiz-depth-stencil-test-fbo-d24-s8.c @@ -42,9 +42,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-depth-stencil-test-fbo-d24s8.c b/tests/hiz/hiz-depth-stencil-test-fbo-d24s8.c index cc6f1333a..e150a0a05 100644 --- a/tests/hiz/hiz-depth-stencil-test-fbo-d24s8.c +++ b/tests/hiz/hiz-depth-stencil-test-fbo-d24s8.c @@ -41,9 +41,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-depth-test-fbo-d24-s0.c b/tests/hiz/hiz-depth-test-fbo-d24-s0.c index bd1633443..d5f5f7b6c 100644 --- a/tests/hiz/hiz-depth-test-fbo-d24-s0.c +++ b/tests/hiz/hiz-depth-test-fbo-d24-s0.c @@ -38,9 +38,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-depth-test-fbo-d24-s8.c b/tests/hiz/hiz-depth-test-fbo-d24-s8.c index 8d7fc650c..384d07493 100644 --- a/tests/hiz/hiz-depth-test-fbo-d24-s8.c +++ b/tests/hiz/hiz-depth-test-fbo-d24-s8.c @@ -39,9 +39,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-depth-test-fbo-d24s8.c b/tests/hiz/hiz-depth-test-fbo-d24s8.c index 53ca958e1..5b4138e25 100644 --- a/tests/hiz/hiz-depth-test-fbo-d24s8.c +++ b/tests/hiz/hiz-depth-test-fbo-d24s8.c @@ -38,9 +38,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-depth-test-window-stencil0.c b/tests/hiz/hiz-depth-test-window-stencil0.c index 2c18be300..cef4d0d49 100644 --- a/tests/hiz/hiz-depth-test-window-stencil0.c +++ b/tests/hiz/hiz-depth-test-window-stencil0.c @@ -35,9 +35,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH) void piglit_init(int argc, char **argv) diff --git a/tests/hiz/hiz-depth-test-window-stencil1.c b/tests/hiz/hiz-depth-test-window-stencil1.c index 88a5a1d67..eae0d1126 100644 --- a/tests/hiz/hiz-depth-test-window-stencil1.c +++ b/tests/hiz/hiz-depth-test-window-stencil1.c @@ -35,9 +35,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL) void piglit_init(int argc, char **argv) diff --git a/tests/hiz/hiz-stencil-read-fbo-d0-s8.c b/tests/hiz/hiz-stencil-read-fbo-d0-s8.c index 20a143641..90d86ac73 100644 --- a/tests/hiz/hiz-stencil-read-fbo-d0-s8.c +++ b/tests/hiz/hiz-stencil-read-fbo-d0-s8.c @@ -39,9 +39,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-stencil-read-fbo-d24-s8.c b/tests/hiz/hiz-stencil-read-fbo-d24-s8.c index fdee06573..f53ad7e49 100644 --- a/tests/hiz/hiz-stencil-read-fbo-d24-s8.c +++ b/tests/hiz/hiz-stencil-read-fbo-d24-s8.c @@ -40,9 +40,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-stencil-read-fbo-d24s8.c b/tests/hiz/hiz-stencil-read-fbo-d24s8.c index 19d94923e..967763ec4 100644 --- a/tests/hiz/hiz-stencil-read-fbo-d24s8.c +++ b/tests/hiz/hiz-stencil-read-fbo-d24s8.c @@ -39,9 +39,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-stencil-read-window-depth0.c b/tests/hiz/hiz-stencil-read-window-depth0.c index b4e21b21f..44a4d899e 100644 --- a/tests/hiz/hiz-stencil-read-window-depth0.c +++ b/tests/hiz/hiz-stencil-read-window-depth0.c @@ -37,9 +37,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_STENCIL) void piglit_init(int argc, char **argv) diff --git a/tests/hiz/hiz-stencil-read-window-depth1.c b/tests/hiz/hiz-stencil-read-window-depth1.c index c2650fc8e..c3e9c04c5 100644 --- a/tests/hiz/hiz-stencil-read-window-depth1.c +++ b/tests/hiz/hiz-stencil-read-window-depth1.c @@ -37,9 +37,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_STENCIL | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_STENCIL | GLUT_DEPTH) void piglit_init(int argc, char **argv) diff --git a/tests/hiz/hiz-stencil-test-fbo-d0-s8.c b/tests/hiz/hiz-stencil-test-fbo-d0-s8.c index 1deade334..1e84966ae 100644 --- a/tests/hiz/hiz-stencil-test-fbo-d0-s8.c +++ b/tests/hiz/hiz-stencil-test-fbo-d0-s8.c @@ -38,9 +38,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-stencil-test-fbo-d24-s8.c b/tests/hiz/hiz-stencil-test-fbo-d24-s8.c index 1767ab772..50cefbad0 100644 --- a/tests/hiz/hiz-stencil-test-fbo-d24-s8.c +++ b/tests/hiz/hiz-stencil-test-fbo-d24-s8.c @@ -39,9 +39,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-stencil-test-fbo-d24s8.c b/tests/hiz/hiz-stencil-test-fbo-d24s8.c index 09a30078a..b5f8c196f 100644 --- a/tests/hiz/hiz-stencil-test-fbo-d24s8.c +++ b/tests/hiz/hiz-stencil-test-fbo-d24s8.c @@ -38,9 +38,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB) struct hiz_fbo_options fbo_options = { GL_RGBA, diff --git a/tests/hiz/hiz-stencil-test-window-depth0.c b/tests/hiz/hiz-stencil-test-window-depth0.c index 9555af58c..6189ef9c0 100644 --- a/tests/hiz/hiz-stencil-test-window-depth0.c +++ b/tests/hiz/hiz-stencil-test-window-depth0.c @@ -35,9 +35,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_STENCIL) void piglit_init(int argc, char **argv) diff --git a/tests/hiz/hiz-stencil-test-window-depth1.c b/tests/hiz/hiz-stencil-test-window-depth1.c index d04e13670..05561a0bd 100644 --- a/tests/hiz/hiz-stencil-test-window-depth1.c +++ b/tests/hiz/hiz-stencil-test-window-depth1.c @@ -35,9 +35,10 @@ #include "piglit-util.h" #include "hiz/hiz-util.h" -int piglit_width = 400; -int piglit_height = 400; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_STENCIL | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 400 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_STENCIL | GLUT_DEPTH) void piglit_init(int argc, char **argv) diff --git a/tests/shaders/activeprogram-bad-program.c b/tests/shaders/activeprogram-bad-program.c index a4025bfb0..34c53d948 100644 --- a/tests/shaders/activeprogram-bad-program.c +++ b/tests/shaders/activeprogram-bad-program.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char bad_vs_text[] = "vec4 my_ftransform(void);\n" diff --git a/tests/shaders/activeprogram-get.c b/tests/shaders/activeprogram-get.c index 04526eefa..c2299c37c 100644 --- a/tests/shaders/activeprogram-get.c +++ b/tests/shaders/activeprogram-get.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vs_text[] = "void main() { gl_Position = gl_Vertex; }"; diff --git a/tests/shaders/ati-fs-bad-delete.c b/tests/shaders/ati-fs-bad-delete.c index fd391efe0..55422bc06 100644 --- a/tests/shaders/ati-fs-bad-delete.c +++ b/tests/shaders/ati-fs-bad-delete.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/attribute0.c b/tests/shaders/attribute0.c index f3c8443db..c04869903 100644 --- a/tests/shaders/attribute0.c +++ b/tests/shaders/attribute0.c @@ -29,8 +29,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vs_text[] = "attribute vec4 vertex;\n" diff --git a/tests/shaders/createshaderprogram-attached-shaders.c b/tests/shaders/createshaderprogram-attached-shaders.c index 12c2fead3..e8df1c8ec 100644 --- a/tests/shaders/createshaderprogram-attached-shaders.c +++ b/tests/shaders/createshaderprogram-attached-shaders.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vs_text[] = "void main() { gl_Position = gl_Vertex; }"; diff --git a/tests/shaders/createshaderprogram-bad-type.c b/tests/shaders/createshaderprogram-bad-type.c index 6838f1fba..c15505bf5 100644 --- a/tests/shaders/createshaderprogram-bad-type.c +++ b/tests/shaders/createshaderprogram-bad-type.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vs_text[] = "void main() { gl_Position = gl_Vertex; }"; diff --git a/tests/shaders/fp-abs-01.c b/tests/shaders/fp-abs-01.c index 6f87dc052..3f97da8ee 100644 --- a/tests/shaders/fp-abs-01.c +++ b/tests/shaders/fp-abs-01.c @@ -35,11 +35,10 @@ #define TEST_COLS 2 #define BOX_SIZE 32 -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char cos_shader_source[] = "!!ARBfp1.0\n" diff --git a/tests/shaders/fp-abs-02.c b/tests/shaders/fp-abs-02.c index 16c3e1260..320118306 100644 --- a/tests/shaders/fp-abs-02.c +++ b/tests/shaders/fp-abs-02.c @@ -35,11 +35,10 @@ #define TEST_COLS 3 #define BOX_SIZE 32 -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char cos_shader_source[] = "!!ARBfp1.0\n" diff --git a/tests/shaders/fp-condition_codes-01.c b/tests/shaders/fp-condition_codes-01.c index 34e28fb43..87ced6265 100644 --- a/tests/shaders/fp-condition_codes-01.c +++ b/tests/shaders/fp-condition_codes-01.c @@ -42,9 +42,10 @@ #define BOX_SIZE 16 -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_ROWS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_COLS)+1); +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_height*/, + GLUT_DOUBLE) #define INVERT_MASK(x) (~(x) & 0x0f) diff --git a/tests/shaders/fp-fog.c b/tests/shaders/fp-fog.c index 684d132e4..9f92eb121 100644 --- a/tests/shaders/fp-fog.c +++ b/tests/shaders/fp-fog.c @@ -38,8 +38,10 @@ static const char* const program_text = "END\n" ; -int piglit_width = 50, piglit_height = 50; -int piglit_window_mode = GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 50 /*window_width*/, + 50 /*window_height*/, + GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE) static PFNGLFOGCOORDFPROC pglFogCoordf = NULL; diff --git a/tests/shaders/fp-formats.c b/tests/shaders/fp-formats.c index 1b7e1c2b6..b1d44802a 100644 --- a/tests/shaders/fp-formats.c +++ b/tests/shaders/fp-formats.c @@ -31,9 +31,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = 100; -int piglit_height = 100; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE) /** * Modulate the primary color with the alpha channel of the texture diff --git a/tests/shaders/fp-fragment-position.c b/tests/shaders/fp-fragment-position.c index 3859d1cb4..b4bec9ddb 100644 --- a/tests/shaders/fp-fragment-position.c +++ b/tests/shaders/fp-fragment-position.c @@ -27,8 +27,11 @@ #include "piglit-util.h" -int piglit_width = 200, piglit_height = 200; -int piglit_window_mode = GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 200 /*window_height*/, + GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH) + extern float piglit_tolerance[4]; #define NUM_PROGRAMS 4 diff --git a/tests/shaders/fp-incomplete-tex.c b/tests/shaders/fp-incomplete-tex.c index 8dc284ea6..d95cc7c0d 100644 --- a/tests/shaders/fp-incomplete-tex.c +++ b/tests/shaders/fp-incomplete-tex.c @@ -28,8 +28,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH) #define NUM_PROGRAMS 5 diff --git a/tests/shaders/fp-indirections.c b/tests/shaders/fp-indirections.c index 9015cec6e..03f9922ac 100644 --- a/tests/shaders/fp-indirections.c +++ b/tests/shaders/fp-indirections.c @@ -27,8 +27,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int get_program_i(GLenum pname) { diff --git a/tests/shaders/fp-indirections2.c b/tests/shaders/fp-indirections2.c index d7afd3780..fbabee45f 100644 --- a/tests/shaders/fp-indirections2.c +++ b/tests/shaders/fp-indirections2.c @@ -37,9 +37,10 @@ #define TEXTURE_SIZE 32 /* Note: Hardcoded dependencies in texture_init and texture_follow */ -int piglit_window_mode = GLUT_RGBA; -int piglit_width = TEXTURE_SIZE; -int piglit_height = TEXTURE_SIZE; +PIGLIT_GL_TEST_MAIN( + TEXTURE_SIZE /*window_width*/, + TEXTURE_SIZE /*window_height*/, + GLUT_RGBA) unsigned int max_samples; unsigned char * texture_data; diff --git a/tests/shaders/fp-kil.c b/tests/shaders/fp-kil.c index b32361d4e..31d2d0200 100644 --- a/tests/shaders/fp-kil.c +++ b/tests/shaders/fp-kil.c @@ -27,8 +27,10 @@ #include "piglit-util.h" -int piglit_width = 200, piglit_height = 200; -int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 200 /*window_height*/, + GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH) #define NUM_PROGRAMS 2 diff --git a/tests/shaders/fp-lit-mask.c b/tests/shaders/fp-lit-mask.c index 224833a05..4419ffaa9 100644 --- a/tests/shaders/fp-lit-mask.c +++ b/tests/shaders/fp-lit-mask.c @@ -27,8 +27,10 @@ #include "piglit-util.h" -int piglit_width = 200, piglit_height = 200; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 200 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH) static GLuint FragProg[15]; diff --git a/tests/shaders/fp-lit-src-equals-dst.c b/tests/shaders/fp-lit-src-equals-dst.c index e59b3b326..ea3e2add4 100644 --- a/tests/shaders/fp-lit-src-equals-dst.c +++ b/tests/shaders/fp-lit-src-equals-dst.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 200, piglit_height = 200; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 200 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH) static GLuint FragProg[15]; diff --git a/tests/shaders/fp-long-alu.c b/tests/shaders/fp-long-alu.c index 3a6ce8f89..af799a84f 100644 --- a/tests/shaders/fp-long-alu.c +++ b/tests/shaders/fp-long-alu.c @@ -37,9 +37,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_RGBA | GLUT_ALPHA; -int piglit_width = 32; -int piglit_height = 32; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_RGBA | GLUT_ALPHA) int max_alu_instructions; diff --git a/tests/shaders/fp-rfl.c b/tests/shaders/fp-rfl.c index 8dd4c40ce..58e1ce699 100644 --- a/tests/shaders/fp-rfl.c +++ b/tests/shaders/fp-rfl.c @@ -43,10 +43,10 @@ */ #define TEST_ROWS ((400 - 1) / (BOX_SIZE + 1)) - -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE + 1) * TEST_COLS)+1); -int piglit_height = (((BOX_SIZE + 1) * TEST_ROWS)+1); +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE + 1) * TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE + 1) * TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char vert_shader_source[] = "!!ARBvp1.0\n" diff --git a/tests/shaders/fp-set-01.c b/tests/shaders/fp-set-01.c index 2a9a8f02d..e405bc3bc 100644 --- a/tests/shaders/fp-set-01.c +++ b/tests/shaders/fp-set-01.c @@ -41,9 +41,10 @@ #define BOX_SIZE 16 -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) /** * Source for the fragment program to render the reference box. diff --git a/tests/shaders/fp-set-02.c b/tests/shaders/fp-set-02.c index 682a6aba4..8147d675e 100644 --- a/tests/shaders/fp-set-02.c +++ b/tests/shaders/fp-set-02.c @@ -70,11 +70,10 @@ struct { #define BOX_SIZE 8 -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) /** * Source for the fragment program to render the reference box. diff --git a/tests/shaders/fp-unpack-01.c b/tests/shaders/fp-unpack-01.c index 0b56e5ca5..ffdfe5133 100644 --- a/tests/shaders/fp-unpack-01.c +++ b/tests/shaders/fp-unpack-01.c @@ -42,9 +42,10 @@ #define BOX_SIZE 16 -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static char shader_source[64 * 1024]; static GLfloat colors[TEST_COLS][4]; diff --git a/tests/shaders/getuniform-01.c b/tests/shaders/getuniform-01.c index ffbce1fa4..b50cf77b1 100644 --- a/tests/shaders/getuniform-01.c +++ b/tests/shaders/getuniform-01.c @@ -32,8 +32,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 20, piglit_height = 20; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 20 /*window_width*/, + 20 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vs_text[] = "uniform float c[4];\n" diff --git a/tests/shaders/getuniform-02.c b/tests/shaders/getuniform-02.c index 98d872b67..3f0b8ddc4 100644 --- a/tests/shaders/getuniform-02.c +++ b/tests/shaders/getuniform-02.c @@ -29,8 +29,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 20, piglit_height = 20; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 20 /*window_width*/, + 20 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static char *TestName = "getuniform-02"; diff --git a/tests/shaders/glsl-arb-fragment-coord-conventions-define.c b/tests/shaders/glsl-arb-fragment-coord-conventions-define.c index 274708164..9c5e2495b 100644 --- a/tests/shaders/glsl-arb-fragment-coord-conventions-define.c +++ b/tests/shaders/glsl-arb-fragment-coord-conventions-define.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-arb-fragment-coord-conventions.c b/tests/shaders/glsl-arb-fragment-coord-conventions.c index e6f81a5a0..99953b088 100644 --- a/tests/shaders/glsl-arb-fragment-coord-conventions.c +++ b/tests/shaders/glsl-arb-fragment-coord-conventions.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const float black[4] = {0.0, 0.0, 0.0, 0.0}; static const float red[4] = {1.0, 0.0, 0.0, 0.0}; diff --git a/tests/shaders/glsl-bindattriblocation.c b/tests/shaders/glsl-bindattriblocation.c index aa389cee1..b4e4a2e0e 100644 --- a/tests/shaders/glsl-bindattriblocation.c +++ b/tests/shaders/glsl-bindattriblocation.c @@ -42,9 +42,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; -int piglit_width = 100; -int piglit_height = 100; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const GLchar *vertShaderText = "attribute vec4 attrib;\n" diff --git a/tests/shaders/glsl-bug-22603.c b/tests/shaders/glsl-bug-22603.c index 8f184013f..e0c86c61a 100644 --- a/tests/shaders/glsl-bug-22603.c +++ b/tests/shaders/glsl-bug-22603.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 800, piglit_height = 600; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 800 /*window_width*/, + 600 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) /* Misbehaviour: first: the quads are not drawn in the correct order * (darker equals closer to the viewer), second: the middle one is strangely diff --git a/tests/shaders/glsl-cos.c b/tests/shaders/glsl-cos.c index 6e3867f84..f0d9894c2 100644 --- a/tests/shaders/glsl-cos.c +++ b/tests/shaders/glsl-cos.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static char vs_code[] = "uniform float a;\n" diff --git a/tests/shaders/glsl-deriv-varyings.c b/tests/shaders/glsl-deriv-varyings.c index fe37326f9..8b2e8478f 100644 --- a/tests/shaders/glsl-deriv-varyings.c +++ b/tests/shaders/glsl-deriv-varyings.c @@ -33,8 +33,10 @@ static void compileLinkProg(void); static void loadTex(void); -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint tex[1]; static GLint prog1; diff --git a/tests/shaders/glsl-derivs.c b/tests/shaders/glsl-derivs.c index c2c155e50..f2b0d533e 100644 --- a/tests/shaders/glsl-derivs.c +++ b/tests/shaders/glsl-derivs.c @@ -33,8 +33,10 @@ static void compileLinkProg(void); static void loadTex(void); -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint tex[1]; static GLint prog1; diff --git a/tests/shaders/glsl-dlist-getattriblocation.c b/tests/shaders/glsl-dlist-getattriblocation.c index e33101449..c81e55d55 100644 --- a/tests/shaders/glsl-dlist-getattriblocation.c +++ b/tests/shaders/glsl-dlist-getattriblocation.c @@ -33,9 +33,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_RGB; -int piglit_width = 100; -int piglit_height = 100; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) static const GLchar *vertShaderText = "attribute vec4 attrib;\n" diff --git a/tests/shaders/glsl-empty-vs-no-fs.c b/tests/shaders/glsl-empty-vs-no-fs.c index efa9d22bc..361271185 100644 --- a/tests/shaders/glsl-empty-vs-no-fs.c +++ b/tests/shaders/glsl-empty-vs-no-fs.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 250, piglit_height = 250; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 250 /*window_width*/, + 250 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *vs_source = "void main() {}"; diff --git a/tests/shaders/glsl-explicit-location-01.c b/tests/shaders/glsl-explicit-location-01.c index ada2b55ba..0fc31371b 100644 --- a/tests/shaders/glsl-explicit-location-01.c +++ b/tests/shaders/glsl-explicit-location-01.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-explicit-location-02.c b/tests/shaders/glsl-explicit-location-02.c index 9cf2dfc7d..4bfb0b95f 100644 --- a/tests/shaders/glsl-explicit-location-02.c +++ b/tests/shaders/glsl-explicit-location-02.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-explicit-location-03.c b/tests/shaders/glsl-explicit-location-03.c index 9970160b3..67c5afd8d 100644 --- a/tests/shaders/glsl-explicit-location-03.c +++ b/tests/shaders/glsl-explicit-location-03.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-explicit-location-04.c b/tests/shaders/glsl-explicit-location-04.c index fbd31ac3d..fed35d6ed 100644 --- a/tests/shaders/glsl-explicit-location-04.c +++ b/tests/shaders/glsl-explicit-location-04.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-explicit-location-05.c b/tests/shaders/glsl-explicit-location-05.c index fd5808503..02a1c7be8 100644 --- a/tests/shaders/glsl-explicit-location-05.c +++ b/tests/shaders/glsl-explicit-location-05.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-fs-bug25902.c b/tests/shaders/glsl-fs-bug25902.c index 4d1bbf4ad..13b8378ba 100644 --- a/tests/shaders/glsl-fs-bug25902.c +++ b/tests/shaders/glsl-fs-bug25902.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int args_location, tex_location; static GLint prog; diff --git a/tests/shaders/glsl-fs-color-matrix.c b/tests/shaders/glsl-fs-color-matrix.c index 6c70c7580..12e9f69f9 100644 --- a/tests/shaders/glsl-fs-color-matrix.c +++ b/tests/shaders/glsl-fs-color-matrix.c @@ -31,8 +31,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) const char *vs_text = "attribute vec4 vertex;\n" diff --git a/tests/shaders/glsl-fs-discard-02.c b/tests/shaders/glsl-fs-discard-02.c index 54b77aa05..09b4f7085 100644 --- a/tests/shaders/glsl-fs-discard-02.c +++ b/tests/shaders/glsl-fs-discard-02.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH) static char vs_code[] = "varying vec4 color;" diff --git a/tests/shaders/glsl-fs-exp2.c b/tests/shaders/glsl-fs-exp2.c index 55d8bedcc..3aeca0f69 100644 --- a/tests/shaders/glsl-fs-exp2.c +++ b/tests/shaders/glsl-fs-exp2.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int args1_location, args2_location; static GLint prog; diff --git a/tests/shaders/glsl-fs-flat-color.c b/tests/shaders/glsl-fs-flat-color.c index 6f2cf245c..af851b386 100644 --- a/tests/shaders/glsl-fs-flat-color.c +++ b/tests/shaders/glsl-fs-flat-color.c @@ -27,8 +27,10 @@ */ #include "piglit-util.h" -int piglit_width = 30, piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 30 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) GLuint prog; diff --git a/tests/shaders/glsl-fs-fogcolor-statechange.c b/tests/shaders/glsl-fs-fogcolor-statechange.c index c86504368..3004591a5 100644 --- a/tests/shaders/glsl-fs-fogcolor-statechange.c +++ b/tests/shaders/glsl-fs-fogcolor-statechange.c @@ -29,8 +29,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-fs-fragcoord-zw-ortho.c b/tests/shaders/glsl-fs-fragcoord-zw-ortho.c index 7b15fb58a..0a9e40e25 100644 --- a/tests/shaders/glsl-fs-fragcoord-zw-ortho.c +++ b/tests/shaders/glsl-fs-fragcoord-zw-ortho.c @@ -35,9 +35,10 @@ #include "piglit-util.h" -int piglit_width = 256, piglit_height = 256; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH; - +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH) static void draw_quad(float x, float y, float w, float h) diff --git a/tests/shaders/glsl-fs-fragcoord-zw-perspective.c b/tests/shaders/glsl-fs-fragcoord-zw-perspective.c index 352e9e9aa..962a55fc4 100644 --- a/tests/shaders/glsl-fs-fragcoord-zw-perspective.c +++ b/tests/shaders/glsl-fs-fragcoord-zw-perspective.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 256, piglit_height = 256; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH) static GLfloat Znear = 1.0, Zfar = 10.0; diff --git a/tests/shaders/glsl-fs-fragcoord.c b/tests/shaders/glsl-fs-fragcoord.c index e00efc830..8defe190a 100644 --- a/tests/shaders/glsl-fs-fragcoord.c +++ b/tests/shaders/glsl-fs-fragcoord.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 256, piglit_height = 256; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-fs-loop-nested.c b/tests/shaders/glsl-fs-loop-nested.c index d458ce729..21fcbfa36 100644 --- a/tests/shaders/glsl-fs-loop-nested.c +++ b/tests/shaders/glsl-fs-loop-nested.c @@ -39,8 +39,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int color_location; static GLint prog; diff --git a/tests/shaders/glsl-fs-loop.c b/tests/shaders/glsl-fs-loop.c index b7634d73e..98f3fc3f9 100644 --- a/tests/shaders/glsl-fs-loop.c +++ b/tests/shaders/glsl-fs-loop.c @@ -39,8 +39,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int color_location; static GLint prog; diff --git a/tests/shaders/glsl-fs-mix-constant.c b/tests/shaders/glsl-fs-mix-constant.c index e2482e4c8..e690c3a56 100644 --- a/tests/shaders/glsl-fs-mix-constant.c +++ b/tests/shaders/glsl-fs-mix-constant.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) static GLint prog; diff --git a/tests/shaders/glsl-fs-mix.c b/tests/shaders/glsl-fs-mix.c index ed77b38b5..e1b4350ad 100644 --- a/tests/shaders/glsl-fs-mix.c +++ b/tests/shaders/glsl-fs-mix.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) static int args1_location, args2_location, args3_location; static GLint prog; diff --git a/tests/shaders/glsl-fs-pointcoord.c b/tests/shaders/glsl-fs-pointcoord.c index 267c4e7b7..368627293 100644 --- a/tests/shaders/glsl-fs-pointcoord.c +++ b/tests/shaders/glsl-fs-pointcoord.c @@ -44,9 +44,10 @@ #include "piglit-util.h" -int piglit_width = 256; -int piglit_height = 256; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static GLint prog; static GLint point_size; diff --git a/tests/shaders/glsl-fs-raytrace-bug27060.c b/tests/shaders/glsl-fs-raytrace-bug27060.c index cfd87c84c..0f718704e 100644 --- a/tests/shaders/glsl-fs-raytrace-bug27060.c +++ b/tests/shaders/glsl-fs-raytrace-bug27060.c @@ -25,8 +25,10 @@ #include "piglit-util.h" #include "glsl-fs-raytrace-bug27060.h" -int piglit_width = 256, piglit_height = 256; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint program = -1; static float rot[9] = {1,0,0, 0,1,0, 0,0,1}; diff --git a/tests/shaders/glsl-fs-sampler-numbering.c b/tests/shaders/glsl-fs-sampler-numbering.c index 1fe89cd36..0db99ff41 100644 --- a/tests/shaders/glsl-fs-sampler-numbering.c +++ b/tests/shaders/glsl-fs-sampler-numbering.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int sampler_location; static GLint prog; diff --git a/tests/shaders/glsl-fs-shader-stencil-export.c b/tests/shaders/glsl-fs-shader-stencil-export.c index 10590ce84..edc88ec75 100644 --- a/tests/shaders/glsl-fs-shader-stencil-export.c +++ b/tests/shaders/glsl-fs-shader-stencil-export.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 256, piglit_height = 256; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL) static GLint prog; diff --git a/tests/shaders/glsl-fs-sqrt-branch.c b/tests/shaders/glsl-fs-sqrt-branch.c index c289be409..c900e5eed 100644 --- a/tests/shaders/glsl-fs-sqrt-branch.c +++ b/tests/shaders/glsl-fs-sqrt-branch.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int args1_location, args2_location; static GLint prog; diff --git a/tests/shaders/glsl-fs-sqrt-zero.c b/tests/shaders/glsl-fs-sqrt-zero.c index aa74e7a33..61b6903bc 100644 --- a/tests/shaders/glsl-fs-sqrt-zero.c +++ b/tests/shaders/glsl-fs-sqrt-zero.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-fs-texture2drect.c b/tests/shaders/glsl-fs-texture2drect.c index 7dadbf3af..3f38f1a40 100644 --- a/tests/shaders/glsl-fs-texture2drect.c +++ b/tests/shaders/glsl-fs-texture2drect.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 50, piglit_height = 50; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 50 /*window_width*/, + 50 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static GLint prog; float red[4] = {1.0, 0.0, 0.0, 1.0}; diff --git a/tests/shaders/glsl-fs-texturecube-2.c b/tests/shaders/glsl-fs-texturecube-2.c index b86c35a03..9030227bc 100644 --- a/tests/shaders/glsl-fs-texturecube-2.c +++ b/tests/shaders/glsl-fs-texturecube-2.c @@ -34,8 +34,11 @@ #include "piglit-util.h" #define SIZE 32 -int piglit_width = SIZE * 6, piglit_height = SIZE; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; + +PIGLIT_GL_TEST_MAIN( + SIZE * 6 /*window_width*/, + SIZE /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-fs-texturecube.c b/tests/shaders/glsl-fs-texturecube.c index 6bc452a17..c03f12e04 100644 --- a/tests/shaders/glsl-fs-texturecube.c +++ b/tests/shaders/glsl-fs-texturecube.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 120, piglit_height = 20; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 120 /*window_width*/, + 20 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-fs-textureenvcolor-statechange.c b/tests/shaders/glsl-fs-textureenvcolor-statechange.c index 82281b092..4e60d742f 100644 --- a/tests/shaders/glsl-fs-textureenvcolor-statechange.c +++ b/tests/shaders/glsl-fs-textureenvcolor-statechange.c @@ -29,8 +29,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-fs-user-varying-ff.c b/tests/shaders/glsl-fs-user-varying-ff.c index 3853066f3..24c60958f 100644 --- a/tests/shaders/glsl-fs-user-varying-ff.c +++ b/tests/shaders/glsl-fs-user-varying-ff.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 30, piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 30 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char fs_text[] = "varying vec4 color;\n" diff --git a/tests/shaders/glsl-fwidth.c b/tests/shaders/glsl-fwidth.c index 659d2140c..0af9f07c2 100644 --- a/tests/shaders/glsl-fwidth.c +++ b/tests/shaders/glsl-fwidth.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static void loadTex(void); static void compileLinkProg(void); diff --git a/tests/shaders/glsl-getactiveuniform-array-size.c b/tests/shaders/glsl-getactiveuniform-array-size.c index de8c39268..29bc2e6fd 100644 --- a/tests/shaders/glsl-getactiveuniform-array-size.c +++ b/tests/shaders/glsl-getactiveuniform-array-size.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-getactiveuniform-count.c b/tests/shaders/glsl-getactiveuniform-count.c index ac47253af..31b1cf948 100644 --- a/tests/shaders/glsl-getactiveuniform-count.c +++ b/tests/shaders/glsl-getactiveuniform-count.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-getactiveuniform-length.c b/tests/shaders/glsl-getactiveuniform-length.c index b4a2ffbb9..37868ef5f 100644 --- a/tests/shaders/glsl-getactiveuniform-length.c +++ b/tests/shaders/glsl-getactiveuniform-length.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-getattriblocation.c b/tests/shaders/glsl-getattriblocation.c index c5d554b5f..2ad4da402 100644 --- a/tests/shaders/glsl-getattriblocation.c +++ b/tests/shaders/glsl-getattriblocation.c @@ -43,9 +43,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; -int piglit_width = 100; -int piglit_height = 100; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const GLchar *vertShaderText = "attribute vec4 attrib;\n" diff --git a/tests/shaders/glsl-invalid-asm-01.c b/tests/shaders/glsl-invalid-asm-01.c index a6686bd20..ec7f74815 100644 --- a/tests/shaders/glsl-invalid-asm-01.c +++ b/tests/shaders/glsl-invalid-asm-01.c @@ -39,8 +39,10 @@ static const char vs_text[] = static const char fp_text[] = "this won't compile"; -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-invalid-asm-02.c b/tests/shaders/glsl-invalid-asm-02.c index b36a50ca4..e021ea7d7 100644 --- a/tests/shaders/glsl-invalid-asm-02.c +++ b/tests/shaders/glsl-invalid-asm-02.c @@ -38,8 +38,10 @@ static const char fs_text[] = static const char vp_text[] = "this won't compile"; -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-kwin-blur-1.c b/tests/shaders/glsl-kwin-blur-1.c index 8f4899396..a05b44b61 100644 --- a/tests/shaders/glsl-kwin-blur-1.c +++ b/tests/shaders/glsl-kwin-blur-1.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) /* Note: In KWin, the code for these shaders is generated at runtime, diff --git a/tests/shaders/glsl-kwin-blur-2.c b/tests/shaders/glsl-kwin-blur-2.c index 7c57e626d..6600e8070 100644 --- a/tests/shaders/glsl-kwin-blur-2.c +++ b/tests/shaders/glsl-kwin-blur-2.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) /* Note: In KWin, the code for these shaders is generated at runtime, diff --git a/tests/shaders/glsl-light-model.c b/tests/shaders/glsl-light-model.c index c785a3e71..46e24951d 100644 --- a/tests/shaders/glsl-light-model.c +++ b/tests/shaders/glsl-light-model.c @@ -36,8 +36,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const GLfloat verts[12] = { 10.0, 10.0, diff --git a/tests/shaders/glsl-link-bug30552.c b/tests/shaders/glsl-link-bug30552.c index 0d9ad6266..a32e64c9b 100644 --- a/tests/shaders/glsl-link-bug30552.c +++ b/tests/shaders/glsl-link-bug30552.c @@ -29,8 +29,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-link-bug38015.c b/tests/shaders/glsl-link-bug38015.c index ca31e6dad..7adbc1912 100644 --- a/tests/shaders/glsl-link-bug38015.c +++ b/tests/shaders/glsl-link-bug38015.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char fs_text[] = "#extension GL_ARB_shader_texture_lod : enable\n" diff --git a/tests/shaders/glsl-link-empty-prog-01.c b/tests/shaders/glsl-link-empty-prog-01.c index de8ffce94..11bb65cc5 100644 --- a/tests/shaders/glsl-link-empty-prog-01.c +++ b/tests/shaders/glsl-link-empty-prog-01.c @@ -23,9 +23,10 @@ #include "piglit-util.h" -int piglit_width = 64; -int piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) { diff --git a/tests/shaders/glsl-link-empty-prog-02.c b/tests/shaders/glsl-link-empty-prog-02.c index 8ab049040..266260c64 100644 --- a/tests/shaders/glsl-link-empty-prog-02.c +++ b/tests/shaders/glsl-link-empty-prog-02.c @@ -55,8 +55,11 @@ #include "piglit-util.h" -int piglit_width = 32, piglit_height = 32; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) + static GLuint prog = 0; static GLuint tex = 0; diff --git a/tests/shaders/glsl-link-initializer-03.c b/tests/shaders/glsl-link-initializer-03.c index 4ddd05bdc..c440a114e 100644 --- a/tests/shaders/glsl-link-initializer-03.c +++ b/tests/shaders/glsl-link-initializer-03.c @@ -36,9 +36,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-link-test.c b/tests/shaders/glsl-link-test.c index 18ff3ae80..e944cc7bf 100644 --- a/tests/shaders/glsl-link-test.c +++ b/tests/shaders/glsl-link-test.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-lod-bias.c b/tests/shaders/glsl-lod-bias.c index 96dac05b2..fdca8f8c1 100644 --- a/tests/shaders/glsl-lod-bias.c +++ b/tests/shaders/glsl-lod-bias.c @@ -39,9 +39,10 @@ #define TEST_COLS 5 #define BOX_SIZE (1 << (TEST_COLS + 1)) -int piglit_width = (BOX_SIZE + 2) * TEST_COLS + 1; -int piglit_height = (BOX_SIZE + 1) + 1; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + (BOX_SIZE + 2) * TEST_COLS + 1 /*window_width*/, + (BOX_SIZE + 1) + 1 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint tex[1]; static GLint prog; diff --git a/tests/shaders/glsl-mat-attribute.c b/tests/shaders/glsl-mat-attribute.c index 07d5dbb94..fc4edc3ff 100644 --- a/tests/shaders/glsl-mat-attribute.c +++ b/tests/shaders/glsl-mat-attribute.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH) static GLint prog[4]; diff --git a/tests/shaders/glsl-max-varyings.c b/tests/shaders/glsl-max-varyings.c index 40b232f9a..3bab559d4 100644 --- a/tests/shaders/glsl-max-varyings.c +++ b/tests/shaders/glsl-max-varyings.c @@ -36,8 +36,11 @@ #define MAX_VARYING 32 /* 10x10 rectangles with 2 pixels of pad. Deal with up to 32 varyings. */ -int piglit_width = (2 + MAX_VARYING * 12), piglit_height = (2 + MAX_VARYING * 12); -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; + +PIGLIT_GL_TEST_MAIN( + (2 + MAX_VARYING * 12) /*window_width*/, + (2 + MAX_VARYING * 12) /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) /* Generate a VS that writes to num_varyings vec4s, and put * interesting data in data_varying with 0.0 everywhere else. diff --git a/tests/shaders/glsl-max-vertex-attrib.c b/tests/shaders/glsl-max-vertex-attrib.c index e247a13ce..9e2ac7484 100644 --- a/tests/shaders/glsl-max-vertex-attrib.c +++ b/tests/shaders/glsl-max-vertex-attrib.c @@ -37,8 +37,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_RGB; -int piglit_width = 250, piglit_height = 250; +PIGLIT_GL_TEST_MAIN( + 250 /*window_width*/, + 250 /*window_height*/, + GLUT_RGB) static int test = 0; diff --git a/tests/shaders/glsl-novertexdata.c b/tests/shaders/glsl-novertexdata.c index 16a524786..e8bbab4db 100644 --- a/tests/shaders/glsl-novertexdata.c +++ b/tests/shaders/glsl-novertexdata.c @@ -43,9 +43,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; -int piglit_width = 100; -int piglit_height = 100; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const GLchar *vertShaderText = "attribute vec4 attrib;\n" diff --git a/tests/shaders/glsl-orangebook-ch06-bump.c b/tests/shaders/glsl-orangebook-ch06-bump.c index f47a36e02..a6e754056 100644 --- a/tests/shaders/glsl-orangebook-ch06-bump.c +++ b/tests/shaders/glsl-orangebook-ch06-bump.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int bump_density_location, bump_size_location; static int specular_factor_location, surface_color_location; diff --git a/tests/shaders/glsl-preprocessor-comments.c b/tests/shaders/glsl-preprocessor-comments.c index 37fbb1c5b..307642235 100644 --- a/tests/shaders/glsl-preprocessor-comments.c +++ b/tests/shaders/glsl-preprocessor-comments.c @@ -36,8 +36,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int args1_location; static GLint prog; diff --git a/tests/shaders/glsl-reload-source.c b/tests/shaders/glsl-reload-source.c index 46c3528c0..6251bc849 100644 --- a/tests/shaders/glsl-reload-source.c +++ b/tests/shaders/glsl-reload-source.c @@ -35,8 +35,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) static const char vs_one[] = "varying vec4 color;\n" diff --git a/tests/shaders/glsl-routing.c b/tests/shaders/glsl-routing.c index 52d441053..402ca4b34 100644 --- a/tests/shaders/glsl-routing.c +++ b/tests/shaders/glsl-routing.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 260, piglit_height = 365; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 260 /*window_width*/, + 365 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define COLORS 2 #define TEXCOORDS 6 diff --git a/tests/shaders/glsl-sin.c b/tests/shaders/glsl-sin.c index 76cbed119..d4d438512 100644 --- a/tests/shaders/glsl-sin.c +++ b/tests/shaders/glsl-sin.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static char vs_code[] = "uniform float a;\n" diff --git a/tests/shaders/glsl-uniform-out-of-bounds.c b/tests/shaders/glsl-uniform-out-of-bounds.c index 773dbfc8d..56f1b747c 100644 --- a/tests/shaders/glsl-uniform-out-of-bounds.c +++ b/tests/shaders/glsl-uniform-out-of-bounds.c @@ -37,9 +37,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB; - +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) static void expect_error(GLenum expect, const char * where, ...) { diff --git a/tests/shaders/glsl-uniform-update.c b/tests/shaders/glsl-uniform-update.c index 1a0a853a1..6fbee5ce9 100644 --- a/tests/shaders/glsl-uniform-update.c +++ b/tests/shaders/glsl-uniform-update.c @@ -37,8 +37,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int color_location; static GLint prog; diff --git a/tests/shaders/glsl-unused-varying.c b/tests/shaders/glsl-unused-varying.c index 2a7456006..31986fedf 100644 --- a/tests/shaders/glsl-unused-varying.c +++ b/tests/shaders/glsl-unused-varying.c @@ -36,8 +36,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int do_red_location; static int red_location; diff --git a/tests/shaders/glsl-useprogram-displaylist.c b/tests/shaders/glsl-useprogram-displaylist.c index 56fb0e9d6..79e222d7e 100644 --- a/tests/shaders/glsl-useprogram-displaylist.c +++ b/tests/shaders/glsl-useprogram-displaylist.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint progr; static GLint progg; diff --git a/tests/shaders/glsl-vs-arrays.c b/tests/shaders/glsl-vs-arrays.c index 972e3a235..b9aaf54e7 100644 --- a/tests/shaders/glsl-vs-arrays.c +++ b/tests/shaders/glsl-vs-arrays.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; static int index1_location, index2_location; diff --git a/tests/shaders/glsl-vs-functions.c b/tests/shaders/glsl-vs-functions.c index 994101098..29fa255f7 100644 --- a/tests/shaders/glsl-vs-functions.c +++ b/tests/shaders/glsl-vs-functions.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) static GLint prog; static int args1_location; diff --git a/tests/shaders/glsl-vs-if-bool.c b/tests/shaders/glsl-vs-if-bool.c index 289b04f8a..19c759203 100644 --- a/tests/shaders/glsl-vs-if-bool.c +++ b/tests/shaders/glsl-vs-if-bool.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; static int red_location; diff --git a/tests/shaders/glsl-vs-loop-nested.c b/tests/shaders/glsl-vs-loop-nested.c index 1c557c2ba..d5d5f239e 100644 --- a/tests/shaders/glsl-vs-loop-nested.c +++ b/tests/shaders/glsl-vs-loop-nested.c @@ -39,8 +39,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-vs-loop.c b/tests/shaders/glsl-vs-loop.c index 86ad11bc0..a403bd0a9 100644 --- a/tests/shaders/glsl-vs-loop.c +++ b/tests/shaders/glsl-vs-loop.c @@ -39,8 +39,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static int color_location; static GLint prog; diff --git a/tests/shaders/glsl-vs-mov-after-deref.c b/tests/shaders/glsl-vs-mov-after-deref.c index 968ce318d..5880752cc 100644 --- a/tests/shaders/glsl-vs-mov-after-deref.c +++ b/tests/shaders/glsl-vs-mov-after-deref.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; static int index_location; diff --git a/tests/shaders/glsl-vs-mvp-statechange.c b/tests/shaders/glsl-vs-mvp-statechange.c index 54bc02eaf..03c943baf 100644 --- a/tests/shaders/glsl-vs-mvp-statechange.c +++ b/tests/shaders/glsl-vs-mvp-statechange.c @@ -29,8 +29,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/shaders/glsl-vs-normalscale.c b/tests/shaders/glsl-vs-normalscale.c index d8e1b444b..92460554c 100644 --- a/tests/shaders/glsl-vs-normalscale.c +++ b/tests/shaders/glsl-vs-normalscale.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-vs-point-size.c b/tests/shaders/glsl-vs-point-size.c index c8d9f066b..bb4c705d5 100644 --- a/tests/shaders/glsl-vs-point-size.c +++ b/tests/shaders/glsl-vs-point-size.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 32, piglit_height = 32; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-vs-raytrace-bug26691.c b/tests/shaders/glsl-vs-raytrace-bug26691.c index 2e919a350..54eb350fd 100644 --- a/tests/shaders/glsl-vs-raytrace-bug26691.c +++ b/tests/shaders/glsl-vs-raytrace-bug26691.c @@ -25,8 +25,11 @@ #include "piglit-util.h" #include "glsl-vs-raytrace-bug26691.h" -int piglit_width = 256, piglit_height = 256; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) + static const float failing_pixel_percentage = 0.15F; static GLuint program; diff --git a/tests/shaders/glsl-vs-sqrt-zero.c b/tests/shaders/glsl-vs-sqrt-zero.c index 85f2efc4f..9023aeabe 100644 --- a/tests/shaders/glsl-vs-sqrt-zero.c +++ b/tests/shaders/glsl-vs-sqrt-zero.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-vs-statechange-1.c b/tests/shaders/glsl-vs-statechange-1.c index 599b8524c..76d1a5d34 100644 --- a/tests/shaders/glsl-vs-statechange-1.c +++ b/tests/shaders/glsl-vs-statechange-1.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 50, piglit_height = 50; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 50 /*window_width*/, + 50 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) const char *vs_source = "void main()\n" diff --git a/tests/shaders/glsl-vs-texturematrix-1.c b/tests/shaders/glsl-vs-texturematrix-1.c index eb30590b4..29f002f6e 100644 --- a/tests/shaders/glsl-vs-texturematrix-1.c +++ b/tests/shaders/glsl-vs-texturematrix-1.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-vs-texturematrix-2.c b/tests/shaders/glsl-vs-texturematrix-2.c index 56b734bd1..ea85c7dbb 100644 --- a/tests/shaders/glsl-vs-texturematrix-2.c +++ b/tests/shaders/glsl-vs-texturematrix-2.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/glsl-vs-user-varying-ff.c b/tests/shaders/glsl-vs-user-varying-ff.c index 1448d160b..4f5869336 100644 --- a/tests/shaders/glsl-vs-user-varying-ff.c +++ b/tests/shaders/glsl-vs-user-varying-ff.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 30, piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 30 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vs_text[] = "varying vec4 color;\n" diff --git a/tests/shaders/gpu_shader4_attribs.c b/tests/shaders/gpu_shader4_attribs.c index 414ac1d76..ce9475c6a 100644 --- a/tests/shaders/gpu_shader4_attribs.c +++ b/tests/shaders/gpu_shader4_attribs.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "texture-integer"; static const GLuint Index = 3; diff --git a/tests/shaders/link-mismatch-layout-01.c b/tests/shaders/link-mismatch-layout-01.c index e1d0f8fd9..9688dc8d8 100644 --- a/tests/shaders/link-mismatch-layout-01.c +++ b/tests/shaders/link-mismatch-layout-01.c @@ -33,8 +33,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char layout_center[] = "#extension GL_ARB_fragment_coord_conventions: enable\n" diff --git a/tests/shaders/link-mismatch-layout-02.c b/tests/shaders/link-mismatch-layout-02.c index ced3a1686..528a7d662 100644 --- a/tests/shaders/link-mismatch-layout-02.c +++ b/tests/shaders/link-mismatch-layout-02.c @@ -33,8 +33,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char layout_greater[] = "#extension GL_AMD_conservative_depth: require\n" diff --git a/tests/shaders/link-mismatch-layout-03.c b/tests/shaders/link-mismatch-layout-03.c index ea47ed680..b71f1722b 100644 --- a/tests/shaders/link-mismatch-layout-03.c +++ b/tests/shaders/link-mismatch-layout-03.c @@ -33,8 +33,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char layout_center[] = "#extension GL_ARB_fragment_coord_conventions: enable\n" diff --git a/tests/shaders/link-unresolved-function.c b/tests/shaders/link-unresolved-function.c index 62ffb5d65..32e1544a9 100644 --- a/tests/shaders/link-unresolved-function.c +++ b/tests/shaders/link-unresolved-function.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char bad_vs_text[] = "vec4 my_ftransform(void);\n" diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 2d5c52d44..d28da8507 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -39,8 +39,10 @@ #include "piglit-util.h" #include "piglit-vbo.h" -int piglit_width = 250, piglit_height = 250; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 250 /*window_width*/, + 250 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) extern float piglit_tolerance[4]; diff --git a/tests/shaders/sso-simple.c b/tests/shaders/sso-simple.c index aa6397c21..783d4b7df 100644 --- a/tests/shaders/sso-simple.c +++ b/tests/shaders/sso-simple.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 70, piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 70 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vs_text[] = "void main() { gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; " diff --git a/tests/shaders/sso-uniforms-01.c b/tests/shaders/sso-uniforms-01.c index 23c86da42..745122832 100644 --- a/tests/shaders/sso-uniforms-01.c +++ b/tests/shaders/sso-uniforms-01.c @@ -34,8 +34,10 @@ */ #include "piglit-util.h" -int piglit_width = 30, piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 30 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vs_text[] = "uniform vec4 color;\n" diff --git a/tests/shaders/sso-uniforms-02.c b/tests/shaders/sso-uniforms-02.c index 9157eca75..791b5df2d 100644 --- a/tests/shaders/sso-uniforms-02.c +++ b/tests/shaders/sso-uniforms-02.c @@ -33,8 +33,10 @@ */ #include "piglit-util.h" -int piglit_width = 30, piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 30 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vs_text[] = "uniform vec4 color;\n" diff --git a/tests/shaders/sso-user-varying-01.c b/tests/shaders/sso-user-varying-01.c index c8203e32f..62238e392 100644 --- a/tests/shaders/sso-user-varying-01.c +++ b/tests/shaders/sso-user-varying-01.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 30, piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 30 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vs_text[] = "varying vec4 color;\n" diff --git a/tests/shaders/sso-user-varying-02.c b/tests/shaders/sso-user-varying-02.c index d1a9a9d52..4eceb021c 100644 --- a/tests/shaders/sso-user-varying-02.c +++ b/tests/shaders/sso-user-varying-02.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 30, piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 30 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vs_text[] = "varying vec4 color;\n" diff --git a/tests/shaders/trinity-fp1.c b/tests/shaders/trinity-fp1.c index 4180d0c3c..277450fd0 100644 --- a/tests/shaders/trinity-fp1.c +++ b/tests/shaders/trinity-fp1.c @@ -28,8 +28,10 @@ #include "piglit-util.h" -int piglit_width = 200, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH) static GLuint TexDiffuse = 1; static GLuint TexNormal = 2; diff --git a/tests/shaders/useprogram-flushverts-1.c b/tests/shaders/useprogram-flushverts-1.c index b7bd0bfd1..5231c1bbf 100644 --- a/tests/shaders/useprogram-flushverts-1.c +++ b/tests/shaders/useprogram-flushverts-1.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static GLint prog1, prog2; diff --git a/tests/shaders/useprogram-flushverts-2.c b/tests/shaders/useprogram-flushverts-2.c index 984b2eb87..26fcc4340 100644 --- a/tests/shaders/useprogram-flushverts-2.c +++ b/tests/shaders/useprogram-flushverts-2.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static GLint prog1, prog2; diff --git a/tests/shaders/useprogram-inside-begin.c b/tests/shaders/useprogram-inside-begin.c index ac936fab8..26a705be0 100644 --- a/tests/shaders/useprogram-inside-begin.c +++ b/tests/shaders/useprogram-inside-begin.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vs_text[] = "void main() { gl_Position = gl_Vertex; }"; diff --git a/tests/shaders/useprogram-refcount-1.c b/tests/shaders/useprogram-refcount-1.c index daf96ee3e..1aa4d0407 100644 --- a/tests/shaders/useprogram-refcount-1.c +++ b/tests/shaders/useprogram-refcount-1.c @@ -36,8 +36,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static GLint prog; diff --git a/tests/shaders/useshaderprogram-bad-program.c b/tests/shaders/useshaderprogram-bad-program.c index 512c85129..cd26e799a 100644 --- a/tests/shaders/useshaderprogram-bad-program.c +++ b/tests/shaders/useshaderprogram-bad-program.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char bad_vs_text[] = "vec4 my_ftransform(void);\n" diff --git a/tests/shaders/useshaderprogram-bad-type.c b/tests/shaders/useshaderprogram-bad-type.c index 0e0a78859..5486aef5f 100644 --- a/tests/shaders/useshaderprogram-bad-type.c +++ b/tests/shaders/useshaderprogram-bad-type.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/useshaderprogram-flushverts-1.c b/tests/shaders/useshaderprogram-flushverts-1.c index 58e418ea3..c8983d018 100644 --- a/tests/shaders/useshaderprogram-flushverts-1.c +++ b/tests/shaders/useshaderprogram-flushverts-1.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static GLint vs_prog, fs_prog_1, fs_prog_2; diff --git a/tests/shaders/vp-address-01.c b/tests/shaders/vp-address-01.c index c78be80b3..9e37496b4 100644 --- a/tests/shaders/vp-address-01.c +++ b/tests/shaders/vp-address-01.c @@ -43,11 +43,10 @@ static const GLfloat attrib[] = { #define TEST_COLS ARRAY_SIZE(attrib) #define BOX_SIZE 32 - -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char vertex_source_template[] = "!!ARBvp1.0\n" diff --git a/tests/shaders/vp-address-02.c b/tests/shaders/vp-address-02.c index eb752573d..cdd7dfd47 100644 --- a/tests/shaders/vp-address-02.c +++ b/tests/shaders/vp-address-02.c @@ -53,11 +53,10 @@ static const GLfloat attrib[] = { #define TEST_COLS (ARRAY_SIZE(attrib) / 2) #define BOX_SIZE 32 - -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char vertex_source_template[] = "!!ARBvp1.0\n" diff --git a/tests/shaders/vp-address-03.c b/tests/shaders/vp-address-03.c index cfa32e7a3..2a09b5534 100644 --- a/tests/shaders/vp-address-03.c +++ b/tests/shaders/vp-address-03.c @@ -35,11 +35,10 @@ #define TEST_COLS 4 #define BOX_SIZE 32 - -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char vertex_source_template[] = "!!ARBvp1.0\n" diff --git a/tests/shaders/vp-address-04.c b/tests/shaders/vp-address-04.c index adfc10976..26c39be93 100644 --- a/tests/shaders/vp-address-04.c +++ b/tests/shaders/vp-address-04.c @@ -72,11 +72,10 @@ static const GLfloat attrib[] = { #define TEST_COLS (ARRAY_SIZE(attrib) / 2) #define BOX_SIZE 16 - -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char vertex_source_template[] = "!!ARBvp1.0\n" diff --git a/tests/shaders/vp-address-05.c b/tests/shaders/vp-address-05.c index 8573637c4..4b9cc3f38 100644 --- a/tests/shaders/vp-address-05.c +++ b/tests/shaders/vp-address-05.c @@ -35,11 +35,10 @@ #define TEST_COLS 4 #define BOX_SIZE 32 - -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char vertex_source_template[] = "!!ARBvp1.0\n" diff --git a/tests/shaders/vp-address-06.c b/tests/shaders/vp-address-06.c index 17d981e50..1ccfec209 100644 --- a/tests/shaders/vp-address-06.c +++ b/tests/shaders/vp-address-06.c @@ -35,11 +35,10 @@ #define TEST_COLS 2 #define BOX_SIZE 32 - -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char vertex_source_template[] = "!!ARBvp1.0\n" diff --git a/tests/shaders/vp-bad-program.c b/tests/shaders/vp-bad-program.c index 1a7685963..757ea131c 100644 --- a/tests/shaders/vp-bad-program.c +++ b/tests/shaders/vp-bad-program.c @@ -36,8 +36,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/vp-clipdistance-01.c b/tests/shaders/vp-clipdistance-01.c index daff12f39..07e66641c 100644 --- a/tests/shaders/vp-clipdistance-01.c +++ b/tests/shaders/vp-clipdistance-01.c @@ -35,11 +35,10 @@ #define TEST_COLS 6 #define BOX_SIZE 32 - -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char vertex_source_template[] = "!!ARBvp1.0\n" diff --git a/tests/shaders/vp-clipdistance-02.c b/tests/shaders/vp-clipdistance-02.c index c7f29efc6..7db65a9d6 100644 --- a/tests/shaders/vp-clipdistance-02.c +++ b/tests/shaders/vp-clipdistance-02.c @@ -39,11 +39,10 @@ #define TEST_COLS 6 #define BOX_SIZE 32 - -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char vertex_source_template[] = "!!ARBvp1.0\n" diff --git a/tests/shaders/vp-clipdistance-03.c b/tests/shaders/vp-clipdistance-03.c index c30dc02cb..16dff27cf 100644 --- a/tests/shaders/vp-clipdistance-03.c +++ b/tests/shaders/vp-clipdistance-03.c @@ -35,11 +35,10 @@ #define TEST_COLS 1 #define BOX_SIZE 32 - -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char vertex_source_template[] = "!!ARBvp1.0\n" diff --git a/tests/shaders/vp-clipdistance-04.c b/tests/shaders/vp-clipdistance-04.c index 3b43c3b49..4946e144f 100644 --- a/tests/shaders/vp-clipdistance-04.c +++ b/tests/shaders/vp-clipdistance-04.c @@ -39,11 +39,10 @@ #define TEST_COLS 6 #define BOX_SIZE 32 - -int piglit_window_mode = GLUT_DOUBLE; -int piglit_width = (((BOX_SIZE+1)*TEST_COLS)+1); -int piglit_height = (((BOX_SIZE+1)*TEST_ROWS)+1); - +PIGLIT_GL_TEST_MAIN( + (((BOX_SIZE+1)*TEST_COLS)+1) /*window_width*/, + (((BOX_SIZE+1)*TEST_ROWS)+1) /*window_height*/, + GLUT_DOUBLE) static const char vertex_source_template[] = "!!ARBvp1.0\n" diff --git a/tests/shaders/vp-combined-image-units.c b/tests/shaders/vp-combined-image-units.c index fdbf0751d..20beb9934 100644 --- a/tests/shaders/vp-combined-image-units.c +++ b/tests/shaders/vp-combined-image-units.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/shaders/vp-ignore-input.c b/tests/shaders/vp-ignore-input.c index 2e0caa021..4f0b8cd82 100644 --- a/tests/shaders/vp-ignore-input.c +++ b/tests/shaders/vp-ignore-input.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLint prog; static GLint fs; diff --git a/tests/shaders/vp-max-array.c b/tests/shaders/vp-max-array.c index 82bd8af77..dfbbd1080 100644 --- a/tests/shaders/vp-max-array.c +++ b/tests/shaders/vp-max-array.c @@ -31,10 +31,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_RGB; -int piglit_width = 100; -int piglit_height = 100; - +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) static const char template_header[] = "!!ARBvp1.0\n" diff --git a/tests/shaders/vpfp-generic.cpp b/tests/shaders/vpfp-generic.cpp index 58404d44a..b24559d5e 100644 --- a/tests/shaders/vpfp-generic.cpp +++ b/tests/shaders/vpfp-generic.cpp @@ -167,8 +167,10 @@ private: }; -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN(100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA) + static const char* Filename = 0; static TestGroup tests; diff --git a/tests/spec/amd_seamless_cubemap_per_texture/amd_seamless_cubemap_per_texture.c b/tests/spec/amd_seamless_cubemap_per_texture/amd_seamless_cubemap_per_texture.c index c500ea4e7..b2ddce5db 100644 --- a/tests/spec/amd_seamless_cubemap_per_texture/amd_seamless_cubemap_per_texture.c +++ b/tests/spec/amd_seamless_cubemap_per_texture/amd_seamless_cubemap_per_texture.c @@ -21,8 +21,10 @@ #include "piglit-util.h" -int piglit_width = 250, piglit_height = 70; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 250 /*window_width*/, + 70 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const float colors[6][3] = { {1, 0, 0}, diff --git a/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c b/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c index a7b0ad368..79f39538b 100644 --- a/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c +++ b/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_blend_func_extended/api/blend-api.c b/tests/spec/arb_blend_func_extended/api/blend-api.c index fdffe673b..37d17f8c6 100644 --- a/tests/spec/arb_blend_func_extended/api/blend-api.c +++ b/tests/spec/arb_blend_func_extended/api/blend-api.c @@ -28,8 +28,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_blend_func_extended/api/error-at-begin.c b/tests/spec/arb_blend_func_extended/api/error-at-begin.c index 890ceef0e..c3748f8dc 100644 --- a/tests/spec/arb_blend_func_extended/api/error-at-begin.c +++ b/tests/spec/arb_blend_func_extended/api/error-at-begin.c @@ -34,8 +34,10 @@ */ #include "piglit-util.h" -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; -int piglit_width = 100, piglit_height = 100; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_blend_func_extended/api/getfragdataindex.c b/tests/spec/arb_blend_func_extended/api/getfragdataindex.c index be4e41199..edd4ad7f6 100644 --- a/tests/spec/arb_blend_func_extended/api/getfragdataindex.c +++ b/tests/spec/arb_blend_func_extended/api/getfragdataindex.c @@ -28,8 +28,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *vs_text = "#version 130\n" diff --git a/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-explicit.c b/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-explicit.c index af7f4b70a..1f8027295 100644 --- a/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-explicit.c +++ b/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-explicit.c @@ -38,9 +38,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) static const char *TestName = "fbo-extended-blend-explicit"; diff --git a/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend.c b/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend.c index 7d46d7f28..041c13b47 100644 --- a/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend.c +++ b/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend.c @@ -38,9 +38,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) static const char *TestName = "fbo-extended-blend"; diff --git a/tests/spec/arb_color_buffer_float/common.h b/tests/spec/arb_color_buffer_float/common.h index 2e2939f8c..e0998e7c4 100644 --- a/tests/spec/arb_color_buffer_float/common.h +++ b/tests/spec/arb_color_buffer_float/common.h @@ -32,9 +32,9 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN(128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) /* use small values for pixels[0..3], so that the 0.01 tolerance is met for fp16 */ static float pixels[] = { diff --git a/tests/spec/arb_copy_buffer/copy_buffer_coherency.c b/tests/spec/arb_copy_buffer/copy_buffer_coherency.c index 04c4a1184..6115dac6c 100644 --- a/tests/spec/arb_copy_buffer/copy_buffer_coherency.c +++ b/tests/spec/arb_copy_buffer/copy_buffer_coherency.c @@ -31,8 +31,10 @@ uint8_t src_data[COPY_BUFFER_SIZE]; uint8_t dest_data[COPY_BUFFER_SIZE]; -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_copy_buffer/copybuffersubdata.c b/tests/spec/arb_copy_buffer/copybuffersubdata.c index 4b0adfc4b..7d41222b5 100644 --- a/tests/spec/arb_copy_buffer/copybuffersubdata.c +++ b/tests/spec/arb_copy_buffer/copybuffersubdata.c @@ -30,9 +30,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static bool test_copy(void) diff --git a/tests/spec/arb_copy_buffer/dlist.c b/tests/spec/arb_copy_buffer/dlist.c index 8caf340c8..34bf3dd09 100644 --- a/tests/spec/arb_copy_buffer/dlist.c +++ b/tests/spec/arb_copy_buffer/dlist.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_copy_buffer/get.c b/tests/spec/arb_copy_buffer/get.c index eefce1152..8ec966aa9 100644 --- a/tests/spec/arb_copy_buffer/get.c +++ b/tests/spec/arb_copy_buffer/get.c @@ -28,8 +28,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_copy_buffer/negative-bound-zero.c b/tests/spec/arb_copy_buffer/negative-bound-zero.c index 732eec397..91fb75343 100644 --- a/tests/spec/arb_copy_buffer/negative-bound-zero.c +++ b/tests/spec/arb_copy_buffer/negative-bound-zero.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_copy_buffer/negative-bounds.c b/tests/spec/arb_copy_buffer/negative-bounds.c index aa0a6abe0..605702f8f 100644 --- a/tests/spec/arb_copy_buffer/negative-bounds.c +++ b/tests/spec/arb_copy_buffer/negative-bounds.c @@ -37,8 +37,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_copy_buffer/negative-mapped.c b/tests/spec/arb_copy_buffer/negative-mapped.c index 0029cdcf1..1cc296a1e 100644 --- a/tests/spec/arb_copy_buffer/negative-mapped.c +++ b/tests/spec/arb_copy_buffer/negative-mapped.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_copy_buffer/overlap.c b/tests/spec/arb_copy_buffer/overlap.c index 7b6cf7b6e..62b62f8e3 100644 --- a/tests/spec/arb_copy_buffer/overlap.c +++ b/tests/spec/arb_copy_buffer/overlap.c @@ -36,8 +36,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static void test_copy(GLenum usage, int data_size, int src, int dst, int size) diff --git a/tests/spec/arb_copy_buffer/targets.c b/tests/spec/arb_copy_buffer/targets.c index 5d3c7f4de..7378ea642 100644 --- a/tests/spec/arb_copy_buffer/targets.c +++ b/tests/spec/arb_copy_buffer/targets.c @@ -47,8 +47,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_debug_output/api_error.c b/tests/spec/arb_debug_output/api_error.c index 0a5b2cffb..d2517502e 100644 --- a/tests/spec/arb_debug_output/api_error.c +++ b/tests/spec/arb_debug_output/api_error.c @@ -24,9 +24,10 @@ #include "piglit-util.h" - -int piglit_width = 100, piglit_height = 50; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 50 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) #define USER_PARAM ((void*)(intptr_t)12345678) diff --git a/tests/spec/arb_draw_buffers/state_change.c b/tests/spec/arb_draw_buffers/state_change.c index 2366aeaaf..c4960b1cc 100644 --- a/tests/spec/arb_draw_buffers/state_change.c +++ b/tests/spec/arb_draw_buffers/state_change.c @@ -31,9 +31,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static void check_fbo_status(void) diff --git a/tests/spec/arb_draw_elements_base_vertex/dlist-arb_draw_instanced.c b/tests/spec/arb_draw_elements_base_vertex/dlist-arb_draw_instanced.c index 3f41e3642..88158ef0e 100644 --- a/tests/spec/arb_draw_elements_base_vertex/dlist-arb_draw_instanced.c +++ b/tests/spec/arb_draw_elements_base_vertex/dlist-arb_draw_instanced.c @@ -53,9 +53,10 @@ * during display list compilation." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_draw_elements_base_vertex/draw-elements-instanced-base-vertex.c b/tests/spec/arb_draw_elements_base_vertex/draw-elements-instanced-base-vertex.c index 4f18f34a0..41c3f5c74 100644 --- a/tests/spec/arb_draw_elements_base_vertex/draw-elements-instanced-base-vertex.c +++ b/tests/spec/arb_draw_elements_base_vertex/draw-elements-instanced-base-vertex.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 300, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 300 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define NUM_QUADS 10 diff --git a/tests/spec/arb_draw_instanced/execution/dlist.c b/tests/spec/arb_draw_instanced/execution/dlist.c index f944ca4c2..bdc9940ad 100644 --- a/tests/spec/arb_draw_instanced/execution/dlist.c +++ b/tests/spec/arb_draw_instanced/execution/dlist.c @@ -35,9 +35,10 @@ * during display list compilation." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_draw_instanced/execution/elements.c b/tests/spec/arb_draw_instanced/execution/elements.c index abfe987b9..3a400b2e6 100644 --- a/tests/spec/arb_draw_instanced/execution/elements.c +++ b/tests/spec/arb_draw_instanced/execution/elements.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 70, piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 70 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *vs_source = "#version 120\n" diff --git a/tests/spec/arb_draw_instanced/execution/negative-arrays-first-negative.c b/tests/spec/arb_draw_instanced/execution/negative-arrays-first-negative.c index 59fdc8ef5..96abaf620 100644 --- a/tests/spec/arb_draw_instanced/execution/negative-arrays-first-negative.c +++ b/tests/spec/arb_draw_instanced/execution/negative-arrays-first-negative.c @@ -34,9 +34,10 @@ * <first> is less than zero" */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_draw_instanced/execution/negative-elements-type.c b/tests/spec/arb_draw_instanced/execution/negative-elements-type.c index 6b873bc16..42707c0b3 100644 --- a/tests/spec/arb_draw_instanced/execution/negative-elements-type.c +++ b/tests/spec/arb_draw_instanced/execution/negative-elements-type.c @@ -35,9 +35,10 @@ * UNSIGNED_INT." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-depthrangef.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-depthrangef.c index 1e2268471..9b2c34b38 100644 --- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-depthrangef.c +++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-depthrangef.c @@ -29,8 +29,10 @@ #include "piglit-util.h" -int piglit_width = 150, piglit_height = 150; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH; +PIGLIT_GL_TEST_MAIN( + 150 /*window_width*/, + 150 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH) void piglit_init(int argc, char **argv) diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-drawbuffers.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-drawbuffers.c index 378d0dc72..b61a33b94 100644 --- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-drawbuffers.c +++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-drawbuffers.c @@ -30,9 +30,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint attach_texture(int i) diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-fixed-type.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-fixed-type.c index 512856598..db6832196 100644 --- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-fixed-type.c +++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-fixed-type.c @@ -25,8 +25,10 @@ #include "piglit-util.h" #include <stdarg.h> -int piglit_width = 250, piglit_height = 250; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 250 /*window_width*/, + 250 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) static unsigned verts[4*4*4]; diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-getshaderprecisionformat.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-getshaderprecisionformat.c index c9c4acd8f..cea73631c 100644 --- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-getshaderprecisionformat.c +++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-getshaderprecisionformat.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 10, piglit_height = 10; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_RGB) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-maxvectors.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-maxvectors.c index f826eb3f0..da04067bf 100644 --- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-maxvectors.c +++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-maxvectors.c @@ -28,8 +28,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c index 3d8dcc4dc..6996117d2 100644 --- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c +++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-releaseshadercompiler.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) #ifdef GL_ARB_ES2_compatibility static const char vs_text[] = diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-shadercompiler.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-shadercompiler.c index a43666d33..09eecd5f7 100644 --- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-shadercompiler.c +++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-shadercompiler.c @@ -29,8 +29,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_es2_compatibility/fbo-missing-attachment-blit.c b/tests/spec/arb_es2_compatibility/fbo-missing-attachment-blit.c index 5356505ac..1ed379c90 100644 --- a/tests/spec/arb_es2_compatibility/fbo-missing-attachment-blit.c +++ b/tests/spec/arb_es2_compatibility/fbo-missing-attachment-blit.c @@ -56,9 +56,10 @@ */ #include "piglit-util.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_RGB) enum piglit_result piglit_display(void) 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 43b2ec9bc..70c9d6c71 100644 --- a/tests/spec/arb_es2_compatibility/fbo-missing-attachment-clear.c +++ b/tests/spec/arb_es2_compatibility/fbo-missing-attachment-clear.c @@ -43,9 +43,10 @@ */ #include "piglit-util.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_RGB) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_fragment_program/minmax.c b/tests/spec/arb_fragment_program/minmax.c index d92553f47..b059408ed 100644 --- a/tests/spec/arb_fragment_program/minmax.c +++ b/tests/spec/arb_fragment_program/minmax.c @@ -27,9 +27,10 @@ #include "piglit-util.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_framebuffer_object/get-renderbuffer-internalformat.c b/tests/spec/arb_framebuffer_object/get-renderbuffer-internalformat.c index 6185e6db6..be87270dd 100644 --- a/tests/spec/arb_framebuffer_object/get-renderbuffer-internalformat.c +++ b/tests/spec/arb_framebuffer_object/get-renderbuffer-internalformat.c @@ -32,9 +32,10 @@ #include "piglit-util.h" #include "../../fbo/fbo-formats.h" -int piglit_width = 10; -int piglit_height = 10; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) enum piglit_result piglit_display() diff --git a/tests/spec/arb_framebuffer_object/same-attachment-glFramebufferRenderbuffer-GL_DEPTH_STENCIL_ATTACHMENT.c b/tests/spec/arb_framebuffer_object/same-attachment-glFramebufferRenderbuffer-GL_DEPTH_STENCIL_ATTACHMENT.c index f95a73dc5..681d941e1 100644 --- a/tests/spec/arb_framebuffer_object/same-attachment-glFramebufferRenderbuffer-GL_DEPTH_STENCIL_ATTACHMENT.c +++ b/tests/spec/arb_framebuffer_object/same-attachment-glFramebufferRenderbuffer-GL_DEPTH_STENCIL_ATTACHMENT.c @@ -31,9 +31,10 @@ #include <stdio.h> #include "piglit-util.h" -int piglit_width = 200; -int piglit_height = 200; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 200 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) const char* get_attachment_string(GLint attach) diff --git a/tests/spec/arb_framebuffer_object/same-attachment-glFramebufferTexture2D-GL_DEPTH_STENCIL_ATTACHMENT.c b/tests/spec/arb_framebuffer_object/same-attachment-glFramebufferTexture2D-GL_DEPTH_STENCIL_ATTACHMENT.c index d2d2af8c1..20fe7d4cb 100644 --- a/tests/spec/arb_framebuffer_object/same-attachment-glFramebufferTexture2D-GL_DEPTH_STENCIL_ATTACHMENT.c +++ b/tests/spec/arb_framebuffer_object/same-attachment-glFramebufferTexture2D-GL_DEPTH_STENCIL_ATTACHMENT.c @@ -32,9 +32,10 @@ #include <stdio.h> #include "piglit-util.h" -int piglit_width = 200; -int piglit_height = 200; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 200 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) const char* get_attachment_string(GLint attach) diff --git a/tests/spec/arb_instanced_arrays/instanced_arrays.c b/tests/spec/arb_instanced_arrays/instanced_arrays.c index 1cfd2e339..ab6ff7143 100644 --- a/tests/spec/arb_instanced_arrays/instanced_arrays.c +++ b/tests/spec/arb_instanced_arrays/instanced_arrays.c @@ -29,9 +29,10 @@ #include "piglit-util.h" - -int piglit_width = 500, piglit_height = 500; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 500 /*window_width*/, + 500 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "draw-instanced-arrays"; diff --git a/tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c b/tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c index 6004bd9bc..aebed744d 100644 --- a/tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c +++ b/tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c @@ -28,8 +28,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_map_buffer_range/map_buffer_range_test.c b/tests/spec/arb_map_buffer_range/map_buffer_range_test.c index d5a1da51c..643cda3ca 100644 --- a/tests/spec/arb_map_buffer_range/map_buffer_range_test.c +++ b/tests/spec/arb_map_buffer_range/map_buffer_range_test.c @@ -27,8 +27,11 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) + uint8_t data[1 << 20]; enum piglit_result diff --git a/tests/spec/arb_multisample/beginend.c b/tests/spec/arb_multisample/beginend.c index 221896a74..abe40a459 100644 --- a/tests/spec/arb_multisample/beginend.c +++ b/tests/spec/arb_multisample/beginend.c @@ -33,9 +33,10 @@ * corresponding End." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_multisample/pushpop.c b/tests/spec/arb_multisample/pushpop.c index 4af7f7252..ba1b8c34a 100644 --- a/tests/spec/arb_multisample/pushpop.c +++ b/tests/spec/arb_multisample/pushpop.c @@ -51,9 +51,10 @@ * */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_robustness/client-mem-bounds.c b/tests/spec/arb_robustness/client-mem-bounds.c index 1e62bae9c..d15808619 100644 --- a/tests/spec/arb_robustness/client-mem-bounds.c +++ b/tests/spec/arb_robustness/client-mem-bounds.c @@ -23,8 +23,10 @@ #include "piglit-util.h" -int piglit_width = 320, piglit_height = 320; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 320 /*window_width*/, + 320 /*window_height*/, + GLUT_RGB) #define width (10) #define height (12) diff --git a/tests/spec/arb_robustness/draw-vbo-bounds.c b/tests/spec/arb_robustness/draw-vbo-bounds.c index d5753c6fe..90f6b0372 100644 --- a/tests/spec/arb_robustness/draw-vbo-bounds.c +++ b/tests/spec/arb_robustness/draw-vbo-bounds.c @@ -47,8 +47,10 @@ #include "piglit-util.h" -int piglit_width = 320, piglit_height = 320; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 320 /*window_width*/, + 320 /*window_height*/, + GLUT_RGB) void piglit_init(int argc, char **argv) { diff --git a/tests/spec/arb_sampler_objects/sampler-incomplete.c b/tests/spec/arb_sampler_objects/sampler-incomplete.c index 4a6638622..32dd737f9 100644 --- a/tests/spec/arb_sampler_objects/sampler-incomplete.c +++ b/tests/spec/arb_sampler_objects/sampler-incomplete.c @@ -36,10 +36,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; - +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static void setup(void) diff --git a/tests/spec/arb_sampler_objects/sampler-objects.c b/tests/spec/arb_sampler_objects/sampler-objects.c index 44647c916..053c2bc55 100644 --- a/tests/spec/arb_sampler_objects/sampler-objects.c +++ b/tests/spec/arb_sampler_objects/sampler-objects.c @@ -33,9 +33,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const char *Prog = "sampler-objects"; diff --git a/tests/spec/arb_seamless_cube_map/arb_seamless_cubemap.c b/tests/spec/arb_seamless_cube_map/arb_seamless_cubemap.c index 562cdb9a3..7ef228fb0 100644 --- a/tests/spec/arb_seamless_cube_map/arb_seamless_cubemap.c +++ b/tests/spec/arb_seamless_cube_map/arb_seamless_cubemap.c @@ -21,8 +21,10 @@ #include "piglit-util.h" -int piglit_width = 200, piglit_height = 40; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 40 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const float colors[6][3] = { {1, 0, 0}, diff --git a/tests/spec/arb_shader_objects/bindattriblocation-scratch-name.c b/tests/spec/arb_shader_objects/bindattriblocation-scratch-name.c index e13407228..bf7c5f701 100644 --- a/tests/spec/arb_shader_objects/bindattriblocation-scratch-name.c +++ b/tests/spec/arb_shader_objects/bindattriblocation-scratch-name.c @@ -34,9 +34,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; -int piglit_width = 10; -int piglit_height = 10; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const GLchar *vertShaderText = "attribute vec4 attrib;\n" diff --git a/tests/spec/arb_shader_objects/clear-with-deleted.c b/tests/spec/arb_shader_objects/clear-with-deleted.c index 38d0348bb..756523750 100644 --- a/tests/spec/arb_shader_objects/clear-with-deleted.c +++ b/tests/spec/arb_shader_objects/clear-with-deleted.c @@ -32,9 +32,10 @@ * early). */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static const char *vs_source = "void main()\n" diff --git a/tests/spec/arb_shader_objects/delete-repeat.c b/tests/spec/arb_shader_objects/delete-repeat.c index d49c68a14..b00c9dafd 100644 --- a/tests/spec/arb_shader_objects/delete-repeat.c +++ b/tests/spec/arb_shader_objects/delete-repeat.c @@ -29,9 +29,10 @@ * glDeleteProgram() is called multiple times. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static const char *vs_source = "void main()\n" diff --git a/tests/spec/arb_shader_objects/getactiveuniform-beginend.c b/tests/spec/arb_shader_objects/getactiveuniform-beginend.c index bd10a4337..ba9e5f961 100644 --- a/tests/spec/arb_shader_objects/getactiveuniform-beginend.c +++ b/tests/spec/arb_shader_objects/getactiveuniform-beginend.c @@ -32,9 +32,10 @@ * INVALID OPERATION." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_shader_objects/getuniform.c b/tests/spec/arb_shader_objects/getuniform.c index 533fc355e..be33f211f 100644 --- a/tests/spec/arb_shader_objects/getuniform.c +++ b/tests/spec/arb_shader_objects/getuniform.c @@ -28,9 +28,10 @@ * Tests that glGetUniform* work on various scalar/vector types. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_shader_objects/getuniformlocation-array-of-struct-of-array.c b/tests/spec/arb_shader_objects/getuniformlocation-array-of-struct-of-array.c index 5e5fcecca..faf19503f 100644 --- a/tests/spec/arb_shader_objects/getuniformlocation-array-of-struct-of-array.c +++ b/tests/spec/arb_shader_objects/getuniformlocation-array-of-struct-of-array.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *vs_code = "struct S { mat4 m; vec4 v[10]; };\n" diff --git a/tests/spec/arb_shader_texture_lod/execution/texgrad.c b/tests/spec/arb_shader_texture_lod/execution/texgrad.c index a7bf6ecdb..0c23ef25d 100644 --- a/tests/spec/arb_shader_texture_lod/execution/texgrad.c +++ b/tests/spec/arb_shader_texture_lod/execution/texgrad.c @@ -31,9 +31,10 @@ #include "piglit-util.h" -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; -int piglit_width = 512; -int piglit_height = 256; +PIGLIT_GL_TEST_MAIN( + 512 /*window_width*/, + 256 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define TEX_WIDTH 256 #define TEX_HEIGHT 256 diff --git a/tests/spec/arb_texture_buffer_object/dlist.c b/tests/spec/arb_texture_buffer_object/dlist.c index ed7cc6c57..24b15bce8 100644 --- a/tests/spec/arb_texture_buffer_object/dlist.c +++ b/tests/spec/arb_texture_buffer_object/dlist.c @@ -33,9 +33,10 @@ * list. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_texture_buffer_object/formats.c b/tests/spec/arb_texture_buffer_object/formats.c index 8835cb6df..19fbb9d40 100644 --- a/tests/spec/arb_texture_buffer_object/formats.c +++ b/tests/spec/arb_texture_buffer_object/formats.c @@ -28,9 +28,10 @@ #define _GNU_SOURCE #include "piglit-util.h" -int piglit_width = 200; -int piglit_height = 500; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 500 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum channels { A, diff --git a/tests/spec/arb_texture_buffer_object/get.c b/tests/spec/arb_texture_buffer_object/get.c index 86de2bc61..ad60975f1 100644 --- a/tests/spec/arb_texture_buffer_object/get.c +++ b/tests/spec/arb_texture_buffer_object/get.c @@ -29,9 +29,10 @@ * Tests glGetIntegerv queries not covered by other tests. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_texture_buffer_object/minmax.c b/tests/spec/arb_texture_buffer_object/minmax.c index 698e73d93..677da726a 100644 --- a/tests/spec/arb_texture_buffer_object/minmax.c +++ b/tests/spec/arb_texture_buffer_object/minmax.c @@ -28,9 +28,10 @@ #include "piglit-util.h" #include "minmax-test.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_texture_buffer_object/negative-bad-bo.c b/tests/spec/arb_texture_buffer_object/negative-bad-bo.c index d302b1750..a576c8800 100644 --- a/tests/spec/arb_texture_buffer_object/negative-bad-bo.c +++ b/tests/spec/arb_texture_buffer_object/negative-bad-bo.c @@ -30,9 +30,10 @@ #include "piglit-util.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_texture_buffer_object/negative-bad-format.c b/tests/spec/arb_texture_buffer_object/negative-bad-format.c index 12cf9023a..e002fd3df 100644 --- a/tests/spec/arb_texture_buffer_object/negative-bad-format.c +++ b/tests/spec/arb_texture_buffer_object/negative-bad-format.c @@ -30,9 +30,10 @@ #include "piglit-util.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_texture_buffer_object/negative-bad-target.c b/tests/spec/arb_texture_buffer_object/negative-bad-target.c index eec1f4c2e..47e1fbfe6 100644 --- a/tests/spec/arb_texture_buffer_object/negative-bad-target.c +++ b/tests/spec/arb_texture_buffer_object/negative-bad-target.c @@ -29,9 +29,10 @@ #include "piglit-util.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_texture_buffer_object/unused-name.c b/tests/spec/arb_texture_buffer_object/unused-name.c index 0ee8a899a..117a4e73b 100644 --- a/tests/spec/arb_texture_buffer_object/unused-name.c +++ b/tests/spec/arb_texture_buffer_object/unused-name.c @@ -35,9 +35,10 @@ * TEXTURE_BUFFER_ARB." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_texture_compression/internal-format-query.c b/tests/spec/arb_texture_compression/internal-format-query.c index 36daf52f7..ff7ef0243 100644 --- a/tests/spec/arb_texture_compression/internal-format-query.c +++ b/tests/spec/arb_texture_compression/internal-format-query.c @@ -70,8 +70,10 @@ #include <stdarg.h> #include "piglit-util.h" -int piglit_width = 10, piglit_height = 10; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_RGB) #define ENUM_AND_STRING(e) \ # e, e diff --git a/tests/spec/arb_texture_compression/invalid-formats.c b/tests/spec/arb_texture_compression/invalid-formats.c index fd3f730d3..561fa1f8a 100644 --- a/tests/spec/arb_texture_compression/invalid-formats.c +++ b/tests/spec/arb_texture_compression/invalid-formats.c @@ -39,8 +39,10 @@ */ #include "piglit-util.h" -int piglit_width = 10, piglit_height = 10; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_RGB) #define ENUM_AND_STRING(e) \ # e, e diff --git a/tests/spec/arb_texture_float/texture-float-formats.c b/tests/spec/arb_texture_float/texture-float-formats.c index 2856dd3ee..326326a32 100644 --- a/tests/spec/arb_texture_float/texture-float-formats.c +++ b/tests/spec/arb_texture_float/texture-float-formats.c @@ -28,8 +28,11 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) + static const char *TestName = "texture-float-formats"; static GLint TexWidth = 16, TexHeight = 16; static GLint BiasUniform = -1, ScaleUniform = -1, TexUniform = -1; diff --git a/tests/spec/arb_texture_storage/texture-storage.c b/tests/spec/arb_texture_storage/texture-storage.c index 58b06724f..0f1612377 100644 --- a/tests/spec/arb_texture_storage/texture-storage.c +++ b/tests/spec/arb_texture_storage/texture-storage.c @@ -30,9 +30,11 @@ #include "piglit-util.h" +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; static const char *TestName = "texture-storage"; static GLubyte Colors[][4] = { diff --git a/tests/spec/arb_transform_feedback2/draw-auto.c b/tests/spec/arb_transform_feedback2/draw-auto.c index 597f3a18b..18ab469a1 100644 --- a/tests/spec/arb_transform_feedback2/draw-auto.c +++ b/tests/spec/arb_transform_feedback2/draw-auto.c @@ -29,9 +29,10 @@ #include "piglit-util.h" -int piglit_width = 64; -int piglit_height = 64; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static const char *vstext = { "void main() {" diff --git a/tests/spec/arb_uniform_buffer_object/getuniformblockindex.c b/tests/spec/arb_uniform_buffer_object/getuniformblockindex.c index 7d2340b3c..772ceb285 100644 --- a/tests/spec/arb_uniform_buffer_object/getuniformblockindex.c +++ b/tests/spec/arb_uniform_buffer_object/getuniformblockindex.c @@ -30,9 +30,11 @@ #include "piglit-util.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) + static GLuint prog; static const char frag_shader_text[] = diff --git a/tests/spec/arb_uniform_buffer_object/getuniformindices.c b/tests/spec/arb_uniform_buffer_object/getuniformindices.c index 1a1bcd82f..e9e31edcd 100644 --- a/tests/spec/arb_uniform_buffer_object/getuniformindices.c +++ b/tests/spec/arb_uniform_buffer_object/getuniformindices.c @@ -29,9 +29,11 @@ #include "piglit-util.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) + static GLuint prog; static const char frag_shader_text[] = diff --git a/tests/spec/arb_uniform_buffer_object/getuniformlocation.c b/tests/spec/arb_uniform_buffer_object/getuniformlocation.c index 4e47b4a6c..574524419 100644 --- a/tests/spec/arb_uniform_buffer_object/getuniformlocation.c +++ b/tests/spec/arb_uniform_buffer_object/getuniformlocation.c @@ -39,9 +39,11 @@ #include "piglit-util.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) + static GLuint prog; static const char fs_source[] = diff --git a/tests/spec/arb_uniform_buffer_object/layout-std140.c b/tests/spec/arb_uniform_buffer_object/layout-std140.c index a433f6936..5f7f26dd3 100644 --- a/tests/spec/arb_uniform_buffer_object/layout-std140.c +++ b/tests/spec/arb_uniform_buffer_object/layout-std140.c @@ -36,9 +36,11 @@ #include "piglit-util.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) + static GLuint prog; static const struct result { diff --git a/tests/spec/arb_uniform_buffer_object/minmax.c b/tests/spec/arb_uniform_buffer_object/minmax.c index b004b70d2..0f4bd402d 100644 --- a/tests/spec/arb_uniform_buffer_object/minmax.c +++ b/tests/spec/arb_uniform_buffer_object/minmax.c @@ -29,9 +29,10 @@ #include "piglit-util.h" #include "minmax-test.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_vertex_buffer_object/elements-negative-offset.c b/tests/spec/arb_vertex_buffer_object/elements-negative-offset.c index 1b34fb495..d5afd1b83 100644 --- a/tests/spec/arb_vertex_buffer_object/elements-negative-offset.c +++ b/tests/spec/arb_vertex_buffer_object/elements-negative-offset.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 64, piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) static GLuint vbo; diff --git a/tests/spec/arb_vertex_buffer_object/mixed-immediate-and-vbo.c b/tests/spec/arb_vertex_buffer_object/mixed-immediate-and-vbo.c index 8bd0e1d2e..c1ba6f484 100644 --- a/tests/spec/arb_vertex_buffer_object/mixed-immediate-and-vbo.c +++ b/tests/spec/arb_vertex_buffer_object/mixed-immediate-and-vbo.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 64, piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) static GLuint vbo; diff --git a/tests/spec/arb_vertex_program/getenv4d-with-error.c b/tests/spec/arb_vertex_program/getenv4d-with-error.c index a3f13f253..6e07555bc 100644 --- a/tests/spec/arb_vertex_program/getenv4d-with-error.c +++ b/tests/spec/arb_vertex_program/getenv4d-with-error.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 64, piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) void piglit_init(int argc, char **argv) diff --git a/tests/spec/arb_vertex_program/getlocal4d-with-error.c b/tests/spec/arb_vertex_program/getlocal4d-with-error.c index 77a82cb0d..f7a453c8a 100644 --- a/tests/spec/arb_vertex_program/getlocal4d-with-error.c +++ b/tests/spec/arb_vertex_program/getlocal4d-with-error.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 64, piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE | GLUT_ALPHA) void piglit_init(int argc, char **argv) diff --git a/tests/spec/arb_vertex_program/minmax.c b/tests/spec/arb_vertex_program/minmax.c index a7c7fe2ee..b58bc5482 100644 --- a/tests/spec/arb_vertex_program/minmax.c +++ b/tests/spec/arb_vertex_program/minmax.c @@ -27,9 +27,10 @@ #include "piglit-util.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c b/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c index f4dec02e5..f28ed84a6 100644 --- a/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c +++ b/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c @@ -29,8 +29,10 @@ #include "piglit-util.h" -int piglit_width = 320, piglit_height = 60; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 320 /*window_width*/, + 60 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define i32to10(x) ((x) >= 0 ? (x & 0x1ff) : 1024-(abs((x))& 0x1ff)) #define i32to2(x) ((x) >= 0 ? (x & 0x1) : 1-abs((x))) diff --git a/tests/spec/ati_draw_buffers/arbfp-no-index.c b/tests/spec/ati_draw_buffers/arbfp-no-index.c index f9acf8b9d..204556707 100644 --- a/tests/spec/ati_draw_buffers/arbfp-no-index.c +++ b/tests/spec/ati_draw_buffers/arbfp-no-index.c @@ -41,9 +41,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static float result0[] = {0.7, 0.6, 0.3, 0.1}; static float result1[] = {0.2, 0.9, 0.5, 0.8}; diff --git a/tests/spec/ati_draw_buffers/arbfp-no-option.c b/tests/spec/ati_draw_buffers/arbfp-no-option.c index c39280641..0a1491abf 100644 --- a/tests/spec/ati_draw_buffers/arbfp-no-option.c +++ b/tests/spec/ati_draw_buffers/arbfp-no-option.c @@ -40,9 +40,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *mrt_fp_string = "!!ARBfp1.0\n" diff --git a/tests/spec/ati_draw_buffers/arbfp.c b/tests/spec/ati_draw_buffers/arbfp.c index 3e7386a2f..d69e87342 100644 --- a/tests/spec/ati_draw_buffers/arbfp.c +++ b/tests/spec/ati_draw_buffers/arbfp.c @@ -34,9 +34,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static float result0[] = {0.7, 0.6, 0.3, 0.1}; static float result1[] = {0.2, 0.9, 0.5, 0.8}; diff --git a/tests/spec/ati_envmap_bumpmap/bump.c b/tests/spec/ati_envmap_bumpmap/bump.c index 2bdaa57b6..7ae2e2c06 100644 --- a/tests/spec/ati_envmap_bumpmap/bump.c +++ b/tests/spec/ati_envmap_bumpmap/bump.c @@ -31,9 +31,11 @@ #define TEXSIZE 32 -int piglit_width = TEXSIZE * 2; -int piglit_height = TEXSIZE * 2; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + TEXSIZE * 2 /*window_width*/, + TEXSIZE * 2 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) + static GLenum tex_unit, bump_unit; diff --git a/tests/spec/ext_fog_coord/modes.c b/tests/spec/ext_fog_coord/modes.c index 1923b9cc1..df1e7a939 100644 --- a/tests/spec/ext_fog_coord/modes.c +++ b/tests/spec/ext_fog_coord/modes.c @@ -34,9 +34,10 @@ #undef far #endif -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_framebuffer_multisample/accuracy.cpp b/tests/spec/ext_framebuffer_multisample/accuracy.cpp index 1b7ac1c46..defc72ee2 100644 --- a/tests/spec/ext_framebuffer_multisample/accuracy.cpp +++ b/tests/spec/ext_framebuffer_multisample/accuracy.cpp @@ -43,8 +43,11 @@ * driver for Linux) this is necessary for framebuffer completeness. * On others (e.g. i965), this is an important corner case to test. */ -int piglit_width = 512; int piglit_height = 256; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA; + +PIGLIT_GL_TEST_MAIN( + 512 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA) const int pattern_width = 256; const int pattern_height = 256; const int supersample_factor = 16; diff --git a/tests/spec/ext_framebuffer_multisample/blit-mismatched-formats.cpp b/tests/spec/ext_framebuffer_multisample/blit-mismatched-formats.cpp index 694fcad3b..4681c5c1c 100644 --- a/tests/spec/ext_framebuffer_multisample/blit-mismatched-formats.cpp +++ b/tests/spec/ext_framebuffer_multisample/blit-mismatched-formats.cpp @@ -36,8 +36,9 @@ #include "common.h" -int piglit_width = 256; int piglit_height = 256; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA; +PIGLIT_GL_TEST_MAIN(256 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA); const int pattern_width = 256; const int pattern_height = 256; Fbo src_fbo, dst_fbo; diff --git a/tests/spec/ext_framebuffer_multisample/blit-mismatched-samples.cpp b/tests/spec/ext_framebuffer_multisample/blit-mismatched-samples.cpp index d37a6a6ca..e9775526f 100644 --- a/tests/spec/ext_framebuffer_multisample/blit-mismatched-samples.cpp +++ b/tests/spec/ext_framebuffer_multisample/blit-mismatched-samples.cpp @@ -35,8 +35,9 @@ #include "common.h" -int piglit_width = 256; int piglit_height = 256; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA; +PIGLIT_GL_TEST_MAIN(256 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA); const int pattern_width = 256; const int pattern_height = 256; Fbo src_fbo, dst_fbo; diff --git a/tests/spec/ext_framebuffer_multisample/blit-mismatched-sizes.cpp b/tests/spec/ext_framebuffer_multisample/blit-mismatched-sizes.cpp index 9a9e669be..b128dfcbf 100644 --- a/tests/spec/ext_framebuffer_multisample/blit-mismatched-sizes.cpp +++ b/tests/spec/ext_framebuffer_multisample/blit-mismatched-sizes.cpp @@ -35,8 +35,9 @@ #include "common.h" -int piglit_width = 256; int piglit_height = 256; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA; +PIGLIT_GL_TEST_MAIN(256 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA); const int pattern_width = 256; const int pattern_height = 256; Fbo src_fbo, dst_fbo; diff --git a/tests/spec/ext_framebuffer_multisample/dlist.c b/tests/spec/ext_framebuffer_multisample/dlist.c index a8d5a3afa..b8964f1fa 100644 --- a/tests/spec/ext_framebuffer_multisample/dlist.c +++ b/tests/spec/ext_framebuffer_multisample/dlist.c @@ -37,9 +37,10 @@ immediately instead of being compiled into display lists. * RenderbufferStorageMultisampleEXT..." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_framebuffer_multisample/enable-flag.cpp b/tests/spec/ext_framebuffer_multisample/enable-flag.cpp index 4d88390bd..9f6430c6f 100644 --- a/tests/spec/ext_framebuffer_multisample/enable-flag.cpp +++ b/tests/spec/ext_framebuffer_multisample/enable-flag.cpp @@ -63,8 +63,9 @@ #include "common.h" -int piglit_width = 512; int piglit_height = 256; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN(256 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA); namespace { diff --git a/tests/spec/ext_framebuffer_multisample/formats.cpp b/tests/spec/ext_framebuffer_multisample/formats.cpp index 220de798a..01eb5a94e 100644 --- a/tests/spec/ext_framebuffer_multisample/formats.cpp +++ b/tests/spec/ext_framebuffer_multisample/formats.cpp @@ -42,8 +42,10 @@ #include "common.h" #include "../../fbo/fbo-formats.h" -int piglit_width = 512, piglit_height = 256; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 512 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA) namespace { diff --git a/tests/spec/ext_framebuffer_multisample/line-smooth.cpp b/tests/spec/ext_framebuffer_multisample/line-smooth.cpp index 7f615d96a..bd4a8252f 100644 --- a/tests/spec/ext_framebuffer_multisample/line-smooth.cpp +++ b/tests/spec/ext_framebuffer_multisample/line-smooth.cpp @@ -43,9 +43,10 @@ * halves of default framebuffer. They are expected to match. * */ -int piglit_width = 512; int piglit_height = 256; -int piglit_window_mode = - GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL; + +PIGLIT_GL_TEST_MAIN(512 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL); const int pattern_width = 256; const int pattern_height = 256; diff --git a/tests/spec/ext_framebuffer_multisample/minmax.c b/tests/spec/ext_framebuffer_multisample/minmax.c index 2904d4f14..a5ea174a0 100644 --- a/tests/spec/ext_framebuffer_multisample/minmax.c +++ b/tests/spec/ext_framebuffer_multisample/minmax.c @@ -29,9 +29,10 @@ * Test for the MAX_SAMPLES_EXT minimum value. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_framebuffer_multisample/multisample-blit.cpp b/tests/spec/ext_framebuffer_multisample/multisample-blit.cpp index 33a019a8d..f460bae09 100644 --- a/tests/spec/ext_framebuffer_multisample/multisample-blit.cpp +++ b/tests/spec/ext_framebuffer_multisample/multisample-blit.cpp @@ -36,9 +36,9 @@ * blit straight from the MSAA buffer to the window system * framebuffer--this should produce the same image. */ -int piglit_width = 512; int piglit_height = 256; -int piglit_window_mode = - GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN(512 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL); const int pattern_width = 256; const int pattern_height = 256; diff --git a/tests/spec/ext_framebuffer_multisample/negative-copypixels.c b/tests/spec/ext_framebuffer_multisample/negative-copypixels.c index 0dd8648a5..e05d7ddb3 100644 --- a/tests/spec/ext_framebuffer_multisample/negative-copypixels.c +++ b/tests/spec/ext_framebuffer_multisample/negative-copypixels.c @@ -44,9 +44,10 @@ * "INVALID_OPERATION_EXT", but that appears to be a typo. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_framebuffer_multisample/negative-copyteximage.c b/tests/spec/ext_framebuffer_multisample/negative-copyteximage.c index fab5bfb9b..06b3dd6e5 100644 --- a/tests/spec/ext_framebuffer_multisample/negative-copyteximage.c +++ b/tests/spec/ext_framebuffer_multisample/negative-copyteximage.c @@ -44,9 +44,10 @@ * "INVALID_OPERATION_EXT", but that appears to be a typo. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_framebuffer_multisample/negative-max-samples.c b/tests/spec/ext_framebuffer_multisample/negative-max-samples.c index ee3dd4871..e95335736 100644 --- a/tests/spec/ext_framebuffer_multisample/negative-max-samples.c +++ b/tests/spec/ext_framebuffer_multisample/negative-max-samples.c @@ -35,9 +35,10 @@ * MAX_SAMPLES_EXT, then the error INVALID_VALUE is generated." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_framebuffer_multisample/negative-mismatched-samples.c b/tests/spec/ext_framebuffer_multisample/negative-mismatched-samples.c index c1d3c0e37..3d5bf6e87 100644 --- a/tests/spec/ext_framebuffer_multisample/negative-mismatched-samples.c +++ b/tests/spec/ext_framebuffer_multisample/negative-mismatched-samples.c @@ -37,9 +37,10 @@ * { FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT }" */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_framebuffer_multisample/negative-readpixels.c b/tests/spec/ext_framebuffer_multisample/negative-readpixels.c index 935fe41b4..44385d5ae 100644 --- a/tests/spec/ext_framebuffer_multisample/negative-readpixels.c +++ b/tests/spec/ext_framebuffer_multisample/negative-readpixels.c @@ -36,9 +36,10 @@ * the read framebuffer is greater than zero." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_framebuffer_multisample/point-smooth.cpp b/tests/spec/ext_framebuffer_multisample/point-smooth.cpp index 287509fbe..f2ae5c78f 100644 --- a/tests/spec/ext_framebuffer_multisample/point-smooth.cpp +++ b/tests/spec/ext_framebuffer_multisample/point-smooth.cpp @@ -43,9 +43,10 @@ * halves of default framebuffer. There should be no difference. * */ -int piglit_width = 512; int piglit_height = 256; -int piglit_window_mode = - GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL; + +PIGLIT_GL_TEST_MAIN(512 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL); const int pattern_width = 256; const int pattern_height = 256; diff --git a/tests/spec/ext_framebuffer_multisample/polygon-smooth.cpp b/tests/spec/ext_framebuffer_multisample/polygon-smooth.cpp index b16e70b5c..9be96216e 100644 --- a/tests/spec/ext_framebuffer_multisample/polygon-smooth.cpp +++ b/tests/spec/ext_framebuffer_multisample/polygon-smooth.cpp @@ -43,9 +43,10 @@ * halves of default framebuffer. They are expected to match. */ -int piglit_width = 512; int piglit_height = 256; -int piglit_window_mode = - GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL; +PIGLIT_GL_TEST_MAIN(512 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL); + const int pattern_width = 256; const int pattern_height = 256; Fbo ms_fbo; diff --git a/tests/spec/ext_framebuffer_multisample/renderbuffer-samples.c b/tests/spec/ext_framebuffer_multisample/renderbuffer-samples.c index a23eb0e26..cd69d165f 100644 --- a/tests/spec/ext_framebuffer_multisample/renderbuffer-samples.c +++ b/tests/spec/ext_framebuffer_multisample/renderbuffer-samples.c @@ -66,9 +66,10 @@ * by a "multisample location" extension." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_framebuffer_multisample/renderbufferstorage-samples.c b/tests/spec/ext_framebuffer_multisample/renderbufferstorage-samples.c index 2f4049d97..b8f459232 100644 --- a/tests/spec/ext_framebuffer_multisample/renderbufferstorage-samples.c +++ b/tests/spec/ext_framebuffer_multisample/renderbufferstorage-samples.c @@ -37,9 +37,10 @@ * with <samples> equal to zero." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_framebuffer_multisample/samples.c b/tests/spec/ext_framebuffer_multisample/samples.c index b9f0c0e6e..2c5e17862 100644 --- a/tests/spec/ext_framebuffer_multisample/samples.c +++ b/tests/spec/ext_framebuffer_multisample/samples.c @@ -41,9 +41,10 @@ * See also negative-mismatched-samples.c. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_framebuffer_multisample/turn-on-off.cpp b/tests/spec/ext_framebuffer_multisample/turn-on-off.cpp index 0e644dac2..2ee249c13 100644 --- a/tests/spec/ext_framebuffer_multisample/turn-on-off.cpp +++ b/tests/spec/ext_framebuffer_multisample/turn-on-off.cpp @@ -45,8 +45,10 @@ * TODO: Add testing for depth and stencil buffers. */ -int piglit_width = 512; int piglit_height = 256; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 512 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA) static int num_samples = 0; const int pattern_width = 256; diff --git a/tests/spec/ext_framebuffer_multisample/unaligned-blit.cpp b/tests/spec/ext_framebuffer_multisample/unaligned-blit.cpp index 4a1c3f9de..b84c14d10 100644 --- a/tests/spec/ext_framebuffer_multisample/unaligned-blit.cpp +++ b/tests/spec/ext_framebuffer_multisample/unaligned-blit.cpp @@ -53,10 +53,9 @@ const int tile_size = 49; const int tiles_across = 5; const int num_tiles = tiles_across * tiles_across; -int piglit_width = pattern_size * 2; int piglit_height = pattern_size; -int piglit_window_mode = - GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL; - +PIGLIT_GL_TEST_MAIN(2 * pattern_size /*window_width*/, + pattern_size /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL); const int permutation[num_tiles] = { 10, 5, 6, 17, 3, 11, 16, 21, 14, 24, 23, 8, 15, 18, 0, 12, 9, diff --git a/tests/spec/ext_framebuffer_multisample/upsample.cpp b/tests/spec/ext_framebuffer_multisample/upsample.cpp index 049c12c0c..b1b0b43aa 100644 --- a/tests/spec/ext_framebuffer_multisample/upsample.cpp +++ b/tests/spec/ext_framebuffer_multisample/upsample.cpp @@ -51,9 +51,10 @@ * the downsample blit. These are already adequately tested by * accuracy.cpp. */ -int piglit_width = 512; int piglit_height = 256; -int piglit_window_mode = - GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL; + +PIGLIT_GL_TEST_MAIN(512 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL); const int pattern_width = 256; const int pattern_height = 256; diff --git a/tests/spec/ext_packed_depth_stencil/readpixels-24_8.c b/tests/spec/ext_packed_depth_stencil/readpixels-24_8.c index 878421774..30aeb3af0 100644 --- a/tests/spec/ext_packed_depth_stencil/readpixels-24_8.c +++ b/tests/spec/ext_packed_depth_stencil/readpixels-24_8.c @@ -32,9 +32,11 @@ #define BUF_WIDTH 15 #define BUF_HEIGHT 15 -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; -int piglit_width = BUF_WIDTH; -int piglit_height = BUF_WIDTH; + +PIGLIT_GL_TEST_MAIN( + BUF_WIDTH /*window_width*/, + BUF_WIDTH /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) /* Width of our stripes of z = 0.0, 0.5, 1.0 */ static int w = BUF_WIDTH / 3; diff --git a/tests/spec/ext_packed_float/getteximage-invalid-format-for-packed-type.c b/tests/spec/ext_packed_float/getteximage-invalid-format-for-packed-type.c index 37f872c57..ba5aad570 100644 --- a/tests/spec/ext_packed_float/getteximage-invalid-format-for-packed-type.c +++ b/tests/spec/ext_packed_float/getteximage-invalid-format-for-packed-type.c @@ -69,8 +69,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGBA | GLUT_DOUBLE) static const GLenum formatTypes[] = { GL_RGBA, diff --git a/tests/spec/ext_packed_float/pack.c b/tests/spec/ext_packed_float/pack.c index 8116ac3f5..47c264054 100755 --- a/tests/spec/ext_packed_float/pack.c +++ b/tests/spec/ext_packed_float/pack.c @@ -29,8 +29,10 @@ #include "piglit-util.h" -int piglit_width = 10, piglit_height = 10; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) /* Any maximum e with m != 0 is NAN */ diff --git a/tests/spec/ext_texture_array/maxlayers.c b/tests/spec/ext_texture_array/maxlayers.c index 25c53a0bf..5fdbca04b 100644 --- a/tests/spec/ext_texture_array/maxlayers.c +++ b/tests/spec/ext_texture_array/maxlayers.c @@ -30,9 +30,11 @@ #include "piglit-util.h" -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; -int piglit_width = 100; -int piglit_height = 100; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) + int height = 100, ybase = 0; /* We'll set each 1x1 texture slice to a different color. */ diff --git a/tests/spec/ext_texture_integer/api-drawpixels.c b/tests/spec/ext_texture_integer/api-drawpixels.c index 99c7c9d77..8b0492eff 100644 --- a/tests/spec/ext_texture_integer/api-drawpixels.c +++ b/tests/spec/ext_texture_integer/api-drawpixels.c @@ -58,8 +58,10 @@ #include "piglit-util.h" -int piglit_width = 10, piglit_height = 10; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_texture_integer/api-readpixels.c b/tests/spec/ext_texture_integer/api-readpixels.c index 9e97e1852..59cf5bb04 100644 --- a/tests/spec/ext_texture_integer/api-readpixels.c +++ b/tests/spec/ext_texture_integer/api-readpixels.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 10, piglit_height = 10; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_texture_integer/api-teximage.c b/tests/spec/ext_texture_integer/api-teximage.c index b2b1ad83a..8f9f82a21 100644 --- a/tests/spec/ext_texture_integer/api-teximage.c +++ b/tests/spec/ext_texture_integer/api-teximage.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 10, piglit_height = 10; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_texture_integer/fbo-blending.c b/tests/spec/ext_texture_integer/fbo-blending.c index 0151b3566..f07e9c6b5 100644 --- a/tests/spec/ext_texture_integer/fbo-blending.c +++ b/tests/spec/ext_texture_integer/fbo-blending.c @@ -42,8 +42,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static GLuint tex; static int color_loc; diff --git a/tests/spec/ext_texture_integer/fbo-integer-precision-clear.c b/tests/spec/ext_texture_integer/fbo-integer-precision-clear.c index 2748aa960..7a5c7eda5 100644 --- a/tests/spec/ext_texture_integer/fbo-integer-precision-clear.c +++ b/tests/spec/ext_texture_integer/fbo-integer-precision-clear.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "fbo-integer-precision-clear"; diff --git a/tests/spec/ext_texture_integer/fbo-integer-readpixels-sint-uint.c b/tests/spec/ext_texture_integer/fbo-integer-readpixels-sint-uint.c index 50d3be6a5..97ed32fbc 100644 --- a/tests/spec/ext_texture_integer/fbo-integer-readpixels-sint-uint.c +++ b/tests/spec/ext_texture_integer/fbo-integer-readpixels-sint-uint.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "fbo-integer-readpixels-sint-uint"; diff --git a/tests/spec/ext_texture_integer/getteximage-clamping.c b/tests/spec/ext_texture_integer/getteximage-clamping.c index 50d7b9122..ed3daedb1 100644 --- a/tests/spec/ext_texture_integer/getteximage-clamping.c +++ b/tests/spec/ext_texture_integer/getteximage-clamping.c @@ -46,8 +46,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) struct format_info { const char *name; diff --git a/tests/spec/ext_texture_integer/texture-integer-glsl130.c b/tests/spec/ext_texture_integer/texture-integer-glsl130.c index c368bbfa5..8f17bfb22 100644 --- a/tests/spec/ext_texture_integer/texture-integer-glsl130.c +++ b/tests/spec/ext_texture_integer/texture-integer-glsl130.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "texture-integer"; diff --git a/tests/spec/ext_timer_query/time-elapsed.c b/tests/spec/ext_timer_query/time-elapsed.c index 0c6aa10bc..2df5fc00d 100644 --- a/tests/spec/ext_timer_query/time-elapsed.c +++ b/tests/spec/ext_timer_query/time-elapsed.c @@ -32,9 +32,10 @@ #include <sys/time.h> -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static float get_time(void) diff --git a/tests/spec/ext_transform_feedback/alignment.c b/tests/spec/ext_transform_feedback/alignment.c index 309082abd..9e8bc72cb 100644 --- a/tests/spec/ext_transform_feedback/alignment.c +++ b/tests/spec/ext_transform_feedback/alignment.c @@ -36,9 +36,10 @@ #define BUFFER_SIZE 0x40 -int piglit_width = 10; -int piglit_height = 10; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) /* Test parameters */ static unsigned long additional_offset; diff --git a/tests/spec/ext_transform_feedback/api-errors.c b/tests/spec/ext_transform_feedback/api-errors.c index e89dcbf17..c73748a1a 100644 --- a/tests/spec/ext_transform_feedback/api-errors.c +++ b/tests/spec/ext_transform_feedback/api-errors.c @@ -50,9 +50,10 @@ #include "piglit-util.h" -int piglit_width = 16; -int piglit_height = 16; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 16 /*window_width*/, + 16 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) #define XFB_BUFFER_SIZE 12 #define NUM_BUFFERS 2 diff --git a/tests/spec/ext_transform_feedback/buffer-usage.c b/tests/spec/ext_transform_feedback/buffer-usage.c index 64da35a4d..6dd0e62fb 100644 --- a/tests/spec/ext_transform_feedback/buffer-usage.c +++ b/tests/spec/ext_transform_feedback/buffer-usage.c @@ -33,9 +33,10 @@ #define NUM_POINTS 10002 #define SHIFT_COUNT 64 -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static const char *vstext = "#version 130\n" diff --git a/tests/spec/ext_transform_feedback/builtin-varyings.c b/tests/spec/ext_transform_feedback/builtin-varyings.c index 1fec20303..7faecd5a6 100644 --- a/tests/spec/ext_transform_feedback/builtin-varyings.c +++ b/tests/spec/ext_transform_feedback/builtin-varyings.c @@ -34,9 +34,10 @@ #include "piglit-util.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) #define MAX_EXPECTED_OUTPUT_COMPONENTS 8 diff --git a/tests/spec/ext_transform_feedback/discard-api.c b/tests/spec/ext_transform_feedback/discard-api.c index fe6a2c9ce..24c04d759 100644 --- a/tests/spec/ext_transform_feedback/discard-api.c +++ b/tests/spec/ext_transform_feedback/discard-api.c @@ -37,9 +37,10 @@ * RASTERIZER_DISCARD_EXT 0x8C89" */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_transform_feedback/discard-bitmap.c b/tests/spec/ext_transform_feedback/discard-bitmap.c index 1b889f578..45b01f4bb 100644 --- a/tests/spec/ext_transform_feedback/discard-bitmap.c +++ b/tests/spec/ext_transform_feedback/discard-bitmap.c @@ -40,9 +40,10 @@ * CopyPixels, Bitmap, Clear and Accum commands as well." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_transform_feedback/discard-clear.c b/tests/spec/ext_transform_feedback/discard-clear.c index 758677530..a3e99a6b0 100644 --- a/tests/spec/ext_transform_feedback/discard-clear.c +++ b/tests/spec/ext_transform_feedback/discard-clear.c @@ -40,9 +40,10 @@ * CopyPixels, Bitmap, Clear and Accum commands as well." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_transform_feedback/discard-copypixels.c b/tests/spec/ext_transform_feedback/discard-copypixels.c index 0c9954f70..beb196e83 100644 --- a/tests/spec/ext_transform_feedback/discard-copypixels.c +++ b/tests/spec/ext_transform_feedback/discard-copypixels.c @@ -40,9 +40,10 @@ * CopyPixels, Bitmap, Clear and Accum commands as well." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_transform_feedback/discard-drawarrays.c b/tests/spec/ext_transform_feedback/discard-drawarrays.c index ce8ec7ed6..87a76881a 100644 --- a/tests/spec/ext_transform_feedback/discard-drawarrays.c +++ b/tests/spec/ext_transform_feedback/discard-drawarrays.c @@ -41,9 +41,10 @@ * CopyPixels, Bitmap, Clear and Accum commands as well." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_transform_feedback/discard-drawpixels.c b/tests/spec/ext_transform_feedback/discard-drawpixels.c index a4408c8e7..08cc4e4c8 100644 --- a/tests/spec/ext_transform_feedback/discard-drawpixels.c +++ b/tests/spec/ext_transform_feedback/discard-drawpixels.c @@ -40,9 +40,10 @@ * CopyPixels, Bitmap, Clear and Accum commands as well." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/ext_transform_feedback/generatemipmap.c b/tests/spec/ext_transform_feedback/generatemipmap.c index 2f16e1c9e..1ee255f84 100644 --- a/tests/spec/ext_transform_feedback/generatemipmap.c +++ b/tests/spec/ext_transform_feedback/generatemipmap.c @@ -66,9 +66,11 @@ #define TEX_WIDTH 256 #define TEX_HEIGHT 256 -int piglit_width = 700; -int piglit_height = 300; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; + +PIGLIT_GL_TEST_MAIN( + 700 /*window_width*/, + 300 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const float red[] = {1, 0, 0, 0}; static const float green[] = {0, 1, 0, 0.25}; diff --git a/tests/spec/ext_transform_feedback/get-buffer-state.c b/tests/spec/ext_transform_feedback/get-buffer-state.c index bfa198529..6102c2ce2 100644 --- a/tests/spec/ext_transform_feedback/get-buffer-state.c +++ b/tests/spec/ext_transform_feedback/get-buffer-state.c @@ -30,9 +30,10 @@ #include "piglit-util.h" -int piglit_width = 16; -int piglit_height = 16; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 16 /*window_width*/, + 16 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) #define XFB_BUFFER_SIZE 12 diff --git a/tests/spec/ext_transform_feedback/immediate-reuse.c b/tests/spec/ext_transform_feedback/immediate-reuse.c index dd3c9cd99..9b836f086 100644 --- a/tests/spec/ext_transform_feedback/immediate-reuse.c +++ b/tests/spec/ext_transform_feedback/immediate-reuse.c @@ -38,9 +38,10 @@ #include "piglit-util.h" -int piglit_width = 256; -int piglit_height = 16; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 16 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static const char *vstext = "attribute vec4 in_position;\n" diff --git a/tests/spec/ext_transform_feedback/interleaved.c b/tests/spec/ext_transform_feedback/interleaved.c index 63087c91d..795694e73 100644 --- a/tests/spec/ext_transform_feedback/interleaved.c +++ b/tests/spec/ext_transform_feedback/interleaved.c @@ -29,9 +29,10 @@ #include "piglit-util.h" -int piglit_width = 64; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static const char *vstext = { "varying vec3 v3;" diff --git a/tests/spec/ext_transform_feedback/intervening-read.c b/tests/spec/ext_transform_feedback/intervening-read.c index c441df245..161c2593d 100644 --- a/tests/spec/ext_transform_feedback/intervening-read.c +++ b/tests/spec/ext_transform_feedback/intervening-read.c @@ -48,9 +48,10 @@ #include "piglit-util.h" -int piglit_width = 64; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static enum test_mode { TEST_MODE_OUTPUT, diff --git a/tests/spec/ext_transform_feedback/max-varyings.c b/tests/spec/ext_transform_feedback/max-varyings.c index 64e05a3c3..2048cbb3d 100644 --- a/tests/spec/ext_transform_feedback/max-varyings.c +++ b/tests/spec/ext_transform_feedback/max-varyings.c @@ -42,8 +42,11 @@ #define MAX_VARYING 32 /* 10x10 rectangles with 2 pixels of pad. Deal with up to 32 varyings. */ -int piglit_width = (2 + MAX_VARYING * 12), piglit_height = (2 + MAX_VARYING * 12); -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; + +PIGLIT_GL_TEST_MAIN( + (2 + MAX_VARYING * 12) /*window_width*/, + (2 + MAX_VARYING * 12) /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *xfb_varying_array[MAX_VARYING]; static GLuint xfb_buf; diff --git a/tests/spec/ext_transform_feedback/negative-prims.c b/tests/spec/ext_transform_feedback/negative-prims.c index 27ec0b721..cee33db34 100644 --- a/tests/spec/ext_transform_feedback/negative-prims.c +++ b/tests/spec/ext_transform_feedback/negative-prims.c @@ -43,9 +43,10 @@ #include "piglit-util.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) struct { GLenum tf_prim; diff --git a/tests/spec/ext_transform_feedback/order.c b/tests/spec/ext_transform_feedback/order.c index 544361988..0d3b79414 100644 --- a/tests/spec/ext_transform_feedback/order.c +++ b/tests/spec/ext_transform_feedback/order.c @@ -57,9 +57,11 @@ #define NUM_POINTS 10002 #define SHIFT_COUNT 64 -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) + static GLenum draw_mode; static GLboolean use_draw_elements; static GLuint prog; diff --git a/tests/spec/ext_transform_feedback/output-type.c b/tests/spec/ext_transform_feedback/output-type.c index 7b73c2738..43e8a9ba9 100644 --- a/tests/spec/ext_transform_feedback/output-type.c +++ b/tests/spec/ext_transform_feedback/output-type.c @@ -30,9 +30,10 @@ #include "piglit-util.h" -int piglit_width = 64; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) struct test_desc { const char *name; diff --git a/tests/spec/ext_transform_feedback/overflow-edge-cases.c b/tests/spec/ext_transform_feedback/overflow-edge-cases.c index 4507ed4cc..2e23e1962 100644 --- a/tests/spec/ext_transform_feedback/overflow-edge-cases.c +++ b/tests/spec/ext_transform_feedback/overflow-edge-cases.c @@ -43,9 +43,10 @@ #include "piglit-util.h" -int piglit_width = 16; -int piglit_height = 16; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 16 /*window_width*/, + 16 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) #define XFB_BUFFER_SIZE 12 #define MAX_VERTICES 9 diff --git a/tests/spec/ext_transform_feedback/position.c b/tests/spec/ext_transform_feedback/position.c index fb4bf99f0..603ae24e5 100644 --- a/tests/spec/ext_transform_feedback/position.c +++ b/tests/spec/ext_transform_feedback/position.c @@ -30,9 +30,10 @@ #include "piglit-util.h" -int piglit_width = 64; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static const char *vstext = { "void main() {" diff --git a/tests/spec/ext_transform_feedback/separate.c b/tests/spec/ext_transform_feedback/separate.c index 14a5d33e1..1dc946de2 100644 --- a/tests/spec/ext_transform_feedback/separate.c +++ b/tests/spec/ext_transform_feedback/separate.c @@ -29,9 +29,10 @@ #include "piglit-util.h" -int piglit_width = 64; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static const char *vstext = { "varying vec3 v3;" diff --git a/tests/spec/ext_transform_feedback/tessellation.c b/tests/spec/ext_transform_feedback/tessellation.c index c85b241b3..8c79e45dc 100644 --- a/tests/spec/ext_transform_feedback/tessellation.c +++ b/tests/spec/ext_transform_feedback/tessellation.c @@ -120,9 +120,10 @@ #define BUFFER_SIZE 20 -int piglit_width = 256; -int piglit_height = 256; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 256 /*window_width*/, + 256 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) /* Test parameters */ static GLenum draw_mode; diff --git a/tests/spec/ext_unpack_subimage/ext_unpack_subimage.c b/tests/spec/ext_unpack_subimage/ext_unpack_subimage.c index 255986e5f..c35581874 100644 --- a/tests/spec/ext_unpack_subimage/ext_unpack_subimage.c +++ b/tests/spec/ext_unpack_subimage/ext_unpack_subimage.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLboolean extension_supported; static GLboolean pass; diff --git a/tests/spec/gl-2.0/api/clip-flag-behavior.c b/tests/spec/gl-2.0/api/clip-flag-behavior.c index f429c2259..64639cd79 100644 --- a/tests/spec/gl-2.0/api/clip-flag-behavior.c +++ b/tests/spec/gl-2.0/api/clip-flag-behavior.c @@ -38,8 +38,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/gl-2.0/api/getattriblocation-conventional.c b/tests/spec/gl-2.0/api/getattriblocation-conventional.c index b4fd4b211..14ab5516c 100644 --- a/tests/spec/gl-2.0/api/getattriblocation-conventional.c +++ b/tests/spec/gl-2.0/api/getattriblocation-conventional.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *vs_code = "attribute vec4 not_used;\n" diff --git a/tests/spec/gl-2.0/vertex-program-two-side.c b/tests/spec/gl-2.0/vertex-program-two-side.c index 83ede0a50..77a4a43c7 100644 --- a/tests/spec/gl-2.0/vertex-program-two-side.c +++ b/tests/spec/gl-2.0/vertex-program-two-side.c @@ -45,8 +45,10 @@ #define _GNU_SOURCE #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static GLint prog; diff --git a/tests/spec/gl-2.1/minmax.c b/tests/spec/gl-2.1/minmax.c index 64f4a09b8..6970ad3b2 100644 --- a/tests/spec/gl-2.1/minmax.c +++ b/tests/spec/gl-2.1/minmax.c @@ -29,9 +29,10 @@ #include "piglit-util.h" #include "minmax-test.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/gl-3.0/api/bindfragdata-invalid-parameters.c b/tests/spec/gl-3.0/api/bindfragdata-invalid-parameters.c index ce5fec80c..37e81e7d8 100644 --- a/tests/spec/gl-3.0/api/bindfragdata-invalid-parameters.c +++ b/tests/spec/gl-3.0/api/bindfragdata-invalid-parameters.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/gl-3.0/api/bindfragdata-link-error.c b/tests/spec/gl-3.0/api/bindfragdata-link-error.c index 976f7ebdc..cdf67f3f9 100644 --- a/tests/spec/gl-3.0/api/bindfragdata-link-error.c +++ b/tests/spec/gl-3.0/api/bindfragdata-link-error.c @@ -27,8 +27,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *vs_text = "#version 130\n" diff --git a/tests/spec/gl-3.0/api/bindfragdata-nonexistent-variable.c b/tests/spec/gl-3.0/api/bindfragdata-nonexistent-variable.c index 36378602d..f8242cb91 100644 --- a/tests/spec/gl-3.0/api/bindfragdata-nonexistent-variable.c +++ b/tests/spec/gl-3.0/api/bindfragdata-nonexistent-variable.c @@ -28,8 +28,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *vs_text = "#version 130\n" diff --git a/tests/spec/gl-3.0/api/clearbuffer-common.c b/tests/spec/gl-3.0/api/clearbuffer-common.c index f675f1fa3..f421b6356 100644 --- a/tests/spec/gl-3.0/api/clearbuffer-common.c +++ b/tests/spec/gl-3.0/api/clearbuffer-common.c @@ -30,8 +30,10 @@ const float default_color[4] = { 0.2, 0.4, 0.6, 1.0 }; const float default_depth = 0.2; const int default_stencil = 0x7a; -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) GLuint generate_simple_fbo(bool color, bool stencil, bool depth, bool packed) diff --git a/tests/spec/gl-3.0/api/clearbuffer-invalid-buffer.c b/tests/spec/gl-3.0/api/clearbuffer-invalid-buffer.c index 614989362..3a6b4a6d5 100644 --- a/tests/spec/gl-3.0/api/clearbuffer-invalid-buffer.c +++ b/tests/spec/gl-3.0/api/clearbuffer-invalid-buffer.c @@ -28,8 +28,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) /* These enums don't really exist, but they were accidentally shipped in some * versions of glext.h. diff --git a/tests/spec/gl-3.0/api/clearbuffer-invalid-drawbuffer.c b/tests/spec/gl-3.0/api/clearbuffer-invalid-drawbuffer.c index d4c9ac8ac..2a915c143 100644 --- a/tests/spec/gl-3.0/api/clearbuffer-invalid-drawbuffer.c +++ b/tests/spec/gl-3.0/api/clearbuffer-invalid-drawbuffer.c @@ -29,8 +29,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/spec/gl-3.0/api/getfragdatalocation.c b/tests/spec/gl-3.0/api/getfragdatalocation.c index 5bb2d4bda..25897f596 100644 --- a/tests/spec/gl-3.0/api/getfragdatalocation.c +++ b/tests/spec/gl-3.0/api/getfragdatalocation.c @@ -27,8 +27,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *vs_text = "#version 130\n" diff --git a/tests/spec/gl-3.0/api/integer-errors.c b/tests/spec/gl-3.0/api/integer-errors.c index 2587ef40e..f26e59287 100644 --- a/tests/spec/gl-3.0/api/integer-errors.c +++ b/tests/spec/gl-3.0/api/integer-errors.c @@ -30,9 +30,9 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN(100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE); static bool test_api_errors(void) diff --git a/tests/spec/gl-3.0/minmax.c b/tests/spec/gl-3.0/minmax.c index 0e40ee167..8e2da7877 100644 --- a/tests/spec/gl-3.0/minmax.c +++ b/tests/spec/gl-3.0/minmax.c @@ -29,9 +29,10 @@ #include "piglit-util.h" #include "minmax-test.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/gl-3.0/required-renderbuffer-attachment-formats.c b/tests/spec/gl-3.0/required-renderbuffer-attachment-formats.c index 9010e8b0f..d36f1c3af 100644 --- a/tests/spec/gl-3.0/required-renderbuffer-attachment-formats.c +++ b/tests/spec/gl-3.0/required-renderbuffer-attachment-formats.c @@ -32,9 +32,10 @@ * page 180 "Required Texture Formats". */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/gl-3.0/required-sized-texture-formats.c b/tests/spec/gl-3.0/required-sized-texture-formats.c index d00b6400f..a8989b656 100644 --- a/tests/spec/gl-3.0/required-sized-texture-formats.c +++ b/tests/spec/gl-3.0/required-sized-texture-formats.c @@ -37,9 +37,10 @@ * in tables 3.16- 3.17:" */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) GLenum type_queries[CHANNELS] = { GL_TEXTURE_RED_TYPE, diff --git a/tests/spec/gl-3.0/required-texture-attachment-formats.c b/tests/spec/gl-3.0/required-texture-attachment-formats.c index 310fc5e01..7b64d8cc2 100644 --- a/tests/spec/gl-3.0/required-texture-attachment-formats.c +++ b/tests/spec/gl-3.0/required-texture-attachment-formats.c @@ -32,9 +32,10 @@ * 180 "Required Texture Formats". */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/gl-3.0/texture-integer.c b/tests/spec/gl-3.0/texture-integer.c index db97ba616..7cc65a57d 100644 --- a/tests/spec/gl-3.0/texture-integer.c +++ b/tests/spec/gl-3.0/texture-integer.c @@ -29,9 +29,9 @@ #include "piglit-util.h" - -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN(100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE); static const char *TestName = "texture-integer"; static GLint TexWidth = 16, TexHeight = 16; diff --git a/tests/spec/gl-3.1/minmax.c b/tests/spec/gl-3.1/minmax.c index d59c3ccd2..776361221 100644 --- a/tests/spec/gl-3.1/minmax.c +++ b/tests/spec/gl-3.1/minmax.c @@ -29,9 +29,10 @@ #include "piglit-util.h" #include "minmax-test.h" -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/glsl-1.10/execution/clipping/clip-plane-transformation.c b/tests/spec/glsl-1.10/execution/clipping/clip-plane-transformation.c index e4a60bce3..d38c2a796 100644 --- a/tests/spec/glsl-1.10/execution/clipping/clip-plane-transformation.c +++ b/tests/spec/glsl-1.10/execution/clipping/clip-plane-transformation.c @@ -170,8 +170,11 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) + GLint position_angle_loc; GLint clipVertex_angle_loc; bool use_ff = false; diff --git a/tests/spec/glsl-1.10/execution/glsl-render-after-bad-attach.c b/tests/spec/glsl-1.10/execution/glsl-render-after-bad-attach.c index b77096fb1..601fb508e 100644 --- a/tests/spec/glsl-1.10/execution/glsl-render-after-bad-attach.c +++ b/tests/spec/glsl-1.10/execution/glsl-render-after-bad-attach.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 10, piglit_height = 10; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) const char *vs_source = "void main()\n" diff --git a/tests/spec/glsl-1.20/recursion/recursion.c b/tests/spec/glsl-1.20/recursion/recursion.c index 6e36e46dd..21cae9daf 100644 --- a/tests/spec/glsl-1.20/recursion/recursion.c +++ b/tests/spec/glsl-1.20/recursion/recursion.c @@ -49,8 +49,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char simple_text[] = "#version 120\n" diff --git a/tests/spec/glsl-1.30/execution/clipping/max-clip-distances.c b/tests/spec/glsl-1.30/execution/clipping/max-clip-distances.c index f03366598..85a16e5a0 100644 --- a/tests/spec/glsl-1.30/execution/clipping/max-clip-distances.c +++ b/tests/spec/glsl-1.30/execution/clipping/max-clip-distances.c @@ -59,8 +59,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vert[] = "#version 130\n" diff --git a/tests/spec/glsl-1.30/execution/fs-discard-exit-2.c b/tests/spec/glsl-1.30/execution/fs-discard-exit-2.c index a24a92209..cee94c8d2 100644 --- a/tests/spec/glsl-1.30/execution/fs-discard-exit-2.c +++ b/tests/spec/glsl-1.30/execution/fs-discard-exit-2.c @@ -44,8 +44,10 @@ #include "piglit-util.h" -int piglit_width = 64, piglit_height = 64; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 64 /*window_width*/, + 64 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static int coord1_location, coord2_location; diff --git a/tests/spec/glsl-1.30/execution/fs-texelFetch-2D.c b/tests/spec/glsl-1.30/execution/fs-texelFetch-2D.c index 40a37c158..e1baac363 100644 --- a/tests/spec/glsl-1.30/execution/fs-texelFetch-2D.c +++ b/tests/spec/glsl-1.30/execution/fs-texelFetch-2D.c @@ -31,8 +31,10 @@ */ #include "piglit-util.h" -int piglit_width = 90, piglit_height = 150; -int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 90 /*window_width*/, + 150 /*window_height*/, + GLUT_RGBA | GLUT_DOUBLE) const int tex_size = 64; diff --git a/tests/spec/glsl-1.30/execution/fs-texelFetchOffset-2D.c b/tests/spec/glsl-1.30/execution/fs-texelFetchOffset-2D.c index e7be7ae1f..fac1c462e 100644 --- a/tests/spec/glsl-1.30/execution/fs-texelFetchOffset-2D.c +++ b/tests/spec/glsl-1.30/execution/fs-texelFetchOffset-2D.c @@ -31,8 +31,10 @@ */ #include "piglit-util.h" -int piglit_width = 90, piglit_height = 150; -int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 90 /*window_width*/, + 150 /*window_height*/, + GLUT_RGBA | GLUT_DOUBLE) const int tex_size = 64; diff --git a/tests/spec/glsl-1.30/execution/isinf-and-isnan.c b/tests/spec/glsl-1.30/execution/isinf-and-isnan.c index fedc298c6..d638cf5a7 100644 --- a/tests/spec/glsl-1.30/execution/isinf-and-isnan.c +++ b/tests/spec/glsl-1.30/execution/isinf-and-isnan.c @@ -110,9 +110,11 @@ #include "piglit-util.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) + static float gl_version; static GLint stock_vs; diff --git a/tests/spec/glsl-1.30/execution/vertexid-beginend.c b/tests/spec/glsl-1.30/execution/vertexid-beginend.c index 983376aa2..0b0198e18 100644 --- a/tests/spec/glsl-1.30/execution/vertexid-beginend.c +++ b/tests/spec/glsl-1.30/execution/vertexid-beginend.c @@ -29,9 +29,10 @@ #include "piglit-util.h" -int piglit_width = 70; -int piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 70 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char vs_text[] = "#version 130\n" diff --git a/tests/spec/glsl-1.30/execution/vertexid-drawarrays.c b/tests/spec/glsl-1.30/execution/vertexid-drawarrays.c index bd2ee68ce..ce5a432a3 100644 --- a/tests/spec/glsl-1.30/execution/vertexid-drawarrays.c +++ b/tests/spec/glsl-1.30/execution/vertexid-drawarrays.c @@ -29,9 +29,10 @@ #include "piglit-util.h" -int piglit_width = 70; -int piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 70 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char vs_text[] = "#version 130\n" diff --git a/tests/spec/glsl-1.30/execution/vertexid-drawelements.c b/tests/spec/glsl-1.30/execution/vertexid-drawelements.c index 257de9b0a..6c8f6980f 100644 --- a/tests/spec/glsl-1.30/execution/vertexid-drawelements.c +++ b/tests/spec/glsl-1.30/execution/vertexid-drawelements.c @@ -29,9 +29,10 @@ #include "piglit-util.h" -int piglit_width = 70; -int piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 70 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char vs_text[] = "#version 130\n" diff --git a/tests/spec/glsl-1.30/linker/clipping/mixing-clip-distance-and-clip-vertex-disallowed.c b/tests/spec/glsl-1.30/linker/clipping/mixing-clip-distance-and-clip-vertex-disallowed.c index 94c35652a..60f9d836a 100644 --- a/tests/spec/glsl-1.30/linker/clipping/mixing-clip-distance-and-clip-vertex-disallowed.c +++ b/tests/spec/glsl-1.30/linker/clipping/mixing-clip-distance-and-clip-vertex-disallowed.c @@ -36,8 +36,10 @@ */ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char vert[] = "#version 130\n" diff --git a/tests/spec/glsl-1.30/texel-offset-limits.c b/tests/spec/glsl-1.30/texel-offset-limits.c index 1b760659b..fe8f13056 100644 --- a/tests/spec/glsl-1.30/texel-offset-limits.c +++ b/tests/spec/glsl-1.30/texel-offset-limits.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 10, piglit_height = 10; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) enum piglit_result piglit_display() diff --git a/tests/spec/glsl-1.40/tf-no-position.c b/tests/spec/glsl-1.40/tf-no-position.c index 821f52460..50b475883 100644 --- a/tests/spec/glsl-1.40/tf-no-position.c +++ b/tests/spec/glsl-1.40/tf-no-position.c @@ -32,9 +32,10 @@ #define BUFFER_SIZE 4 -int piglit_width = 10; -int piglit_height = 10; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 10 /*window_width*/, + 10 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static const char *vs_source = "#version 140\n" diff --git a/tests/spec/nv_conditional_render/begin-while-active.c b/tests/spec/nv_conditional_render/begin-while-active.c index b5565f51d..d16869ba7 100644 --- a/tests/spec/nv_conditional_render/begin-while-active.c +++ b/tests/spec/nv_conditional_render/begin-while-active.c @@ -40,9 +40,10 @@ * OPERATION is generated." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/nv_conditional_render/begin-zero.c b/tests/spec/nv_conditional_render/begin-zero.c index cbe8f2d3b..008a7ce48 100644 --- a/tests/spec/nv_conditional_render/begin-zero.c +++ b/tests/spec/nv_conditional_render/begin-zero.c @@ -40,9 +40,10 @@ * OPERATION is generated." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/nv_conditional_render/bitmap.c b/tests/spec/nv_conditional_render/bitmap.c index 9c5efbe2c..3f35f3f6e 100644 --- a/tests/spec/nv_conditional_render/bitmap.c +++ b/tests/spec/nv_conditional_render/bitmap.c @@ -40,9 +40,10 @@ * 5.1) have no effect." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/nv_conditional_render/blitframebuffer.c b/tests/spec/nv_conditional_render/blitframebuffer.c index 61e72aa39..48367ee01 100644 --- a/tests/spec/nv_conditional_render/blitframebuffer.c +++ b/tests/spec/nv_conditional_render/blitframebuffer.c @@ -34,9 +34,10 @@ * accidentally disable during conditional rendering. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static void fill_tex(int level, int w, int h, const GLfloat *color) { diff --git a/tests/spec/nv_conditional_render/clear.c b/tests/spec/nv_conditional_render/clear.c index bec80f454..face8f466 100644 --- a/tests/spec/nv_conditional_render/clear.c +++ b/tests/spec/nv_conditional_render/clear.c @@ -40,9 +40,10 @@ * 5.1) have no effect." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/nv_conditional_render/copypixels.c b/tests/spec/nv_conditional_render/copypixels.c index 348fd2ab0..2d17d35e8 100644 --- a/tests/spec/nv_conditional_render/copypixels.c +++ b/tests/spec/nv_conditional_render/copypixels.c @@ -40,9 +40,10 @@ * 5.1) have no effect." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/nv_conditional_render/copyteximage.c b/tests/spec/nv_conditional_render/copyteximage.c index 67234de22..81c8ac98b 100644 --- a/tests/spec/nv_conditional_render/copyteximage.c +++ b/tests/spec/nv_conditional_render/copyteximage.c @@ -34,9 +34,10 @@ * accidentally disable during conditional rendering. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static void fill_tex(int level, int w, int h, const GLfloat *color) diff --git a/tests/spec/nv_conditional_render/copytexsubimage.c b/tests/spec/nv_conditional_render/copytexsubimage.c index 3ae84e7cd..debdeeebd 100644 --- a/tests/spec/nv_conditional_render/copytexsubimage.c +++ b/tests/spec/nv_conditional_render/copytexsubimage.c @@ -34,9 +34,10 @@ * accidentally disable during conditional rendering. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static void fill_tex(int level, int w, int h, const GLfloat *color) diff --git a/tests/spec/nv_conditional_render/dlist.c b/tests/spec/nv_conditional_render/dlist.c index afc89e77a..844e15bb5 100644 --- a/tests/spec/nv_conditional_render/dlist.c +++ b/tests/spec/nv_conditional_render/dlist.c @@ -30,9 +30,10 @@ * inside of display lists. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/nv_conditional_render/drawpixels.c b/tests/spec/nv_conditional_render/drawpixels.c index c65e65c87..d100712c6 100644 --- a/tests/spec/nv_conditional_render/drawpixels.c +++ b/tests/spec/nv_conditional_render/drawpixels.c @@ -40,9 +40,10 @@ * 5.1) have no effect." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/nv_conditional_render/generatemipmap.c b/tests/spec/nv_conditional_render/generatemipmap.c index 7fb332ffc..5ac8f6db5 100644 --- a/tests/spec/nv_conditional_render/generatemipmap.c +++ b/tests/spec/nv_conditional_render/generatemipmap.c @@ -33,9 +33,10 @@ * accidentally disable during conditional rendering. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static void fill_level(int level, int size, const GLfloat *color) diff --git a/tests/spec/nv_conditional_render/vertex_array.c b/tests/spec/nv_conditional_render/vertex_array.c index c7ce6ea7b..f8e64a022 100644 --- a/tests/spec/nv_conditional_render/vertex_array.c +++ b/tests/spec/nv_conditional_render/vertex_array.c @@ -41,9 +41,10 @@ * 5.1) have no effect." */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/spec/nv_texture_barrier/blending-in-shader.c b/tests/spec/nv_texture_barrier/blending-in-shader.c index 6b28ebfcc..334ef0742 100644 --- a/tests/spec/nv_texture_barrier/blending-in-shader.c +++ b/tests/spec/nv_texture_barrier/blending-in-shader.c @@ -29,9 +29,10 @@ #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) static GLuint tex, fbo, prog, texloc; static float tex_data[16*16*4], res_data[16*16*4]; diff --git a/tests/spec/oes_compressed_etc1_rgb8_texture/oes_compressed_etc1_rgb8_texture-basic.c b/tests/spec/oes_compressed_etc1_rgb8_texture/oes_compressed_etc1_rgb8_texture-basic.c index 2079d453f..6fa8b0101 100644 --- a/tests/spec/oes_compressed_etc1_rgb8_texture/oes_compressed_etc1_rgb8_texture-basic.c +++ b/tests/spec/oes_compressed_etc1_rgb8_texture/oes_compressed_etc1_rgb8_texture-basic.c @@ -27,9 +27,10 @@ #define GL_ETC1_RGB8_OES 0x8D64 #endif -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) struct etc1_rgb8_texture_8x8 { GLubyte data[32]; diff --git a/tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c b/tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c index 054c592fd..21ecee993 100644 --- a/tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c +++ b/tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c @@ -23,9 +23,10 @@ #include "piglit-util.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) struct test_vector { GLenum internal_format; diff --git a/tests/spec/oes_draw_texture/oes_draw_texture.c b/tests/spec/oes_draw_texture/oes_draw_texture.c index 623a40cdc..e81c2452b 100644 --- a/tests/spec/oes_draw_texture/oes_draw_texture.c +++ b/tests/spec/oes_draw_texture/oes_draw_texture.c @@ -34,8 +34,10 @@ #define TEXTURE_SIZE 2 -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH | GLUT_DOUBLE) /* see piglit_rgbw_texture */ static const float red[4] = { 1.0f, 0.0f, 0.0f, 0.0f }; diff --git a/tests/texturing/1-1-linear-texture.c b/tests/texturing/1-1-linear-texture.c index 2be7cd31e..dc4ee6643 100644 --- a/tests/texturing/1-1-linear-texture.c +++ b/tests/texturing/1-1-linear-texture.c @@ -31,9 +31,10 @@ #include "piglit-util.h" -int piglit_width = 100; -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define DATA_SIZE (piglit_width * piglit_height * 4) diff --git a/tests/texturing/array-texture.c b/tests/texturing/array-texture.c index 9029b5844..d45cd8d8c 100644 --- a/tests/texturing/array-texture.c +++ b/tests/texturing/array-texture.c @@ -31,9 +31,11 @@ #include "piglit-util.h" -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = 700; -int piglit_height = 400; +PIGLIT_GL_TEST_MAIN( + 700 /*window_width*/, + 400 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) + int height = 100, ybase = 0; static const char *prog = "array-texture"; diff --git a/tests/texturing/compressedteximage.c b/tests/texturing/compressedteximage.c index c49f20395..1d3d48d55 100644 --- a/tests/texturing/compressedteximage.c +++ b/tests/texturing/compressedteximage.c @@ -36,8 +36,10 @@ #define SIZE 128 -int piglit_width = (SIZE * 2) + 60, piglit_height = SIZE + 20; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + (SIZE * 2) + 60 /*window_width*/, + SIZE + 20 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) struct format { const char *name; diff --git a/tests/texturing/copyteximage-border.c b/tests/texturing/copyteximage-border.c index 13132a470..603b4789f 100644 --- a/tests/texturing/copyteximage-border.c +++ b/tests/texturing/copyteximage-border.c @@ -32,9 +32,10 @@ /* Size of the body of the texture, not counting border. */ #define TEX_SIZE 64 -int piglit_width = TEX_SIZE * 2 + 30; -int piglit_height = TEX_SIZE + 20; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + TEX_SIZE * 2 + 30 /*window_width*/, + TEX_SIZE + 20 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) enum piglit_result piglit_display(void) diff --git a/tests/texturing/copyteximage-clipping.c b/tests/texturing/copyteximage-clipping.c index 3e7b3bce1..7db2a332c 100644 --- a/tests/texturing/copyteximage-clipping.c +++ b/tests/texturing/copyteximage-clipping.c @@ -29,9 +29,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; - +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static GLboolean test(void) diff --git a/tests/texturing/copyteximage.c b/tests/texturing/copyteximage.c index 8115f32db..8dee0e712 100644 --- a/tests/texturing/copyteximage.c +++ b/tests/texturing/copyteximage.c @@ -32,9 +32,6 @@ #include "piglit-util.h" #define IMAGE_SIZE 16 - -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_ALPHA; - static const GLfloat fcolor[8][4] = { /* GL_RED */ {0.5, 0.0, 0.0, 1.0}, @@ -97,8 +94,10 @@ static const GLenum target[] = { GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP }; -int piglit_width = IMAGE_SIZE * (ARRAY_SIZE(test_vectors) + 1); -int piglit_height = IMAGE_SIZE; +PIGLIT_GL_TEST_MAIN( + IMAGE_SIZE * (ARRAY_SIZE(test_vectors) + 1) /*window_width*/, + IMAGE_SIZE /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_ALPHA) static const float texCoords_1d[2] = { 0.0, 1.0 }; static const float texCoords_2d[4][2] = { diff --git a/tests/texturing/copytexsubimage.c b/tests/texturing/copytexsubimage.c index c12cc5b42..f5fbbe35a 100644 --- a/tests/texturing/copytexsubimage.c +++ b/tests/texturing/copytexsubimage.c @@ -27,8 +27,10 @@ #include "piglit-util.h" -int piglit_width = 200, piglit_height = 200; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 200 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) /** Should GL_TEXTURE_RECTANGLE_ARB be tested? */ int have_rect = 0; diff --git a/tests/texturing/crossbar.c b/tests/texturing/crossbar.c index dd50d0ed5..babf7e81b 100644 --- a/tests/texturing/crossbar.c +++ b/tests/texturing/crossbar.c @@ -55,9 +55,10 @@ static const GLint tests[][8] = { #define NUM_TESTS (sizeof(tests) / sizeof(tests[0])) -int piglit_width = 100 * (NUM_TESTS + 1); -int piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 * (NUM_TESTS + 1) /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static void DoFrame( void ) { diff --git a/tests/texturing/cubemap.c b/tests/texturing/cubemap.c index fd21b50b8..5312dddf6 100644 --- a/tests/texturing/cubemap.c +++ b/tests/texturing/cubemap.c @@ -29,9 +29,10 @@ #define PAD 5 -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = (64 * 6 + PAD * 9) * 2; -int piglit_height = 400; +PIGLIT_GL_TEST_MAIN( + (64 * 6 + PAD * 9) * 2 /*window_width*/, + 400 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) int max_size; diff --git a/tests/texturing/depth-cube-map.c b/tests/texturing/depth-cube-map.c index 78cb86fb3..24ee1c31f 100644 --- a/tests/texturing/depth-cube-map.c +++ b/tests/texturing/depth-cube-map.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint tex; static GLint prog; diff --git a/tests/texturing/depth-level-clamp.c b/tests/texturing/depth-level-clamp.c index 6e94cb8f1..88554cc55 100644 --- a/tests/texturing/depth-level-clamp.c +++ b/tests/texturing/depth-level-clamp.c @@ -41,9 +41,10 @@ #define MAX_LOD 6 #define PAD 5 -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = (MAX_SIZE * 2 + PAD * 3); -int piglit_height = (MAX_SIZE * MAX_LOD + PAD * (MAX_LOD + 1)); +PIGLIT_GL_TEST_MAIN( + (MAX_SIZE * 2 + PAD * 3) /*window_width*/, + (MAX_SIZE * MAX_LOD + PAD * (MAX_LOD + 1)) /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static void set_level_value(int level, int size, float val) diff --git a/tests/texturing/depth-tex-compare.c b/tests/texturing/depth-tex-compare.c index 0babdee82..b9bcf0be9 100644 --- a/tests/texturing/depth-tex-compare.c +++ b/tests/texturing/depth-tex-compare.c @@ -36,9 +36,10 @@ #define BOX_SIZE 25 -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = 400; -int piglit_height = 300; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static GLuint tex; diff --git a/tests/texturing/depth-tex-modes-glsl.c b/tests/texturing/depth-tex-modes-glsl.c index 65c413e2d..a7fd3237d 100644 --- a/tests/texturing/depth-tex-modes-glsl.c +++ b/tests/texturing/depth-tex-modes-glsl.c @@ -30,8 +30,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint tex[3]; static GLint prog; diff --git a/tests/texturing/depth-tex-modes-rg.c b/tests/texturing/depth-tex-modes-rg.c index 048749505..fff21b6be 100644 --- a/tests/texturing/depth-tex-modes-rg.c +++ b/tests/texturing/depth-tex-modes-rg.c @@ -40,9 +40,10 @@ static const GLenum depth_texture_modes[] = { #define TEST_ROWS 4 #define TEST_COLS ARRAY_SIZE(depth_texture_modes) -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = 1 + (TEST_COLS * (BOX_SIZE + 1)); -int piglit_height = 1 + (TEST_ROWS * (BOX_SIZE + 1)); +PIGLIT_GL_TEST_MAIN( + 1 + (TEST_COLS * (BOX_SIZE + 1)) /*window_width*/, + 1 + (TEST_ROWS * (BOX_SIZE + 1)) /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) GLuint tex[2]; diff --git a/tests/texturing/depth-tex-modes.c b/tests/texturing/depth-tex-modes.c index 5cc4f9499..959dc17fc 100644 --- a/tests/texturing/depth-tex-modes.c +++ b/tests/texturing/depth-tex-modes.c @@ -40,9 +40,10 @@ static const GLenum depth_texture_modes[] = { #define TEST_ROWS 4 #define TEST_COLS ARRAY_SIZE(depth_texture_modes) -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = 1 + (TEST_COLS * (BOX_SIZE + 1)); -int piglit_height = 1 + (TEST_ROWS * (BOX_SIZE + 1)); +PIGLIT_GL_TEST_MAIN( + 1 + (TEST_COLS * (BOX_SIZE + 1)) /*window_width*/, + 1 + (TEST_ROWS * (BOX_SIZE + 1)) /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) GLuint tex[2]; diff --git a/tests/texturing/depthstencil-render-miplevels.cpp b/tests/texturing/depthstencil-render-miplevels.cpp index 0def329fa..43cd9a17e 100644 --- a/tests/texturing/depthstencil-render-miplevels.cpp +++ b/tests/texturing/depthstencil-render-miplevels.cpp @@ -86,9 +86,10 @@ #include "piglit-util.h" -int piglit_width = 16; -int piglit_height = 16; -int piglit_window_mode = GLUT_RGBA; +PIGLIT_GL_TEST_MAIN( + 16 /*window_width*/, + 16 /*window_height*/, + GLUT_RGBA) namespace { diff --git a/tests/texturing/fragment-and-vertex-texturing.c b/tests/texturing/fragment-and-vertex-texturing.c index 211b5ef2d..930bdb376 100644 --- a/tests/texturing/fragment-and-vertex-texturing.c +++ b/tests/texturing/fragment-and-vertex-texturing.c @@ -32,9 +32,10 @@ #include <string.h> #include "piglit-util.h" -int piglit_width = 128; -int piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static const char *vs_source = "uniform sampler2D vertex_tex; \n" diff --git a/tests/texturing/fxt1-teximage.c b/tests/texturing/fxt1-teximage.c index dc992acaa..be8a8398c 100644 --- a/tests/texturing/fxt1-teximage.c +++ b/tests/texturing/fxt1-teximage.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 300, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 300 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define SIZE 128 diff --git a/tests/texturing/gen-compressed-teximage.c b/tests/texturing/gen-compressed-teximage.c index e46714625..27b6f1129 100644 --- a/tests/texturing/gen-compressed-teximage.c +++ b/tests/texturing/gen-compressed-teximage.c @@ -38,8 +38,10 @@ #include "piglit-util.h" -int piglit_width = 512, piglit_height = 512; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 512 /*window_width*/, + 512 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define SIZE 128 diff --git a/tests/texturing/gen-nonzero-unit.c b/tests/texturing/gen-nonzero-unit.c index 728401869..c28117366 100644 --- a/tests/texturing/gen-nonzero-unit.c +++ b/tests/texturing/gen-nonzero-unit.c @@ -41,8 +41,10 @@ #include "piglit-util.h" -int piglit_width = 512, piglit_height = 512; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 512 /*window_width*/, + 512 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static PFNGLACTIVETEXTUREPROC ActiveTexture = NULL; diff --git a/tests/texturing/gen-teximage.c b/tests/texturing/gen-teximage.c index 324b46749..9dccea15e 100644 --- a/tests/texturing/gen-teximage.c +++ b/tests/texturing/gen-teximage.c @@ -38,8 +38,10 @@ #include "piglit-util.h" -int piglit_width = 512, piglit_height = 512; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 512 /*window_width*/, + 512 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define SIZE 128 diff --git a/tests/texturing/gen-texsubimage.c b/tests/texturing/gen-texsubimage.c index 7033f3d4d..220471001 100644 --- a/tests/texturing/gen-texsubimage.c +++ b/tests/texturing/gen-texsubimage.c @@ -35,8 +35,10 @@ #include "piglit-util.h" -int piglit_width = 512, piglit_height = 512; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 512 /*window_width*/, + 512 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static void display_mipmaps(int start_x, int start_y) { diff --git a/tests/texturing/getteximage-formats.c b/tests/texturing/getteximage-formats.c index f24c70958..d7a129d97 100644 --- a/tests/texturing/getteximage-formats.c +++ b/tests/texturing/getteximage-formats.c @@ -35,8 +35,10 @@ #include "piglit-util.h" #include "../fbo/fbo-formats.h" -int piglit_width = 600, piglit_height = 200; -int piglit_window_mode = GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 600 /*window_width*/, + 200 /*window_height*/, + GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "getteximage-formats"; diff --git a/tests/texturing/getteximage-luminance.c b/tests/texturing/getteximage-luminance.c index 37ee2bf06..521c7eab3 100644 --- a/tests/texturing/getteximage-luminance.c +++ b/tests/texturing/getteximage-luminance.c @@ -30,8 +30,11 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGBA | GLUT_DOUBLE) + static const char *TestName = "getteximage-luminance"; static float tolerance = 2.0 / 255.0; diff --git a/tests/texturing/getteximage-simple.c b/tests/texturing/getteximage-simple.c index d61f0a063..0abf5de5b 100644 --- a/tests/texturing/getteximage-simple.c +++ b/tests/texturing/getteximage-simple.c @@ -12,8 +12,11 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGBA | GLUT_DOUBLE) + static GLubyte data[4096]; /* 64*16*4 */ static int test_getteximage(void) diff --git a/tests/texturing/incomplete-texture.c b/tests/texturing/incomplete-texture.c index 6ebaf4a65..fc01557e8 100644 --- a/tests/texturing/incomplete-texture.c +++ b/tests/texturing/incomplete-texture.c @@ -31,9 +31,10 @@ #include "piglit-util.h" -int piglit_width = 150, piglit_height = 50; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 150 /*window_width*/, + 50 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define TEST_FIXED_FUNC 1 #define TEST_ARB_FP 2 diff --git a/tests/texturing/levelclamp.c b/tests/texturing/levelclamp.c index 26d2c267a..055258db2 100644 --- a/tests/texturing/levelclamp.c +++ b/tests/texturing/levelclamp.c @@ -36,9 +36,10 @@ #define MAX_LEVEL 5 #define PAD 5 -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = 500; -int piglit_height = 600; +PIGLIT_GL_TEST_MAIN( + 500 /*window_width*/, + 600 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static GLfloat colors[][3] = { {1.0, 0.0, 0.0}, diff --git a/tests/texturing/lodbias.c b/tests/texturing/lodbias.c index 4a49e9eb1..a6084bb6b 100644 --- a/tests/texturing/lodbias.c +++ b/tests/texturing/lodbias.c @@ -45,9 +45,11 @@ #define SquareSize 32 -int piglit_width = 3*SquareSize; -int piglit_height = 3*SquareSize; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 3*SquareSize /*window_width*/, + 3*SquareSize /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) + static int CurrentTest = 0; static int CurrentBias = 0; static int CurrentBias2 = 0; diff --git a/tests/texturing/lodclamp-between-max.c b/tests/texturing/lodclamp-between-max.c index 6559bb9fd..53438b868 100644 --- a/tests/texturing/lodclamp-between-max.c +++ b/tests/texturing/lodclamp-between-max.c @@ -38,9 +38,10 @@ #define MAX_LOD 5 #define PAD 5 -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = 100; -int piglit_height = 200; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 200 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static GLfloat colors[][3] = { {1.0, 0.0, 0.0}, diff --git a/tests/texturing/lodclamp-between.c b/tests/texturing/lodclamp-between.c index b84921248..704c7fe9c 100644 --- a/tests/texturing/lodclamp-between.c +++ b/tests/texturing/lodclamp-between.c @@ -38,9 +38,10 @@ #define MAX_LOD 5 #define PAD 5 -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = 100; -int piglit_height = 200; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 200 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static GLfloat colors[][3] = { {1.0, 0.0, 0.0}, diff --git a/tests/texturing/lodclamp.c b/tests/texturing/lodclamp.c index 4f844c6d6..861d78eda 100644 --- a/tests/texturing/lodclamp.c +++ b/tests/texturing/lodclamp.c @@ -36,9 +36,10 @@ #define MAX_LOD 5 #define PAD 5 -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = 500; -int piglit_height = 600; +PIGLIT_GL_TEST_MAIN( + 500 /*window_width*/, + 600 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) static GLfloat colors[][3] = { {1.0, 0.0, 0.0}, diff --git a/tests/texturing/max-texture-size.c b/tests/texturing/max-texture-size.c index 92316d43f..2355f529c 100644 --- a/tests/texturing/max-texture-size.c +++ b/tests/texturing/max-texture-size.c @@ -44,8 +44,10 @@ #include "piglit-util.h" #define COLOR_COMPONENTS 4 /*GL_RGBA*/ -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGBA | GLUT_DOUBLE) GLenum target[] = { GL_TEXTURE_1D, diff --git a/tests/texturing/mipmap-setup.c b/tests/texturing/mipmap-setup.c index 627ccc00d..b183a19d7 100644 --- a/tests/texturing/mipmap-setup.c +++ b/tests/texturing/mipmap-setup.c @@ -34,9 +34,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB; -int piglit_width = 200; -int piglit_height = 200; +PIGLIT_GL_TEST_MAIN( + 200 /*window_width*/, + 200 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB) #define MAX_LEVEL 7 diff --git a/tests/texturing/rg-draw-pixels.c b/tests/texturing/rg-draw-pixels.c index cbd4c34ad..b816f57ef 100644 --- a/tests/texturing/rg-draw-pixels.c +++ b/tests/texturing/rg-draw-pixels.c @@ -31,8 +31,10 @@ #include "piglit-util.h" #include "piglit-framework.h" -int piglit_width = 40, piglit_height = 30; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 40 /*window_width*/, + 30 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) void piglit_init(int argc, char **argv) diff --git a/tests/texturing/rg-teximage-01.c b/tests/texturing/rg-teximage-01.c index bf26428df..6bc4a449e 100644 --- a/tests/texturing/rg-teximage-01.c +++ b/tests/texturing/rg-teximage-01.c @@ -51,9 +51,10 @@ GLuint tex[Elements(internal_formats)]; const unsigned num_tex = Elements(tex); GLboolean pass = GL_TRUE; -int piglit_width = WIDTH * Elements(tex); -int piglit_height = HEIGHT; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + WIDTH * Elements(tex) /*window_width*/, + HEIGHT /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) void piglit_init(int argc, char **argv) diff --git a/tests/texturing/rg-teximage-02.c b/tests/texturing/rg-teximage-02.c index 86a93cb77..6019a74d1 100644 --- a/tests/texturing/rg-teximage-02.c +++ b/tests/texturing/rg-teximage-02.c @@ -51,9 +51,10 @@ GLuint tex[Elements(internal_formats)]; const unsigned num_tex = Elements(tex); GLboolean pass = GL_TRUE; -int piglit_width = WIDTH * Elements(tex); -int piglit_height = HEIGHT; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + WIDTH * Elements(tex) /*window_width*/, + HEIGHT /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) void piglit_init(int argc, char **argv) diff --git a/tests/texturing/rgtc-teximage-01.c b/tests/texturing/rgtc-teximage-01.c index fbb524f48..fff20d25e 100644 --- a/tests/texturing/rgtc-teximage-01.c +++ b/tests/texturing/rgtc-teximage-01.c @@ -52,9 +52,10 @@ GLuint tex[Elements(internal_formats)]; const unsigned num_tex = Elements(tex); GLboolean pass = GL_TRUE; -int piglit_width = WIDTH * Elements(tex); -int piglit_height = HEIGHT; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + WIDTH * Elements(tex) /*window_width*/, + HEIGHT /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) void piglit_init(int argc, char **argv) diff --git a/tests/texturing/rgtc-teximage-02.c b/tests/texturing/rgtc-teximage-02.c index 47780c374..ae73f71f7 100644 --- a/tests/texturing/rgtc-teximage-02.c +++ b/tests/texturing/rgtc-teximage-02.c @@ -52,9 +52,10 @@ GLuint tex[Elements(internal_formats)]; const unsigned num_tex = Elements(tex); GLboolean pass = GL_TRUE; -int piglit_width = WIDTH * Elements(tex); -int piglit_height = HEIGHT; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + WIDTH * Elements(tex) /*window_width*/, + HEIGHT /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) void piglit_init(int argc, char **argv) diff --git a/tests/texturing/s3tc-teximage.c b/tests/texturing/s3tc-teximage.c index 53cf1d227..f0e434879 100644 --- a/tests/texturing/s3tc-teximage.c +++ b/tests/texturing/s3tc-teximage.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 500, piglit_height = 600; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 500 /*window_width*/, + 600 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define SIZE 128 diff --git a/tests/texturing/s3tc-texsubimage.c b/tests/texturing/s3tc-texsubimage.c index 466bce37c..1c481f982 100644 --- a/tests/texturing/s3tc-texsubimage.c +++ b/tests/texturing/s3tc-texsubimage.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 500, piglit_height = 600; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 500 /*window_width*/, + 600 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define SIZE 128 diff --git a/tests/texturing/sampler-cube-shadow.c b/tests/texturing/sampler-cube-shadow.c index 1e123d8f1..2ae8ed7b4 100644 --- a/tests/texturing/sampler-cube-shadow.c +++ b/tests/texturing/sampler-cube-shadow.c @@ -34,8 +34,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint tex; static GLint prog; diff --git a/tests/texturing/shaders/texelFetch.c b/tests/texturing/shaders/texelFetch.c index 0d0205343..e9da3f7f9 100644 --- a/tests/texturing/shaders/texelFetch.c +++ b/tests/texturing/shaders/texelFetch.c @@ -78,8 +78,10 @@ */ #include "common.h" -int piglit_width = 355, piglit_height = 250; -int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 355 /*window_width*/, + 250 /*window_height*/, + GLUT_RGBA | GLUT_DOUBLE) /** Vertex shader attribute locations */ const int pos_loc = 0; diff --git a/tests/texturing/shaders/textureSize.c b/tests/texturing/shaders/textureSize.c index c194aa670..1e016bb3c 100644 --- a/tests/texturing/shaders/textureSize.c +++ b/tests/texturing/shaders/textureSize.c @@ -46,8 +46,10 @@ */ #include "common.h" -int piglit_width = 150, piglit_height = 30; -int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 150 /*window_width*/, + 30 /*window_height*/, + GLUT_RGBA | GLUT_DOUBLE) static int lod_location; static int vertex_location; diff --git a/tests/texturing/sized-texture-format-channels.c b/tests/texturing/sized-texture-format-channels.c index 89040e642..b3f3dc0db 100644 --- a/tests/texturing/sized-texture-format-channels.c +++ b/tests/texturing/sized-texture-format-channels.c @@ -48,9 +48,10 @@ * exactly match. */ -int piglit_width = 32; -int piglit_height = 32; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 32 /*window_width*/, + 32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGB | GLUT_ALPHA) GLenum type_queries[CHANNELS] = { GL_TEXTURE_RED_TYPE, diff --git a/tests/texturing/streaming-texture-leak.c b/tests/texturing/streaming-texture-leak.c index cfef9cc0d..87aac0638 100644 --- a/tests/texturing/streaming-texture-leak.c +++ b/tests/texturing/streaming-texture-leak.c @@ -38,8 +38,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define TEX_SIZE 1024 static int tex_buffer[TEX_SIZE * TEX_SIZE]; diff --git a/tests/texturing/tex-border-1.c b/tests/texturing/tex-border-1.c index badc9c5a6..d2f86fe19 100644 --- a/tests/texturing/tex-border-1.c +++ b/tests/texturing/tex-border-1.c @@ -39,9 +39,10 @@ #include "piglit-util.h" -int piglit_width = 50; -int piglit_height = 50; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 50 /*window_width*/, + 50 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) enum piglit_result piglit_display(void) diff --git a/tests/texturing/tex-miplevel-selection.c b/tests/texturing/tex-miplevel-selection.c index c065836f8..7625315d1 100644 --- a/tests/texturing/tex-miplevel-selection.c +++ b/tests/texturing/tex-miplevel-selection.c @@ -32,9 +32,10 @@ #include "piglit-util.h" -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; -int piglit_width = 900; -int piglit_height = 600; +PIGLIT_GL_TEST_MAIN( + 900 /*window_width*/, + 600 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define TEX_WIDTH 32 #define TEX_HEIGHT 32 diff --git a/tests/texturing/tex-skipped-unit.c b/tests/texturing/tex-skipped-unit.c index 31d6c1e73..ef003641d 100644 --- a/tests/texturing/tex-skipped-unit.c +++ b/tests/texturing/tex-skipped-unit.c @@ -31,9 +31,10 @@ #define TEXSIZE 32 -int piglit_width = TEXSIZE * 2; -int piglit_height = TEXSIZE * 2; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + TEXSIZE * 2 /*window_width*/, + TEXSIZE * 2 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) GLvoid draw_rect_tex(float x, float y, float w, float h, diff --git a/tests/texturing/tex-srgb.c b/tests/texturing/tex-srgb.c index 3f98ac726..b055c9bba 100644 --- a/tests/texturing/tex-srgb.c +++ b/tests/texturing/tex-srgb.c @@ -32,8 +32,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) #define SIZE 128 diff --git a/tests/texturing/tex-swizzle.c b/tests/texturing/tex-swizzle.c index 01211fac5..bd230edff 100644 --- a/tests/texturing/tex-swizzle.c +++ b/tests/texturing/tex-swizzle.c @@ -33,8 +33,10 @@ #include "piglit-util.h" -int piglit_width = 400, piglit_height = 300; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 400 /*window_width*/, + 300 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLuint tex[1]; diff --git a/tests/texturing/tex3d-maxsize.c b/tests/texturing/tex3d-maxsize.c index e49a2e3bf..03d0f478c 100644 --- a/tests/texturing/tex3d-maxsize.c +++ b/tests/texturing/tex3d-maxsize.c @@ -28,8 +28,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "tex3d-maxsize"; diff --git a/tests/texturing/tex3d-npot.c b/tests/texturing/tex3d-npot.c index b5b67a3ac..67fd28434 100644 --- a/tests/texturing/tex3d-npot.c +++ b/tests/texturing/tex3d-npot.c @@ -28,8 +28,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA) static GLuint Texture; diff --git a/tests/texturing/tex3d.c b/tests/texturing/tex3d.c index 42c24a046..272379be2 100644 --- a/tests/texturing/tex3d.c +++ b/tests/texturing/tex3d.c @@ -28,8 +28,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA) static GLuint Texture; diff --git a/tests/texturing/texdepth.c b/tests/texturing/texdepth.c index f7bdaafab..27b2f15a4 100644 --- a/tests/texturing/texdepth.c +++ b/tests/texturing/texdepth.c @@ -12,11 +12,13 @@ #define ROWS 4 #define COLS 8 - -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH; static int Width = COLS*32, Height = ROWS*32; -int piglit_width = COLS*32; -int piglit_height = ROWS*32; + +PIGLIT_GL_TEST_MAIN( + COLS*32 /*window_width*/, + ROWS*32 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH) + static int CellWidth, CellHeight; static int CurrentTest = 0; diff --git a/tests/texturing/teximage-errors.c b/tests/texturing/teximage-errors.c index 4a0aac7e3..6a93934b5 100644 --- a/tests/texturing/teximage-errors.c +++ b/tests/texturing/teximage-errors.c @@ -29,8 +29,10 @@ #include "piglit-util.h" -int piglit_width = 100, piglit_height = 100; -int piglit_window_mode = GLUT_RGB; +PIGLIT_GL_TEST_MAIN( + 100 /*window_width*/, + 100 /*window_height*/, + GLUT_RGB) static const char *TestName = "texture-errors"; diff --git a/tests/texturing/texrect-many.c b/tests/texturing/texrect-many.c index 06c7a96d9..0d4cc26fc 100644 --- a/tests/texturing/texrect-many.c +++ b/tests/texturing/texrect-many.c @@ -8,8 +8,10 @@ #include "piglit-util.h" -int piglit_width = 16 * 16, piglit_height = 11 * 16; -int piglit_window_mode = GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA; +PIGLIT_GL_TEST_MAIN( + 16 * 16 /*window_width*/, + 11 * 16 /*window_height*/, + GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA) static int NumTextures = 16; static GLuint Textures[16]; diff --git a/tests/texturing/texredefine.c b/tests/texturing/texredefine.c index 2f0676cac..e495f7fe8 100644 --- a/tests/texturing/texredefine.c +++ b/tests/texturing/texredefine.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const int CellSize = 8; /* see cell_coords */ diff --git a/tests/texturing/texsubimage.c b/tests/texturing/texsubimage.c index 9f8df8acc..d924d6ad5 100644 --- a/tests/texturing/texsubimage.c +++ b/tests/texturing/texsubimage.c @@ -35,9 +35,10 @@ #include "piglit-util.h" #include "../fbo/fbo-formats.h" -int piglit_width = 150, piglit_height = 150; -int piglit_window_mode = GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE; - +PIGLIT_GL_TEST_MAIN( + 150 /*window_width*/, + 150 /*window_height*/, + GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE) /** * This is a subset of the formats in fbo-formats.h diff --git a/tests/texturing/texture-al.c b/tests/texturing/texture-al.c index 22ec60909..417981133 100644 --- a/tests/texturing/texture-al.c +++ b/tests/texturing/texture-al.c @@ -31,8 +31,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "texture-al"; diff --git a/tests/texturing/texture-packed-formats.c b/tests/texturing/texture-packed-formats.c index 46c9d1273..db80d5ab5 100644 --- a/tests/texturing/texture-packed-formats.c +++ b/tests/texturing/texture-packed-formats.c @@ -39,9 +39,10 @@ #include <string.h> #include "piglit-util.h" -int piglit_width = 700; -int piglit_height = 620; -int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 700 /*window_width*/, + 620 /*window_height*/, + GLUT_RGB | GLUT_DOUBLE) static GLboolean PrintInfo = GL_TRUE; diff --git a/tests/texturing/texture-rg.c b/tests/texturing/texture-rg.c index 4831c4bc8..614acce59 100644 --- a/tests/texturing/texture-rg.c +++ b/tests/texturing/texture-rg.c @@ -29,8 +29,10 @@ #include "piglit-util.h" -int piglit_width = 128, piglit_height = 128; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; +PIGLIT_GL_TEST_MAIN( + 128 /*window_width*/, + 128 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) static const char *TestName = "texture-rg"; diff --git a/tests/texturing/texwrap.c b/tests/texturing/texwrap.c index cafa4492a..46f1d2dee 100644 --- a/tests/texturing/texwrap.c +++ b/tests/texturing/texwrap.c @@ -383,8 +383,12 @@ static int bsize_x = 1, bsize_y = 1, bsize_z = 1; /* size + 2*border */ static int border_x = 0, border_y = 0, border_z = 0; /* 0 or 1 */ /* Piglit stuff. */ -int piglit_width = 872, piglit_height = 230; -int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; + +PIGLIT_GL_TEST_MAIN( + 872 /*window_width*/, + 230 /*window_height*/, + GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE) + extern int piglit_automatic; |