From 4d9d0e62306ce1a046ff724936016a4f080cf21a Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Mon, 8 Jun 2009 14:34:16 +0200 Subject: stw: If stfb not set don't call into mesa --- src/gallium/state_trackers/wgl/shared/stw_framebuffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gallium/state_trackers') diff --git a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c index de37d135dfe..f27f4cda218 100644 --- a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c +++ b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c @@ -118,7 +118,8 @@ stw_call_window_proc( * be called from any thread. */ pipe_mutex_lock( fb->mutex ); - st_resize_framebuffer( fb->stfb, width, height ); + if (fb->stfb) + st_resize_framebuffer( fb->stfb, width, height ); pipe_mutex_unlock( fb->mutex ); } } -- cgit v1.2.3 From 9192347443bc3db9ebeb4b5cc090133b63396b04 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 9 Jun 2009 16:35:55 +0100 Subject: stw: ignore swapbuffer requests on singlebuffer Return TRUE in this case. Returning FALSE seems to result in mis-rendering -- possibly opengl32.dll is trying to compensate by doing a software blit?? --- src/gallium/state_trackers/wgl/shared/stw_framebuffer.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/state_trackers') diff --git a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c index f27f4cda218..a601fc5646b 100644 --- a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c +++ b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c @@ -380,6 +380,9 @@ stw_swap_buffers( if (fb == NULL) return FALSE; + if (!(fb->pfi->pfd.dwFlags & PFD_DOUBLEBUFFER)) + return TRUE; + pipe_mutex_lock( fb->mutex ); /* If we're swapping the buffer associated with the current context -- cgit v1.2.3