summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-09-23 16:47:31 -0700
committerChad Versace <chad.versace@linux.intel.com>2012-10-09 19:08:30 -0700
commit8ed4af46b76cb7fe74ed6d228302141f66d49dc4 (patch)
tree73a0258bf8312965d3449b4f16dd2264377cd02d
parente84526ebad70f5cdb052f7d78d581556b548b969 (diff)
util: Rename piglit_gl_test_info -> piglit_gl_test_config
This structure's name didn't reflect its purpose well. Does it contain information about the test file? Analysis of the testrun postmortem? This rename also prepares for the next commit, which converts use of PIGLIT_GL_TEST_MAIN to a set of new macros, PIGLIT_GL_TEST_CONFIG_BEGIN/END. It's nice to have the structure modified by PIGLIT_GL_TEST_CONFIG_BEGIN to actually be named 'config'. Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Paul Berry <stereotype441@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--tests/util/piglit-framework-fbo.c10
-rw-r--r--tests/util/piglit-framework-fbo.h6
-rw-r--r--tests/util/piglit-framework-gl.c20
-rw-r--r--tests/util/piglit-framework-gl.h32
-rw-r--r--tests/util/piglit-framework-glut.c18
-rw-r--r--tests/util/piglit-framework-glut.h6
6 files changed, 46 insertions, 46 deletions
diff --git a/tests/util/piglit-framework-fbo.c b/tests/util/piglit-framework-fbo.c
index 713a31971..23ac311b2 100644
--- a/tests/util/piglit-framework-fbo.c
+++ b/tests/util/piglit-framework-fbo.c
@@ -232,7 +232,7 @@ piglit_framework_fbo_waffle_destroy(void)
#endif
static bool
-piglit_framework_fbo_gl_init(const struct piglit_gl_test_info *info)
+piglit_framework_fbo_gl_init(const struct piglit_gl_test_config *info)
{
#ifdef PIGLIT_FRAMEWORK_FBO_DISABLED
return false;
@@ -303,7 +303,7 @@ piglit_framework_fbo_gl_init(const struct piglit_gl_test_info *info)
}
bool
-piglit_framework_fbo_init(const struct piglit_gl_test_info *info)
+piglit_framework_fbo_init(const struct piglit_gl_test_config *config)
{
#if defined(PIGLIT_FRAMEWORK_FBO_USE_GLX)
piglit_framework_fbo_glx_init();
@@ -311,7 +311,7 @@ piglit_framework_fbo_init(const struct piglit_gl_test_info *info)
piglit_framework_fbo_waffle_init();
#endif
- return piglit_framework_fbo_gl_init(info);
+ return piglit_framework_fbo_gl_init(config);
}
static void
@@ -331,9 +331,9 @@ piglit_framework_fbo_destroy(void)
}
void
-piglit_framework_fbo_run(const struct piglit_gl_test_info *info)
+piglit_framework_fbo_run(const struct piglit_gl_test_config *config)
{
- enum piglit_result result = info->display();
+ enum piglit_result result = config->display();
piglit_framework_fbo_destroy();
piglit_report_result(result);
}
diff --git a/tests/util/piglit-framework-fbo.h b/tests/util/piglit-framework-fbo.h
index 08f13e2b7..ec07c41d1 100644
--- a/tests/util/piglit-framework-fbo.h
+++ b/tests/util/piglit-framework-fbo.h
@@ -23,13 +23,13 @@
#include <stdbool.h>
-struct piglit_gl_test_info;
+struct piglit_gl_test_config;
bool
-piglit_framework_fbo_init(const struct piglit_gl_test_info *info);
+piglit_framework_fbo_init(const struct piglit_gl_test_config *config);
void
-piglit_framework_fbo_run(const struct piglit_gl_test_info *info);
+piglit_framework_fbo_run(const struct piglit_gl_test_config *config);
void
piglit_framework_fbo_swap_buffers(void);
diff --git a/tests/util/piglit-framework-gl.c b/tests/util/piglit-framework-gl.c
index a6e46531a..bc0d460a9 100644
--- a/tests/util/piglit-framework-gl.c
+++ b/tests/util/piglit-framework-gl.c
@@ -45,9 +45,9 @@ int piglit_width;
int piglit_height;
void
-piglit_gl_test_info_init(struct piglit_gl_test_info *info)
+piglit_gl_test_config_init(struct piglit_gl_test_config *config)
{
- memset(info, 0, sizeof(*info));
+ memset(config, 0, sizeof(*config));
}
static void
@@ -115,27 +115,27 @@ process_args(int *argc, char *argv[])
void
piglit_gl_test_run(int argc, char *argv[],
- const struct piglit_gl_test_info *info)
+ const struct piglit_gl_test_config *config)
{
process_args(&argc, argv);
- piglit_width = info->window_width;
- piglit_height = info->window_height;
+ piglit_width = config->window_width;
+ piglit_height = config->window_height;
if (piglit_use_fbo) {
- if (!piglit_framework_fbo_init(info))
+ if (!piglit_framework_fbo_init(config))
piglit_use_fbo = false;
}
if (!piglit_use_fbo)
- piglit_framework_glut_init(argc, argv, info);
+ piglit_framework_glut_init(argc, argv, config);
- info->init(argc, argv);
+ config->init(argc, argv);
if (piglit_use_fbo) {
- piglit_framework_fbo_run(info);
+ piglit_framework_fbo_run(config);
} else {
- piglit_framework_glut_run(info);
+ piglit_framework_glut_run(config);
}
assert(false);
diff --git a/tests/util/piglit-framework-gl.h b/tests/util/piglit-framework-gl.h
index 917cdccda..3310d294b 100644
--- a/tests/util/piglit-framework-gl.h
+++ b/tests/util/piglit-framework-gl.h
@@ -34,7 +34,7 @@
* Each enum has the same value of its corresponding GLUT enum. That is, for
* each X, `PIGLIT_GL_VISUAL_X == GLUT_X`.
*
- * \see piglit_gl_test_info::window_visual
+ * \see piglit_gl_test_config::window_visual
*/
enum piglit_gl_visual {
PIGLIT_GL_VISUAL_RGB = 0,
@@ -48,17 +48,17 @@ enum piglit_gl_visual {
};
/**
- * @brief Info needed to run an OpenGL test.
+ * @brief Configuration for running an OpenGL test.
*
* To run a test, pass this to piglit_gl_test_run().
*
- * This is named piglit_gl_test_info, rather than piglit_test_info, in
+ * 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.
*
* TODO: Add fields here that declare test requirements on GL context
* TODO: flavor, extensions, and window system.
*/
-struct piglit_gl_test_info {
+struct piglit_gl_test_config {
int window_width;
int window_height;
@@ -84,17 +84,17 @@ struct piglit_gl_test_info {
};
/**
- * Initialize @a info with default values.
+ * Initialize @a config with default values.
*/
void
-piglit_gl_test_info_init(struct piglit_gl_test_info *info);
+piglit_gl_test_config_init(struct piglit_gl_test_config *config);
/**
- * Run the OpenGL test described by @a info. Does not return.
+ * Run the OpenGL test described by @a config. Does not return.
*/
void
piglit_gl_test_run(int argc, char *argv[],
- const struct piglit_gl_test_info *info);
+ const struct piglit_gl_test_config *config);
#ifdef __cplusplus
# define PIGLIT_EXTERN_C_BEGIN extern "C" {
@@ -125,18 +125,18 @@ piglit_gl_test_run(int argc, char *argv[],
int \
main(int argc, char *argv[]) \
{ \
- struct piglit_gl_test_info info; \
+ struct piglit_gl_test_config config; \
\
- piglit_gl_test_info_init(&info); \
+ piglit_gl_test_config_init(&config); \
\
- info.window_width = _window_width; \
- info.window_height = _window_height; \
- info.window_visual = _window_visual; \
+ config.window_width = _window_width; \
+ config.window_height = _window_height; \
+ config.window_visual = _window_visual; \
\
- info.init = piglit_init; \
- info.display = piglit_display; \
+ config.init = piglit_init; \
+ config.display = piglit_display; \
\
- piglit_gl_test_run(argc, argv, &info); \
+ piglit_gl_test_run(argc, argv, &config); \
\
assert(false); \
return 0; \
diff --git a/tests/util/piglit-framework-glut.c b/tests/util/piglit-framework-glut.c
index 6510df6ea..fa5fcca71 100644
--- a/tests/util/piglit-framework-glut.c
+++ b/tests/util/piglit-framework-glut.c
@@ -41,7 +41,7 @@
* This global variable exists because GLUT's API requires that data be passed
* to the display function via a global. Ugh, what an awful API.
*/
-static const struct piglit_gl_test_info *test_info;
+static const struct piglit_gl_test_config *test_config;
static int piglit_window;
static enum piglit_result result;
@@ -50,7 +50,7 @@ static enum piglit_result result;
static void
display(void)
{
- result = test_info->display();
+ result = test_config->display();
if (piglit_automatic) {
glutDestroyWindow(piglit_window);
@@ -95,12 +95,12 @@ piglit_present_results()
void
piglit_framework_glut_init(int argc, char *argv[],
- const struct piglit_gl_test_info *info)
+ const struct piglit_gl_test_config *config)
{
- if (test_info != NULL)
+ if (test_config != NULL)
assert(!"already init");
- test_info = info;
+ test_config = config;
glutInit(&argc, argv);
# if defined(PIGLIT_USE_WAFFLE)
@@ -116,9 +116,9 @@ piglit_framework_glut_init(int argc, char *argv[],
# endif
glutInitWindowPosition(0, 0);
- glutInitWindowSize(info->window_width,
- info->window_height);
- glutInitDisplayMode(info->window_visual);
+ glutInitWindowSize(config->window_width,
+ config->window_height);
+ glutInitDisplayMode(config->window_visual);
piglit_window = glutCreateWindow(argv[0]);
#if defined(PIGLIT_USE_GLX) && !defined(PIGLIT_USE_WAFFLE)
@@ -142,7 +142,7 @@ piglit_framework_glut_init(int argc, char *argv[],
}
void
-piglit_framework_glut_run(const struct piglit_gl_test_info *info)
+piglit_framework_glut_run(const struct piglit_gl_test_config *config)
{
glutMainLoop();
piglit_report_result(result);
diff --git a/tests/util/piglit-framework-glut.h b/tests/util/piglit-framework-glut.h
index 816d10ea7..5024d7c3f 100644
--- a/tests/util/piglit-framework-glut.h
+++ b/tests/util/piglit-framework-glut.h
@@ -23,14 +23,14 @@
#pragma once
-struct piglit_gl_test_info;
+struct piglit_gl_test_config;
void
piglit_framework_glut_init(int argc, char *argv[],
- const struct piglit_gl_test_info *info);
+ const struct piglit_gl_test_config *config);
void
-piglit_framework_glut_run(const struct piglit_gl_test_info *info);
+piglit_framework_glut_run(const struct piglit_gl_test_config *config);
void