mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 16:50:13 +01:00
mesa/dri: Allow creation of forward-compatible contexts
This is done by changing the API to API_OPENGL_CORE. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
36ceabfb74
commit
ca2b1fcb30
1 changed files with 5 additions and 5 deletions
|
|
@ -257,17 +257,17 @@ dri2CreateContextAttribs(__DRIscreen *screen, int api,
|
|||
* "Forward-compatible contexts are defined only for OpenGL versions
|
||||
* 3.0 and later."
|
||||
*
|
||||
* Moreover, Mesa can't fulfill the requirements of a forward-looking
|
||||
* context. Return failure if a forward-looking context is requested.
|
||||
* Forward-looking contexts are supported by silently converting the
|
||||
* requested API to API_OPENGL_CORE.
|
||||
*
|
||||
* In Mesa, a debug context is the same as a regular context.
|
||||
*/
|
||||
if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0) {
|
||||
*error = __DRI_CTX_ERROR_BAD_FLAG;
|
||||
return NULL;
|
||||
mesa_api = API_OPENGL_CORE;
|
||||
}
|
||||
|
||||
if ((flags & ~__DRI_CTX_FLAG_DEBUG) != 0) {
|
||||
if ((flags & ~(__DRI_CTX_FLAG_DEBUG | __DRI_CTX_FLAG_FORWARD_COMPATIBLE))
|
||||
!= 0) {
|
||||
*error = __DRI_CTX_ERROR_UNKNOWN_FLAG;
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue