aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers/dri/swrast
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/drivers/dri/swrast')
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/swrast.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
index ca6bda027..7773fd905 100644
--- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c
+++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
@@ -719,11 +719,20 @@ dri_create_context(gl_api api,
*/
(void) flags;
- if (api == API_OPENGL
- && (major_version > 2
- || (major_version == 2 && minor_version > 1))) {
- *error = __DRI_CTX_ERROR_BAD_VERSION;
- goto context_fail;
+ switch (api) {
+ case API_OPENGL:
+ if (major_version > 2
+ || (major_version == 2 && minor_version > 1)) {
+ *error = __DRI_CTX_ERROR_BAD_VERSION;
+ return GL_FALSE;
+ }
+ break;
+ case API_OPENGLES:
+ case API_OPENGLES2:
+ break;
+ case API_OPENGL_CORE:
+ *error = __DRI_CTX_ERROR_BAD_API;
+ return GL_FALSE;
}
ctx = CALLOC_STRUCT(dri_context);