summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-03-16 10:32:21 -0700
committerPaul Berry <[email protected]>2013-03-18 09:27:25 -0700
commit5a13e051d9043c2b95333cf778b242ce94be70d5 (patch)
tree74efe51447ea22ef09b2fc8f5bc783cc21e895d8 /src/mesa/drivers
parent2da8ee16a8b126d15f34552916c77b203be326db (diff)
i965/blorp: Add INTEL_DEBUG=blorp flag.
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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_blit.cpp6
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c1
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index 37524ad1a14..d4b1fda80cd 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -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);
}
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 7651b463f5c..2df70b75b47 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -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 }
};
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index 5a496039c5d..2df15d4f3df 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -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