This will allow us to mark piglit tests suitable for KHR_no_error
testing, and skip those that aren't.

Everything is marked as PIGLIT_UNKNOWN_ERROR_STATUS by default.
---
 tests/util/piglit-framework-gl.c |  2 ++
 tests/util/piglit-framework-gl.h | 11 +++++++++++
 2 files changed, 13 insertions(+)

diff --git a/tests/util/piglit-framework-gl.c b/tests/util/piglit-framework-gl.c
index 001b23a..3bd7b7b 100644
--- a/tests/util/piglit-framework-gl.c
+++ b/tests/util/piglit-framework-gl.c
@@ -74,20 +74,22 @@ piglit_gl_test_config_init(struct piglit_gl_test_config 
*config)
        memset(config, 0, sizeof(*config));
 
        if (!override_size(config)) {
                /* Default window size.  Note: Win8's min window width */
                /* seems to be 160 pixels.  When the window size is */
                /* unexpectedly resized, tests are marked as "WARN". */
                /* Let's use a larger default to avoid that. */
                config->window_width = 160;
                config->window_height = 160;
        }
+
+       config->khr_no_error_support = PIGLIT_UNKNOWN_ERROR_STATUS;
 }
 
 static void
 delete_arg(char *argv[], int argc, int arg)
 {
        int i;
 
        for (i = arg + 1; i < argc; i++) {
                argv[i - 1] = argv[i];
        }
diff --git a/tests/util/piglit-framework-gl.h b/tests/util/piglit-framework-gl.h
index ecf5b5c..afaa6bb 100644
--- a/tests/util/piglit-framework-gl.h
+++ b/tests/util/piglit-framework-gl.h
@@ -35,20 +35,26 @@
  */
 enum piglit_gl_visual {
        PIGLIT_GL_VISUAL_RGB            = 1 << 0,
        PIGLIT_GL_VISUAL_RGBA           = 1 << 1,
        PIGLIT_GL_VISUAL_DOUBLE         = 1 << 2,
        PIGLIT_GL_VISUAL_ACCUM          = 1 << 3,
        PIGLIT_GL_VISUAL_DEPTH          = 1 << 4,
        PIGLIT_GL_VISUAL_STENCIL        = 1 << 5
 };
 
+enum piglit_khr_no_error_support {
+       PIGLIT_HAS_ERRORS,
+       PIGLIT_NO_ERRORS,
+       PIGLIT_UNKNOWN_ERROR_STATUS
+};
+
 /**
  * @brief Configuration for running an OpenGL test.
  *
  * To run a test, pass this to piglit_gl_test_run().
  *
  * This is named piglit_gl_test_config, rather than piglit_test_config, in
  * order to distinguish it from other test types, such as EGL and GLX tests.
  *
  * At least one of the `supports` fields must be set.
  *
@@ -195,20 +201,25 @@ struct piglit_gl_test_config {
        const struct piglit_subtest *subtests;
 
        /**
         * Names of subtests supplied on the command line.
         *
         * The paramaters passed to each -subtest command line option is
         * stored here in the order of appearance on the command line.
         */
        const char **selected_subtests;
        size_t num_selected_subtests;
+
+       /**
+        * enum used for markin test as supporting KHR_no_error or not.
+        */
+       enum piglit_khr_no_error_support khr_no_error_support;
 };
 
 /**
  * Initialize @a config with default values, some of which may come
  * from command line arguments.
  */
 void
 piglit_gl_test_config_init(struct piglit_gl_test_config *config);
 
 void
-- 
2.9.3

_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to