[Mesa-dev] [PATCH v2] glx: Initialize OpenGL version to 1.0

Ian Romanick idr at freedesktop.org
Wed Sep 4 16:07:50 PDT 2013


On 09/04/2013 12:23 PM, Rico Schüller wrote:
> Some driver/card combinations (r200/RV280, i915/915G) don't support OpenGL 2.1.
> These create in some corner cases an indirect context instead of a direct
> context when calling glXCreateContextAttribsARB(). This happens because of a
> bad default value. To avoid this, choose a more sane default OpenGL 1.0 as
> mentioned in the ARB_create_context spec:
>     The default values for GLX_CONTEXT_MAJOR_VERSION_ARB and
>     GLX_CONTEXT_MINOR_VERSION_ARB are 1 and 0 respectively. In this
>     case, implementations will typically return the most recent version
>     of OpenGL they support which is backwards compatible with OpenGL 1.0
>     (e.g. 3.0, 3.1 + GL_ARB_compatibility, or 3.2 compatibility profile)
> 
> v2: remove unneeded changes

So... I saw in this patch that you didn't fix the (innocuous) error in
drisw_glx.c, and then I looked back at the first patch.  I had
misunderstood some of the code motion, and I actually like that version
better. :)

I've pushed the original version, but I made some changes to the commit
message.

> This fixes: http://bugs.winehq.org/show_bug.cgi?id=34238
> 
> NOTE: This is a candidate for the Mesa stable branch.
> 
> Signed-off-by: Rico Schüller <kgbricola at web.de>
> ---
>  src/glx/dri2_glx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
> index 54fc21c..603c54d 100644
> --- a/src/glx/dri2_glx.c
> +++ b/src/glx/dri2_glx.c
> @@ -260,8 +260,8 @@ 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 minor_ver = 0;
> +   uint32_t major_ver = 1;
>     uint32_t renderType = GLX_RGBA_TYPE;
>     uint32_t flags = 0;
>     unsigned api;
> 



More information about the mesa-dev mailing list