[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH] winex11: support GLX_MESA_swap_control for WGL_EXT_swap_control This patch allows disabl
From:       Chris Wulff <crwulff () rochester ! rr ! com>
Date:       2013-10-30 5:03:45
Message-ID: 24AD7275-FBBD-4320-A0CC-E72848540506 () rochester ! rr ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Sep 17, 2013, at 12:55 PM, Roderick Colenbrander <thunderbird2k@gmail.com> wrote:

> ---
> dlls/winex11.drv/opengl.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
> index 5ec33c8..e28302e 100644
> --- a/dlls/winex11.drv/opengl.c
> +++ b/dlls/winex11.drv/opengl.c
> @@ -258,7 +258,8 @@ enum glx_swap_control_method
> {
> GLX_SWAP_CONTROL_NONE,
> GLX_SWAP_CONTROL_EXT,
> -    GLX_SWAP_CONTROL_SGI
> +    GLX_SWAP_CONTROL_SGI,
> +    GLX_SWAP_CONTROL_MESA
> };
> 
> /* X context to associate a struct gl_drawable to an hwnd */
> @@ -404,6 +405,7 @@ static void  (*pglXFreeMemoryNV)(GLvoid *pointer);
> 
> /* MESA GLX Extensions */
> static void (*pglXCopySubBufferMESA)(Display *dpy, GLXDrawable drawable, int x, int \
> y, int width, int height); +static int (*pglXSwapIntervalMESA)(unsigned int \
> interval); 
> /* Standard OpenGL */
> static void (*pglFinish)(void);
> @@ -650,6 +652,8 @@ static BOOL has_opengl(void)
> LOAD_FUNCPTR(glXCreateContextAttribsARB);
> /* EXT GLX Extension */
> LOAD_FUNCPTR(glXSwapIntervalEXT);
> +    /* MESA GLX Extension */
> +    LOAD_FUNCPTR(glXSwapIntervalMESA);
> /* SGI GLX Extension */
> LOAD_FUNCPTR(glXSwapIntervalSGI);
> /* NV GLX Extension */
> @@ -2963,6 +2967,10 @@ static BOOL X11DRV_wglSwapIntervalEXT(int interval)
> ret = !X11DRV_check_error();
> break;
> 
> +    case GLX_SWAP_CONTROL_MESA:
> +        ret = !pglXSwapIntervalMESA(interval);
> +        break;
> +
> case GLX_SWAP_CONTROL_SGI:
> /* wglSwapIntervalEXT considers an interval value of zero to mean that
> * vsync should be disabled, but glXSwapIntervalSGI considers such a
> @@ -3146,6 +3154,10 @@ static void X11DRV_WineGL_LoadExtensions(void)
> has_swap_control_tear = TRUE;
> }
> }
> +    else if (has_extension( WineGLInfo.glxExtensions, "GLX_MESA_swap_control"))
> +    {
> +        swap_control_method = GLX_SWAP_CONTROL_MESA;
> +    }
> else if (has_extension( WineGLInfo.glxExtensions, "GLX_SGI_swap_control"))
> {
> swap_control_method = GLX_SWAP_CONTROL_SGI;
> --
> 1.8.3.1
> 
> 
> 


[Attachment #5 (text/html)]

<html><head><meta http-equiv="content-type" content="text/html; \
charset=utf-8"></head><body dir="auto"><div><br><br><div><br></div></div><div><br>On \
Sep 17, 2013, at 12:55 PM, Roderick Colenbrander &lt;<a \
href="mailto:thunderbird2k@gmail.com">thunderbird2k@gmail.com</a>&gt; \
wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">---<br><div \
class="gmail_quote">&nbsp;dlls/winex11.drv/opengl.c | 14 +++++++++++++-<br> &nbsp;1 \
file changed, 13 insertions(+), 1 deletion(-)<br> <br>
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c<br>
index 5ec33c8..e28302e 100644<br>
--- a/dlls/winex11.drv/opengl.c<br>
+++ b/dlls/winex11.drv/opengl.c<br>
@@ -258,7 +258,8 @@ enum glx_swap_control_method<br>
&nbsp;{<br>
&nbsp; &nbsp; &nbsp;GLX_SWAP_CONTROL_NONE,<br>
&nbsp; &nbsp; &nbsp;GLX_SWAP_CONTROL_EXT,<br>
- &nbsp; &nbsp;GLX_SWAP_CONTROL_SGI<br>
+ &nbsp; &nbsp;GLX_SWAP_CONTROL_SGI,<br>
+ &nbsp; &nbsp;GLX_SWAP_CONTROL_MESA<br>
&nbsp;};<br>
<br>
&nbsp;/* X context to associate a struct gl_drawable to an hwnd */<br>
@@ -404,6 +405,7 @@ static void &nbsp;(*pglXFreeMemoryNV)(GLvoid *pointer);<br>
<br>
&nbsp;/* MESA GLX Extensions */<br>
&nbsp;static void (*pglXCopySubBufferMESA)(Display *dpy, GLXDrawable drawable, int x, \
int y, int width, int height);<br> +static int (*pglXSwapIntervalMESA)(unsigned int \
interval);<br> <br>
&nbsp;/* Standard OpenGL */<br>
&nbsp;static void (*pglFinish)(void);<br>
@@ -650,6 +652,8 @@ static BOOL has_opengl(void)<br>
&nbsp; &nbsp; &nbsp;LOAD_FUNCPTR(glXCreateContextAttribsARB);<br>
&nbsp; &nbsp; &nbsp;/* EXT GLX Extension */<br>
&nbsp; &nbsp; &nbsp;LOAD_FUNCPTR(glXSwapIntervalEXT);<br>
+ &nbsp; &nbsp;/* MESA GLX Extension */<br>
+ &nbsp; &nbsp;LOAD_FUNCPTR(glXSwapIntervalMESA);<br>
&nbsp; &nbsp; &nbsp;/* SGI GLX Extension */<br>
&nbsp; &nbsp; &nbsp;LOAD_FUNCPTR(glXSwapIntervalSGI);<br>
&nbsp; &nbsp; &nbsp;/* NV GLX Extension */<br>
@@ -2963,6 +2967,10 @@ static BOOL X11DRV_wglSwapIntervalEXT(int interval)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ret = !X11DRV_check_error();<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<br>
<br>
+ &nbsp; &nbsp;case GLX_SWAP_CONTROL_MESA:<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;ret = !pglXSwapIntervalMESA(interval);<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;break;<br>
+<br>
&nbsp; &nbsp; &nbsp;case GLX_SWAP_CONTROL_SGI:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* wglSwapIntervalEXT considers an interval value \
of zero to mean that<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * vsync should be \
disabled, but glXSwapIntervalSGI considers such a<br> @@ -3146,6 +3154,10 @@ static \
void X11DRV_WineGL_LoadExtensions(void)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;has_swap_control_tear = TRUE;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
&nbsp; &nbsp; &nbsp;}<br>
+ &nbsp; &nbsp;else if (has_extension( WineGLInfo.glxExtensions, \
"GLX_MESA_swap_control"))<br> + &nbsp; &nbsp;{<br>
+ &nbsp; &nbsp; &nbsp; &nbsp;swap_control_method = GLX_SWAP_CONTROL_MESA;<br>
+ &nbsp; &nbsp;}<br>
&nbsp; &nbsp; &nbsp;else if (has_extension( WineGLInfo.glxExtensions, \
"GLX_SGI_swap_control"))<br> &nbsp; &nbsp; &nbsp;{<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;swap_control_method = GLX_SWAP_CONTROL_SGI;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
</font></span></div><br></div>
</div></blockquote><blockquote \
type="cite"><div><span></span><br></div></blockquote></body></html>





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic