aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2015-07-23 11:11:53 +0200
committerIago Toral Quiroga <[email protected]>2015-09-04 12:49:36 +0200
commitbd6e516fc24128d604f677a16f692d88d65a49f1 (patch)
tree63dd30a4935cb7af8735a4e803f13f845317b80f /src/mesa/drivers
parent6cf4142db88796ff66a73a36530467101533fdb6 (diff)
i965: Add a debug option for spilling everything in vec4 code
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/intel_debug.c3
-rw-r--r--src/mesa/drivers/dri/i965/intel_debug.h5
4 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
index 6eb988938d4..570b4fedffe 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -649,7 +649,7 @@ fs_visitor::assign_regs(bool allow_spilling)
}
/* Debug of register spilling: Go spill everything. */
- if (unlikely(INTEL_DEBUG & DEBUG_SPILL)) {
+ if (unlikely(INTEL_DEBUG & DEBUG_SPILL_FS)) {
int reg = choose_spill_reg(g);
if (reg != -1) {
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 24b2be916a6..85dc37238d1 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1833,7 +1833,7 @@ vec4_visitor::run()
setup_payload();
- if (false) {
+ if (unlikely(INTEL_DEBUG & DEBUG_SPILL_VEC4)) {
/* Debug of register spilling: Go spill everything. */
const int grf_count = alloc.count;
float spill_costs[alloc.count];
diff --git a/src/mesa/drivers/dri/i965/intel_debug.c b/src/mesa/drivers/dri/i965/intel_debug.c
index b3b3c21f491..5a9c9533fde 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.c
+++ b/src/mesa/drivers/dri/i965/intel_debug.c
@@ -69,7 +69,8 @@ static const struct dri_debug_control debug_control[] = {
{ "ann", DEBUG_ANNOTATION },
{ "no8", DEBUG_NO8 },
{ "vec4", DEBUG_VEC4VS },
- { "spill", DEBUG_SPILL },
+ { "spill_fs", DEBUG_SPILL_FS },
+ { "spill_vec4", DEBUG_SPILL_VEC4 },
{ "cs", DEBUG_CS },
{ NULL, 0 }
};
diff --git a/src/mesa/drivers/dri/i965/intel_debug.h b/src/mesa/drivers/dri/i965/intel_debug.h
index 4689492e1fd..b7d0c823fa8 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.h
+++ b/src/mesa/drivers/dri/i965/intel_debug.h
@@ -64,8 +64,9 @@ extern uint64_t INTEL_DEBUG;
#define DEBUG_ANNOTATION (1ull << 28)
#define DEBUG_NO8 (1ull << 29)
#define DEBUG_VEC4VS (1ull << 30)
-#define DEBUG_SPILL (1ull << 31)
-#define DEBUG_CS (1ull << 32)
+#define DEBUG_SPILL_FS (1ull << 31)
+#define DEBUG_SPILL_VEC4 (1ull << 32)
+#define DEBUG_CS (1ull << 33)
#ifdef HAVE_ANDROID_PLATFORM
#define LOG_TAG "INTEL-MESA"