glx/dri3: Fix passing renderType into glXCreateContext
authorAdam Jackson <ajax@redhat.com>
Thu, 9 Nov 2017 21:57:31 +0000 (16:57 -0500)
committerAdam Jackson <ajax@redhat.com>
Mon, 13 Nov 2017 15:40:30 +0000 (10:40 -0500)
Without this, trying to create a GLX_RGBA_FLOAT_TYPE_ARB context would
fail, because GLX_RGBA_TYPE would be a mismatch with the fbconfig.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
src/glx/dri3_glx.c

index fa048f990a9ed9c0911aea1de0319e63b1ef3a86..a10306fe329aa3fd1515489a803f967ee0e13cd9 100644 (file)
@@ -324,9 +324,10 @@ dri3_create_context(struct glx_screen *base,
                     struct glx_context *shareList, int renderType)
 {
    unsigned int error;
+   uint32_t attribs[2] = { GLX_RENDER_TYPE, renderType };
 
    return dri3_create_context_attribs(base, config_base, shareList,
-                                      0, NULL, &error);
+                                      1, attribs, &error);
 }
 
 static void