Module: wine Branch: master Commit: 3eaa23cbbf827247dccdeb6869f2f003a503fcda URL: https://source.winehq.org/git/wine.git/?a=commit;h=3eaa23cbbf827247dccdeb686...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Jan 24 17:33:22 2018 +0100
winex11: Implement WGL_ARB_create_context_no_error.
Mostly because it's easy, and we'd like to use this from wined3d at some point.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/opengl32/make_opengl | 1 + dlls/winex11.drv/opengl.c | 10 ++++++++++ include/wine/wgl.h | 1 + 3 files changed, 12 insertions(+)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index d5d614b..ebdca67 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -369,6 +369,7 @@ my %remapped_wgl_functions = my %supported_wgl_extensions = ( "WGL_ARB_create_context" => 1, + "WGL_ARB_create_context_no_error" => 1, "WGL_ARB_create_context_profile" => 1, "WGL_ARB_extensions_string" => 1, "WGL_ARB_make_current_read" => 1, diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index e665286..e976ad7 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -163,6 +163,8 @@ typedef XID GLXPbuffer; #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 #define GLX_CONTEXT_FLAGS_ARB 0x2094 +/** GLX_ARB_create_context_no_error */ +#define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3 /** GLX_ARB_create_context_profile */ #define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 /** GLX_ATI_pixel_format_float */ @@ -2118,6 +2120,12 @@ static struct wgl_context *X11DRV_wglCreateContextAttribsARB( HDC hdc, struct wg pContextAttribList += 2; ret->numAttribs++; break; + case WGL_CONTEXT_OPENGL_NO_ERROR_ARB: + pContextAttribList[0] = GLX_CONTEXT_OPENGL_NO_ERROR_ARB; + pContextAttribList[1] = attribList[1]; + pContextAttribList += 2; + ret->numAttribs++; + break; case WGL_CONTEXT_PROFILE_MASK_ARB: pContextAttribList[0] = GLX_CONTEXT_PROFILE_MASK_ARB; pContextAttribList[1] = attribList[1]; @@ -3179,6 +3187,8 @@ static void X11DRV_WineGL_LoadExtensions(void) register_extension( "WGL_ARB_create_context" ); opengl_funcs.ext.p_wglCreateContextAttribsARB = X11DRV_wglCreateContextAttribsARB;
+ if (has_extension( WineGLInfo.glxExtensions, "GLX_ARB_create_context_no_error" )) + register_extension( "WGL_ARB_create_context_no_error" ); if (has_extension( WineGLInfo.glxExtensions, "GLX_ARB_create_context_profile")) register_extension("WGL_ARB_create_context_profile"); } diff --git a/include/wine/wgl.h b/include/wine/wgl.h index a329fa4..8f68f68 100644 --- a/include/wine/wgl.h +++ b/include/wine/wgl.h @@ -5016,6 +5016,7 @@ typedef unsigned int GLhandleARB; #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3 #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 #define WGL_CUBE_MAP_FACE_ARB 0x207C #define WGL_DEPTH_BITS_ARB 0x2022