Commit 291b4ec3 authored by Chad Versace's avatar Chad Versace

util: Add fields to piglit_gl_test_config for listing supported GL flavors (v2)

This patch has 3 interrelated components.

1) Add the following fields to piglit_gl_test_config:
    supports_gl_core_version
    supports_gl_compat_version
    supports_gl_es1
    supports_gl_es2

These allow a test to specify what GL flavors under which it can run.  For
details, see the documentation for struct piglit_gl_test_config.

2. In tests/util/piglit-framework-gl, implement support for the new
fields.

3. In each GL test source, add one of the new fields to the
PIGLIT_GL_TEST_CONFIG_BEGIN/END block.

For GLES1 tests, add `supports_gl_es1 = true`. For GLES2 tests, add
`supports_gl_es2 = true`.  For desktop GL tests, add
`supports_gl_compat_version = 10`. For an explanation of why version 1.0
is used for desktop GL tests, see the documentation for
supports_gl_compat_version. No tests yet require a GL core context.

v2: Replace silly sum of booleans with a logical conjuction. For Anholt.
Reviewed-and-tested-by: Jordan Justen's avatarJordan Justen <jordan.l.justen@intel.com>
Tested-by: Paul Berry's avatarPaul Berry <stereotype441@gmail.com>
Acked-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
parent cdfabf52
......@@ -32,6 +32,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 250;
config.window_height = 250;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_SINGLE | PIGLIT_GL_VISUAL_DEPTH;
......
......@@ -10,6 +10,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 100;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
......
......@@ -11,6 +11,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 100;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
......
......@@ -38,6 +38,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 100;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
......
......@@ -7,6 +7,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 128;
config.window_height = 128;
config.window_visual = PIGLIT_GL_VISUAL_SINGLE | PIGLIT_GL_VISUAL_RGB;
......
......@@ -34,6 +34,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 128;
config.window_height = 128;
config.window_visual = PIGLIT_GL_VISUAL_SINGLE | PIGLIT_GL_VISUAL_RGB;
......
......@@ -38,6 +38,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 128;
config.window_height = 128;
config.window_visual = PIGLIT_GL_VISUAL_RGB;
......
......@@ -27,6 +27,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 400;
config.window_height = 300;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
......
......@@ -7,6 +7,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 250;
config.window_height = 250;
config.window_visual = PIGLIT_GL_VISUAL_SINGLE | PIGLIT_GL_VISUAL_RGB;
......
......@@ -28,6 +28,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 100;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_STENCIL;
......
......@@ -28,6 +28,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 100;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_STENCIL;
......
......@@ -36,6 +36,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 16;
config.window_height = 16;
config.window_visual = PIGLIT_GL_VISUAL_RGBA;
......
......@@ -42,6 +42,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = (BOX_SIZE+2)*TEST_COLS+1;
config.window_height = (BOX_SIZE+1)+1;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
......
......@@ -28,6 +28,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 100;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_STENCIL;
......
......@@ -2,6 +2,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 512;
config.window_height = 512;
config.window_visual = PIGLIT_GL_VISUAL_RGBA;
......
......@@ -7,6 +7,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 100;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
......
......@@ -36,6 +36,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 1+((BOX_SIZE+1)*TEST_COLS);
config.window_height = 1+((BOX_SIZE+1)*TEST_ROWS);
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
......
......@@ -19,6 +19,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 100;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
......
......@@ -34,6 +34,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 256;
config.window_height = 128;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
......
......@@ -32,6 +32,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 400;
config.window_height = 400;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
......
......@@ -34,6 +34,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 100;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
......
......@@ -37,6 +37,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 50;
config.window_height = 20;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_DEPTH;
......
......@@ -38,6 +38,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 200;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
......
......@@ -35,6 +35,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 128;
config.window_height = 128;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_ALPHA | PIGLIT_GL_VISUAL_DOUBLE;
......
......@@ -32,6 +32,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 128;
config.window_height = 64;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_ALPHA | PIGLIT_GL_VISUAL_DOUBLE;
......
......@@ -34,6 +34,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 32;
config.window_height = 32;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_ALPHA;
......
......@@ -33,6 +33,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 32;
config.window_height = 32;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_ALPHA;
......
......@@ -40,6 +40,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 200;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
......
......@@ -35,6 +35,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 100;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
......
......@@ -32,6 +32,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 128;
config.window_height = 64;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_ALPHA | PIGLIT_GL_VISUAL_DOUBLE;
......
......@@ -40,6 +40,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 150;
config.window_height = 150;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_STENCIL | PIGLIT_GL_VISUAL_DEPTH;
......
......@@ -53,6 +53,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = DSTW;
config.window_height = DSTH;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
......
......@@ -38,6 +38,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 150;
config.window_height = 150;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
......
......@@ -39,6 +39,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 700;
config.window_height = 300;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_ALPHA;
......
......@@ -36,6 +36,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 700;
config.window_height = 300;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
......
......@@ -31,6 +31,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 512;
config.window_height = 32;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_ALPHA | PIGLIT_GL_VISUAL_DOUBLE;
......
......@@ -35,6 +35,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 150;
config.window_height = 150;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
......
......@@ -40,6 +40,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = TEX_WIDTH;
config.window_height = TEX_HEIGHT;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
......
......@@ -38,6 +38,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 700;
config.window_height = 300;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
......
......@@ -38,6 +38,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_width = 200;
config.window_height = 100;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
......
......@@ -43,6 +43,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;