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

Author: Roland Scheidegger <[email protected]>
Date:   Sat Apr  4 16:49:08 2015 +0200

draw: (trivial) don't print the shader twice with GALLIVM_DEBUG=tgsi (or ir)

Neither the shader nor the key change when doing elts or linear variant, so
this was just annoying (probably mildly useful at some point when we printed
the IR per function too).

Reviewed-by: Jose Fonseca <[email protected]>

---

 src/gallium/auxiliary/draw/draw_llvm.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_llvm.c 
b/src/gallium/auxiliary/draw/draw_llvm.c
index 1e6e699..7150611 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -562,6 +562,11 @@ draw_llvm_create_variant(struct draw_llvm *llvm,
 
    memcpy(&variant->key, key, shader->variant_key_size);
 
+   if (gallivm_debug & (GALLIVM_DEBUG_TGSI | GALLIVM_DEBUG_IR)) {
+      tgsi_dump(llvm->draw->vs.vertex_shader->state.tokens, 0);
+      draw_llvm_dump_variant_key(&variant->key);
+   }
+
    vertex_header = create_jit_vertex_header(variant->gallivm, num_inputs);
 
    variant->vertex_header_ptr_type = LLVMPointerType(vertex_header, 0);
@@ -606,11 +611,6 @@ generate_vs(struct draw_llvm_variant *variant,
    LLVMValueRef num_consts_ptr =
       draw_jit_context_num_vs_constants(variant->gallivm, context_ptr);
 
-   if (gallivm_debug & (GALLIVM_DEBUG_TGSI | GALLIVM_DEBUG_IR)) {
-      tgsi_dump(tokens, 0);
-      draw_llvm_dump_variant_key(&variant->key);
-   }
-
    lp_build_tgsi_soa(variant->gallivm,
                      tokens,
                      vs_type,

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

Reply via email to