summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/egl/egl-util.c6
-rw-r--r--tests/egl/egl-util.h6
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/egl/egl-util.c b/tests/egl/egl-util.c
index 519c09fa9..41fc31f79 100644
--- a/tests/egl/egl-util.c
+++ b/tests/egl/egl-util.c
@@ -45,6 +45,8 @@ egl_init_test(struct egl_test *test)
test->config_attribs = egl_default_attribs;
test->draw = NULL;
test->extensions = no_extensions;
+ test->window_width = egl_default_window_width;
+ test->window_height = egl_default_window_height;
}
EGLSurface
@@ -203,8 +205,8 @@ egl_util_run(const struct egl_test *test, int argc, char *argv[])
piglit_report_result(PIGLIT_FAIL);
}
- state.width = 300;
- state.height = 300;
+ state.width = test->window_width;
+ state.height = test->window_height;
create_window(&state);
state.surf = eglCreateWindowSurface(state.egl_dpy,
diff --git a/tests/egl/egl-util.h b/tests/egl/egl-util.h
index e796cd7c3..87c2db377 100644
--- a/tests/egl/egl-util.h
+++ b/tests/egl/egl-util.h
@@ -33,9 +33,10 @@ struct egl_test {
const EGLint *config_attribs;
const char **extensions;
enum piglit_result (*draw)(struct egl_state *state);
+ EGLint window_width;
+ EGLint window_height;
};
-
static const EGLint egl_default_attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PIXMAP_BIT | EGL_PBUFFER_BIT,
EGL_RED_SIZE, 1,
@@ -46,6 +47,9 @@ static const EGLint egl_default_attribs[] = {
EGL_NONE
};
+static const EGLint egl_default_window_width = 300;
+static const EGLint egl_default_window_height = 300;
+
/**
* \brief Initialize test to default values.
*/