Mesa (gles3): egl_dri2: Remove swrast version >= 2 checks
Paul Berry
stereotype441 at kemper.freedesktop.org
Wed Aug 8 23:42:05 UTC 2012
Module: Mesa
Branch: gles3
Commit: 0d0af45bb6f2eb3f07e63e89e940d101e88817dc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0d0af45bb6f2eb3f07e63e89e940d101e88817dc
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Wed Jul 18 10:08:49 2012 -0700
egl_dri2: Remove swrast version >= 2 checks
Since support for swrast version 2 was added (f55d027a), it has also been
required. In swrast_driver_extensions, version 2 is set for __DRI_SWRAST
extension. Remove the spurious version checks sprinked through the code.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/egl/drivers/dri2/egl_dri2.c | 38 +++++++++++---------------------------
1 files changed, 11 insertions(+), 27 deletions(-)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index f86ed0b..480268f 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -470,10 +470,7 @@ dri2_setup_screen(_EGLDisplay *disp)
api_mask = 1 << __DRI_API_OPENGL;
} else {
assert(dri2_dpy->swrast);
- if (dri2_dpy->swrast->base.version >= 2)
- api_mask = 1 << __DRI_API_OPENGL | 1 << __DRI_API_GLES | 1 << __DRI_API_GLES2;
- else
- api_mask = 1 << __DRI_API_OPENGL;
+ api_mask = 1 << __DRI_API_OPENGL | 1 << __DRI_API_GLES | 1 << __DRI_API_GLES2;
}
disp->ClientAPIs = 0;
@@ -492,11 +489,9 @@ dri2_setup_screen(_EGLDisplay *disp)
}
} else {
assert(dri2_dpy->swrast);
- if (dri2_dpy->swrast->base.version >= 2) {
- disp->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
- disp->Extensions.KHR_surfaceless_gles2 = EGL_TRUE;
- disp->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
- }
+ disp->Extensions.KHR_surfaceless_gles1 = EGL_TRUE;
+ disp->Extensions.KHR_surfaceless_gles2 = EGL_TRUE;
+ disp->Extensions.KHR_surfaceless_opengl = EGL_TRUE;
}
if (dri2_dpy->image) {
@@ -733,24 +728,13 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
}
} else {
assert(dri2_dpy->swrast);
- if (dri2_dpy->swrast->base.version >= 2) {
- dri2_ctx->dri_context =
- dri2_dpy->swrast->createNewContextForAPI(dri2_dpy->dri_screen,
- api,
- dri_config,
- dri2_ctx_shared ?
- dri2_ctx_shared->dri_context : NULL,
- dri2_ctx);
- } else if (api == __DRI_API_OPENGL) {
- dri2_ctx->dri_context =
- dri2_dpy->core->createNewContext(dri2_dpy->dri_screen,
- dri_config,
- dri2_ctx_shared ?
- dri2_ctx_shared->dri_context : NULL,
- dri2_ctx);
- } else {
- /* fail */
- }
+ dri2_ctx->dri_context =
+ dri2_dpy->swrast->createNewContextForAPI(dri2_dpy->dri_screen,
+ api,
+ dri_config,
+ dri2_ctx_shared ?
+ dri2_ctx_shared->dri_context : NULL,
+ dri2_ctx);
}
if (!dri2_ctx->dri_context)
More information about the mesa-commit
mailing list