Module: Mesa
Branch: master
Commit: 929fcee47e46781c57f2a354ce0a013915c033d1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=929fcee47e46781c57f2a354ce0a013915c033d1

Author: Tom Stellard <[email protected]>
Date:   Wed Nov 16 21:21:15 2016 +0000

mesa: Add missing call to _mesa_unlock_debug_state(ctx); v2

cd724208d3e1e3307f84a794f2c1fc83b69ccf8a added a call to
_mesa_lock_debug_state(ctx) but wasn't unlocking the debug state.

This fixes a hang in glsl-fs-loop piglit test with MESA_DEBUG=context.

v2:
  - Remove unrelated changes.

Reviewed-by: Brian Paul <[email protected]>

---

 src/mesa/main/debug_output.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/debug_output.c b/src/mesa/main/debug_output.c
index 4e9209b..48dbbb3 100644
--- a/src/mesa/main/debug_output.c
+++ b/src/mesa/main/debug_output.c
@@ -1282,12 +1282,14 @@ _mesa_init_debug_output(struct gl_context *ctx)
        */
       struct gl_debug_state *debug = _mesa_lock_debug_state(ctx);
       if (!debug) {
-         return;
+         goto done;
       }
       debug->DebugOutput = GL_TRUE;
       debug->LogToStderr = GL_TRUE;
       ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT;
    }
+done:
+   _mesa_unlock_debug_state(ctx);
 }
 
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to