[Mesa-dev] [PATCH 04/10] egl: Rename ClientVersion to ClientMajorVersion, add ClientMinorVersion
Ian Romanick
idr at freedesktop.org
Wed Aug 8 10:57:43 PDT 2012
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/egl/drivers/dri2/egl_dri2.c | 4 ++--
src/egl/main/eglcontext.c | 9 +++++----
src/egl/main/eglcontext.h | 3 ++-
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 3bf46aa..4cd2d13 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -654,7 +654,7 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
switch (dri2_ctx->base.ClientAPI) {
case EGL_OPENGL_ES_API:
- switch (dri2_ctx->base.ClientVersion) {
+ switch (dri2_ctx->base.ClientMajorVersion) {
case 1:
api = __DRI_API_GLES;
break;
@@ -701,7 +701,7 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
unsigned error;
const uint32_t ctx_attribs[2] = {
__DRI_CTX_ATTRIB_MAJOR_VERSION,
- dri2_ctx->base.ClientVersion
+ dri2_ctx->base.ClientMajorVersion
};
dri2_ctx->dri_context =
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index fa60749..55d6865 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -49,7 +49,7 @@ _eglGetContextAPIBit(_EGLContext *ctx)
switch (ctx->ClientAPI) {
case EGL_OPENGL_ES_API:
- switch (ctx->ClientVersion) {
+ switch (ctx->ClientMajorVersion) {
case 1:
bit = EGL_OPENGL_ES_BIT;
break;
@@ -100,7 +100,7 @@ _eglParseContextAttribList(_EGLContext *ctx, const EGLint *attrib_list)
err = EGL_BAD_ATTRIBUTE;
break;
}
- ctx->ClientVersion = val;
+ ctx->ClientMajorVersion = val;
break;
default:
err = EGL_BAD_ATTRIBUTE;
@@ -138,7 +138,8 @@ _eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *conf,
ctx->Config = conf;
ctx->WindowRenderBuffer = EGL_NONE;
- ctx->ClientVersion = 1; /* the default, per EGL spec */
+ ctx->ClientMajorVersion = 1; /* the default, per EGL spec */
+ ctx->ClientMinorVersion = 0;
err = _eglParseContextAttribList(ctx, attrib_list);
if (err == EGL_SUCCESS && ctx->Config) {
@@ -191,7 +192,7 @@ _eglQueryContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *c,
*value = c->Config->ConfigID;
break;
case EGL_CONTEXT_CLIENT_VERSION:
- *value = c->ClientVersion;
+ *value = c->ClientMajorVersion;
break;
case EGL_CONTEXT_CLIENT_TYPE:
*value = c->ClientAPI;
diff --git a/src/egl/main/eglcontext.h b/src/egl/main/eglcontext.h
index 0ac8462..5e86cec 100644
--- a/src/egl/main/eglcontext.h
+++ b/src/egl/main/eglcontext.h
@@ -52,7 +52,8 @@ struct _egl_context
_EGLConfig *Config;
EGLint ClientAPI; /**< EGL_OPENGL_ES_API, EGL_OPENGL_API, EGL_OPENVG_API */
- EGLint ClientVersion; /**< 1 = OpenGLES 1.x, 2 = OpenGLES 2.x */
+ EGLint ClientMajorVersion;
+ EGLint ClientMinorVersion;
/* The real render buffer when a window surface is bound */
EGLint WindowRenderBuffer;
--
1.7.6.5
More information about the mesa-dev
mailing list