[Mesa-dev] [PATCH] mesa: disable glthread when DEBUG_OUTPUT_SYNCHRONOUS is enabled
Timothy Arceri
tarceri at itsqueeze.com
Thu Mar 30 05:21:32 UTC 2017
We could re-enable it also but I haven't tested that yet, and I'm
not sure we care much anyway.
---
src/mesa/main/debug_output.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/mesa/main/debug_output.c b/src/mesa/main/debug_output.c
index bc933db..2b22645 100644
--- a/src/mesa/main/debug_output.c
+++ b/src/mesa/main/debug_output.c
@@ -22,20 +22,21 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdarg.h>
#include <stdio.h>
#include "context.h"
#include "debug_output.h"
#include "dispatch.h"
#include "enums.h"
+#include "glthread.h"
#include "imports.h"
#include "hash.h"
#include "mtypes.h"
#include "version.h"
#include "util/hash_table.h"
#include "util/simple_list.h"
static mtx_t DynamicIDMutex = _MTX_INITIALIZER_NP;
static GLuint NextDynamicID = 1;
@@ -741,20 +742,24 @@ _mesa_set_debug_state_int(struct gl_context *ctx, GLenum pname, GLint val)
if (!debug)
return false;
switch (pname) {
case GL_DEBUG_OUTPUT:
debug->DebugOutput = (val != 0);
break;
case GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB:
debug->SyncOutput = (val != 0);
+ if (debug->SyncOutput) {
+ _mesa_glthread_finish(ctx);
+ _mesa_glthread_restore_dispatch(ctx);
+ }
break;
default:
assert(!"unknown debug output param");
break;
}
_mesa_unlock_debug_state(ctx);
return true;
}
--
2.9.3
More information about the mesa-dev
mailing list