draw/llvm: improve debugging output a bit
authorZack Rusin <zackr@vmware.com>
Wed, 26 Mar 2014 17:36:34 +0000 (13:36 -0400)
committerZack Rusin <zackr@vmware.com>
Wed, 26 Mar 2014 19:58:59 +0000 (15:58 -0400)
it's useful to know what the llvmbuildstore arguments are going to
be before executing it because it can crash and make sure to
print out the inputs only if we're not generating a gs because
it fetches inputs differently.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c

index 53d13f3cb40a6ae192faea5cbf3d4c1abf243e9d..b9f8bb9339824d7679b250f20383e1d968566546 100644 (file)
@@ -939,11 +939,11 @@ store_aos_array(struct gallivm_state *gallivm,
          LLVMValueRef id_ptr = draw_jit_header_id(gallivm, io_ptrs[i]);
          val = LLVMBuildExtractElement(builder, cliptmp, linear_inds[i], "");
          val = adjust_mask(gallivm, val);
-         LLVMBuildStore(builder, val, id_ptr);
 #if DEBUG_STORE
          lp_build_printf(gallivm, "io = %p, index %d, clipmask = %x\n",
                          io_ptrs[i], inds[i], val);
 #endif
+         LLVMBuildStore(builder, val, id_ptr);
       }
    }
 
index d2cb0a0975f45ad3f9d1eb74f6232fa819ec395b..8791168a48ba6e1932c4fc8fa22826cf96fc521f 100644 (file)
@@ -3569,7 +3569,8 @@ static void emit_prologue(struct lp_build_tgsi_context * bld_base)
    if (DEBUG_EXECUTION) {
       lp_build_printf(gallivm, "\n");
       emit_dump_file(bld, TGSI_FILE_CONSTANT);
-      emit_dump_file(bld, TGSI_FILE_INPUT);
+      if (!bld->gs_iface)
+         emit_dump_file(bld, TGSI_FILE_INPUT);
    }
 }