[Piglit] [PATCH 3/4] egl tests : pass wanted attributes for EGL config
Tapani Pälli
tapani.palli at intel.com
Tue May 24 01:02:03 PDT 2011
---
tests/egl/egl-create-surface.c | 11 +++++++++++
tests/egl/egl-nok-swap-region.c | 11 +++++++++++
tests/egl/egl-nok-texture-from-pixmap.c | 11 +++++++++++
3 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/tests/egl/egl-create-surface.c b/tests/egl/egl-create-surface.c
index 83ac510..4481446 100644
--- a/tests/egl/egl-create-surface.c
+++ b/tests/egl/egl-create-surface.c
@@ -43,6 +43,16 @@ static const EGLint pixmap_attribs[] = {
EGL_NONE
};
+static const EGLint attribs[] = {
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PIXMAP_BIT | EGL_PBUFFER_BIT,
+ EGL_RED_SIZE, 1,
+ EGL_GREEN_SIZE, 1,
+ EGL_BLUE_SIZE, 1,
+ EGL_DEPTH_SIZE, 1,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
+ EGL_NONE
+};
+
static enum piglit_result
draw(struct egl_state *state)
{
@@ -70,6 +80,7 @@ draw(struct egl_state *state)
static const char *extensions[] = { NULL };
static const struct egl_test test = {
+ .config_attribs = attribs,
.extensions = extensions,
.draw = draw
};
diff --git a/tests/egl/egl-nok-swap-region.c b/tests/egl/egl-nok-swap-region.c
index 1da2d1b..993a407 100644
--- a/tests/egl/egl-nok-swap-region.c
+++ b/tests/egl/egl-nok-swap-region.c
@@ -35,6 +35,16 @@
const char *extensions[] = { "EGL_NOK_swap_region", NULL };
+static const EGLint attribs[] = {
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PIXMAP_BIT | EGL_PBUFFER_BIT,
+ EGL_RED_SIZE, 1,
+ EGL_GREEN_SIZE, 1,
+ EGL_BLUE_SIZE, 1,
+ EGL_DEPTH_SIZE, 1,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
+ EGL_NONE
+};
+
static enum piglit_result
draw(struct egl_state *state)
{
@@ -73,6 +83,7 @@ draw(struct egl_state *state)
}
static const struct egl_test test = {
+ .config_attribs = attribs,
.extensions = extensions,
.draw = draw
};
diff --git a/tests/egl/egl-nok-texture-from-pixmap.c b/tests/egl/egl-nok-texture-from-pixmap.c
index 0c6dc9a..337da1a 100644
--- a/tests/egl/egl-nok-texture-from-pixmap.c
+++ b/tests/egl/egl-nok-texture-from-pixmap.c
@@ -41,6 +41,16 @@ static const EGLint pixmap_attribs[] = {
EGL_NONE
};
+static const EGLint attribs[] = {
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PIXMAP_BIT | EGL_PBUFFER_BIT,
+ EGL_RED_SIZE, 1,
+ EGL_GREEN_SIZE, 1,
+ EGL_BLUE_SIZE, 1,
+ EGL_DEPTH_SIZE, 1,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
+ EGL_NONE
+};
+
static enum piglit_result
draw(struct egl_state *state)
{
@@ -101,6 +111,7 @@ draw(struct egl_state *state)
}
static const struct egl_test test = {
+ .config_attribs = attribs,
.extensions = extensions,
.draw = draw
};
--
1.7.5.1
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the Piglit
mailing list