i965: Add an INTEL_DEBUG=spill option to test spilling
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 23 Apr 2015 18:49:27 +0000 (11:49 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 24 Apr 2015 01:08:21 +0000 (18:08 -0700)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
src/mesa/drivers/dri/i965/intel_debug.c
src/mesa/drivers/dri/i965/intel_debug.h

index dc433b096e639e60fdcdd8b97b975ca8ddb83cdd..94e1a0aebf7737db9f4a8d5611f8b8c50521e128 100644 (file)
@@ -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) {
index a5b883c344cbbda19c698d84a6a13edbc2db65fe..19be464a8fe0d2257bb9958c7f940e315e5d54e4 100644 (file)
@@ -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 }
 };
 
index a741a162a2d110e1289b8ac62840322cd24ca5cc..e0e9cb7c6c7d1eea20b1eacaf113cde7400e03a9 100644 (file)
@@ -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"