st/xlib: Honour request of 3.1 contexts through core profile where available.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 24 Apr 2014 14:05:47 +0000 (15:05 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 24 Apr 2014 19:26:23 +0000 (20:26 +0100)
commit5f493eed69f6fb11239c04119d602f1c23a68cbd
tree62106f2943ec96be44d2c52c6a445d7ff38b447d
parent1c73e919a4b4dd79166d0633075990056f27fd28
st/xlib: Honour request of 3.1 contexts through core profile where available.

The GLX_ARB_create_context_profile spec says:

    "If version 3.1 is requested, the context returned may implement
    any of the following versions:

      * Version 3.1. The GL_ARB_compatibility extension may or may not
        be implemented, as determined by the implementation.

      * The core profile of version 3.2 or greater."

Mesa does not support GL_ARB_compatibility, and there are no plans to
ever support it, therefore the only chance to honour a 3.1 context is
through core profile, i.e, the 2nd alternative from the spec.

This change does that.  And with it piglit tests that require 3.1
contexts no longer skip.

Assuming there is no objection with this change, src/glx/dri_common.c
and src/gallium/state_trackers/wgl/stw_context.c should also be updated
accordingly, given they have the same logic.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/state_trackers/glx/xlib/xm_api.c