summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2015-04-23 11:49:27 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2015-04-23 18:08:21 -0700
commitd5a15a89f081bdd23237b8ba5391a2ebea60468b (patch)
treef1dca4c45113f204108b657d2cefc192ed1d05aa
parentbf55096207898437a5f48ba28f98fe1b992f60e3 (diff)
i965: Add an INTEL_DEBUG=spill option to test spilling
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/intel_debug.c1
-rw-r--r--src/mesa/drivers/dri/i965/intel_debug.h1
3 files changed, 3 insertions, 1 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 dc433b096e..94e1a0aebf 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -627,7 +627,7 @@ fs_visitor::assign_regs(bool allow_spilling)
}
/* Debug of register spilling: Go spill everything. */
- if (0) {
+ if (unlikely(INTEL_DEBUG & DEBUG_SPILL)) {
int reg = choose_spill_reg(g);
if (reg != -1) {
diff --git a/src/mesa/drivers/dri/i965/intel_debug.c b/src/mesa/drivers/dri/i965/intel_debug.c
index a5b883c344..19be464a8f 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.c
+++ b/src/mesa/drivers/dri/i965/intel_debug.c
@@ -69,6 +69,7 @@ static const struct dri_debug_control debug_control[] = {
{ "ann", DEBUG_ANNOTATION },
{ "no8", DEBUG_NO8 },
{ "vec4vs", DEBUG_VEC4VS },
+ { "spill", DEBUG_SPILL },
{ NULL, 0 }
};
diff --git a/src/mesa/drivers/dri/i965/intel_debug.h b/src/mesa/drivers/dri/i965/intel_debug.h
index a741a162a2..e0e9cb7c6c 100644
--- a/src/mesa/drivers/dri/i965/intel_debug.h
+++ b/src/mesa/drivers/dri/i965/intel_debug.h
@@ -64,6 +64,7 @@ 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)
#ifdef HAVE_ANDROID_PLATFORM
#define LOG_TAG "INTEL-MESA"