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

Ian Romanick idr at freedesktop.org
Mon Sep 2 16:54:25 PDT 2013


Please send patches only using git-send-email.  Send patches as
attachments prevents people from being able to provide in-line review
comments.

On 09/01/2013 12:30 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

This was a typo on my part.  The Linux ABI requires OpenGL 1.2, so every
driver will support that.  I meant to type

   uint32_t major_ver = 1;
   uint32_t minor_ver = 2;

but instead typed

   uint32_t minor_ver = 1;
   uint32_t major_ver = 2;

Copy and paste did the rest. :(

All of your other changes are, I think, unnecessary code motion.

Does making that one change in dri2_glx.c and drisw_glx.c fix the problem?

> 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)
> 
> This fixes: http://bugs.winehq.org/show_bug.cgi?id=34238
> 
> Signed-off-by: Rico Schüller <kgbricola at web.de>
> ---
>  src/glx/dri2_glx.c   | 10 +++++-----
>  src/glx/dri_common.c | 14 +++++++-------
>  src/glx/drisw_glx.c  | 10 +++++-----
>  3 files changed, 17 insertions(+), 17 deletions(-)
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list