[Mesa-stable] [PATCH] mesa: don't validate pipeline in GL debug contexts

Ilia Mirkin imirkin at alum.mit.edu
Sat Jun 4 17:17:46 UTC 2016


This is causing problems with glretrace and various traces I've seen,
including F1 2015 and PCSX2. I haven't carefully debugged what's going
on, but the games do work fine when tracing, which most likely points to
the validation logic not being suitable for desktop GL. I've left in the
ability to flip it in with a debug flag.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "12.0" <mesa-stable at lists.freedesktop.org>
Cc: Ian Romanick <idr at freedesktop.org>
---
 src/mesa/main/debug.c       | 3 ++-
 src/mesa/main/mtypes.h      | 3 ++-
 src/mesa/main/pipelineobj.c | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 5ca7d5c..b9a6bc1 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -189,7 +189,8 @@ set_debug_flags(const char *str)
       { "silent", DEBUG_SILENT }, /* turn off debug messages */
       { "flush", DEBUG_ALWAYS_FLUSH }, /* flush after each drawing command */
       { "incomplete_tex", DEBUG_INCOMPLETE_TEXTURE },
-      { "incomplete_fbo", DEBUG_INCOMPLETE_FBO }
+      { "incomplete_fbo", DEBUG_INCOMPLETE_FBO },
+      { "validate_io", DEBUG_VALIDATE_IO },
    };
    GLuint i;
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 2c728fc..1ba8db7 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -4693,7 +4693,8 @@ enum _debug
    DEBUG_SILENT                 = (1 << 0),
    DEBUG_ALWAYS_FLUSH		= (1 << 1),
    DEBUG_INCOMPLETE_TEXTURE     = (1 << 2),
-   DEBUG_INCOMPLETE_FBO         = (1 << 3)
+   DEBUG_INCOMPLETE_FBO         = (1 << 3),
+   DEBUG_VALIDATE_IO            = (1 << 4),
 };
 
 #ifdef __cplusplus
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index 5a46cfe..1484237 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -926,9 +926,9 @@ _mesa_validate_program_pipeline(struct gl_context* ctx,
     *      that doesn't have an exact match (see section 7.4.1)
     *
     * Based on this, only perform the most-strict checking on ES or when the
-    * application has created a debug context.
+    * use enables it via MESA_DEBUG.
     */
-   if ((_mesa_is_gles(ctx) || (ctx->Const.ContextFlags & GL_CONTEXT_FLAG_DEBUG_BIT)) &&
+   if ((_mesa_is_gles(ctx) || (MESA_DEBUG_FLAGS & DEBUG_VALIDATE_IO)) &&
        !_mesa_validate_pipeline_io(pipe))
       return GL_FALSE;
 
-- 
2.7.3



More information about the mesa-stable mailing list