From fc24a541cc0d242e8d1e641b3015c4b0ceb8ffec Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Fri, 14 May 2010 11:28:32 -0400 Subject: Add test for EGL_NOK_texture_from_pixmap Generalize the egl-util code a bit as well. --- tests/egl/egl-util.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'tests/egl/egl-util.h') diff --git a/tests/egl/egl-util.h b/tests/egl/egl-util.h index 870ee8a0a..f44a79e49 100644 --- a/tests/egl/egl-util.h +++ b/tests/egl/egl-util.h @@ -8,11 +8,28 @@ #include #include +struct egl_state { + Display *dpy; + Window win; + EGLDisplay egl_dpy; + EGLConfig cfg; + EGLContext ctx; + EGLSurface surf; + EGLint major, minor; + int depth; + int width; + int height; +}; + struct egl_test { const char **extensions; - enum piglit_result (*draw)(EGLDisplay egl_dpy, EGLSurface surf); + enum piglit_result (*draw)(struct egl_state *state); }; -int egl_run(const struct egl_test *test, int argc, char *argv[]); +EGLSurface +egl_util_create_pixmap(struct egl_state *state, + int width, int height, const EGLint *attribs); + +int egl_util_run(const struct egl_test *test, int argc, char *argv[]); #endif -- cgit v1.2.3