Mesa (master): i965/vs: Only do INTEL_DEBUG=perf when there's a GLSL shader .

Kenneth Graunke kwg at kemper.freedesktop.org
Thu Nov 1 21:35:23 UTC 2012


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Oct  9 10:19:16 2012 -0700

i965/vs: Only do INTEL_DEBUG=perf when there's a GLSL shader.

This will become necessary once we start supporting ARB programs and
fixed function in this backend.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/mesa/drivers/dri/i965/brw_vec4_emit.cpp |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
index 479b0a6..ab9bc66 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
@@ -1048,7 +1048,7 @@ brw_vs_emit(struct gl_shader_program *prog, struct brw_vs_compile *c)
       printf("\n\n");
    }
 
-   if (unlikely(INTEL_DEBUG & DEBUG_PERF)) {
+   if (unlikely(INTEL_DEBUG & DEBUG_PERF) && shader) {
       if (shader->compiled_once) {
          brw_vs_debug_recompile(brw, prog, &c->key);
       }
@@ -1056,6 +1056,7 @@ brw_vs_emit(struct gl_shader_program *prog, struct brw_vs_compile *c)
          perf_debug("VS compile took %.03f ms and stalled the GPU\n",
                     (get_time() - start_time) * 1000);
       }
+      shader->compiled_once = true;
    }
 
    vec4_visitor v(c, prog, shader);
@@ -1065,8 +1066,6 @@ brw_vs_emit(struct gl_shader_program *prog, struct brw_vs_compile *c)
       return false;
    }
 
-   shader->compiled_once = true;
-
    return true;
 }
 




More information about the mesa-commit mailing list