summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMathias Froehlich <[email protected]>2011-10-13 11:32:35 +0200
committerJosé Fonseca <[email protected]>2011-10-13 19:53:13 +0100
commit7b09a9428203db5c0c46b9226ba1d5a06f17b2d8 (patch)
tree4d66470d6b988f370ea45f2788044e3251088063 /src
parent349e4db99e938f8ee8826b0d27e490c66a1e8356 (diff)
st/wgl: Release stw_framebuffer::mutex after pbuffer creation.
This change releases the stw_framebuffer::mutex past creation of the pbuffer stw_framebuffer. Without this change the pbuffers lock is never released. Since on win32 mutexes are recursive, this does not hurt as long as all actions on a context are done from the same thread. But if, for example, context creation happens in a different thread than usage, every access to the context will block for ever. Signed-off-by: José Fonseca <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/wgl/stw_ext_pbuffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c b/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c
index c7273f26545..252d07a90cc 100644
--- a/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c
+++ b/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c
@@ -209,6 +209,8 @@ wglCreatePbufferARB(HDC _hDC,
fb = stw_framebuffer_create(hDC, iPixelFormat);
if (!fb) {
SetLastError(ERROR_NO_SYSTEM_RESOURCES);
+ } else {
+ stw_framebuffer_release(fb);
}
return (HPBUFFERARB)fb;