summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/glx/dri2_glx.c10
-rw-r--r--src/glx/dri_common.c14
-rw-r--r--src/glx/drisw_glx.c10
3 files changed, 17 insertions, 17 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 54fc21cdfcc..07138fb11f8 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -260,12 +260,12 @@ dri2_create_context_attribs(struct glx_screen *base,
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) config_base;
__DRIcontext *shared = NULL;
- uint32_t minor_ver = 1;
- uint32_t major_ver = 2;
- uint32_t renderType = GLX_RGBA_TYPE;
- uint32_t flags = 0;
+ uint32_t minor_ver;
+ uint32_t major_ver;
+ uint32_t renderType;
+ uint32_t flags;
unsigned api;
- int reset = __DRI_CTX_RESET_NO_NOTIFICATION;
+ int reset;
uint32_t ctx_attribs[2 * 5];
unsigned num_ctx_attribs = 0;
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;
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 0583cd15ab5..393be205d88 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -433,12 +433,12 @@ drisw_create_context_attribs(struct glx_screen *base,
struct drisw_screen *psc = (struct drisw_screen *) base;
__DRIcontext *shared = NULL;
- uint32_t minor_ver = 1;
- uint32_t major_ver = 0;
- uint32_t renderType = GLX_RGBA_TYPE;
- uint32_t flags = 0;
+ uint32_t minor_ver;
+ uint32_t major_ver;
+ uint32_t renderType;
+ uint32_t flags;
unsigned api;
- int reset = __DRI_CTX_RESET_NO_NOTIFICATION;
+ int reset;
uint32_t ctx_attribs[2 * 4];
unsigned num_ctx_attribs = 0;