summaryrefslogtreecommitdiff
path: root/src/glx/dri_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/dri_common.c')
-rw-r--r--src/glx/dri_common.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index b2a3117c5ac..5f199e9fde4 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -470,8 +470,14 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
bool got_profile = false;
uint32_t profile;
+ *major_ver = 1;
+ *minor_ver = 0;
+ *render_type = GLX_RGBA_TYPE;
+ *reset = __DRI_CTX_RESET_NO_NOTIFICATION;
+ *flags = 0;
+ *api = __DRI_API_OPENGL;
+
if (num_attribs == 0) {
- *api = __DRI_API_OPENGL;
return true;
}
@@ -482,11 +488,6 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
return false;
}
- *major_ver = 1;
- *minor_ver = 0;
- *render_type = GLX_RGBA_TYPE;
- *reset = __DRI_CTX_RESET_NO_NOTIFICATION;
-
for (i = 0; i < num_attribs; i++) {
switch (attribs[i * 2]) {
case GLX_CONTEXT_MAJOR_VERSION_ARB:
@@ -526,7 +527,6 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
}
}
- *api = __DRI_API_OPENGL;
if (!got_profile) {
if (*major_ver > 3 || (*major_ver == 3 && *minor_ver >= 2))
*api = __DRI_API_OPENGL_CORE;