i965/blorp: Add INTEL_DEBUG=blorp flag.
authorPaul Berry <stereotype441@gmail.com>
Sat, 16 Mar 2013 17:32:21 +0000 (10:32 -0700)
committerPaul Berry <stereotype441@gmail.com>
Mon, 18 Mar 2013 16:27:25 +0000 (09:27 -0700)
This debug flag prints out the native GEN assembly for a blitting
shader produced using BLORP.  Hopefully this should be useful in
developing additional BLORP features.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_context.h

index 37524ad1a1403d7d6c32e22f575f7ddcce2d39b4..d4b1fda80cdd95024dd757ed8742d0c0a8372178 100644 (file)
@@ -834,6 +834,12 @@ brw_blorp_blit_program::compile(struct brw_context *brw,
     * terminate the thread.
     */
    render_target_write();
+
+   if (unlikely(INTEL_DEBUG & DEBUG_BLORP)) {
+      printf("Native code for BLORP blit:\n");
+      brw_dump_compile(&func, stdout, 0, func.next_insn_offset);
+      printf("\n");
+   }
    return brw_get_program(&func, program_size);
 }
 
index 7651b463f5cc7e24a173350805a92a587e084f51..2df70b75b472d1d4dfd14f4d7bf5b5d11eefad1e 100644 (file)
@@ -490,6 +490,7 @@ static const struct dri_debug_control debug_control[] = {
    { "aub",   DEBUG_AUB },
    { "shader_time", DEBUG_SHADER_TIME },
    { "no16",  DEBUG_NO16 },
+   { "blorp", DEBUG_BLORP },
    { NULL,    0 }
 };
 
index 5a496039c5ddc9053be9614f2db51328e22828fb..2df15d4f3df6a0042357256f9a5cc75cd5523abe 100644 (file)
@@ -438,6 +438,7 @@ extern int INTEL_DEBUG;
 #define DEBUG_CLIP      0x2000000
 #define DEBUG_AUB       0x4000000
 #define DEBUG_SHADER_TIME 0x8000000
+#define DEBUG_BLORP     0x10000000
 #define DEBUG_NO16      0x20000000
 
 #ifdef HAVE_ANDROID_PLATFORM