diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/compiler/brw_fs_reg_allocate.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/intel/compiler/brw_fs_reg_allocate.cpp b/src/intel/compiler/brw_fs_reg_allocate.cpp index b7425ea6d58..33631ddcd0c 100644 --- a/src/intel/compiler/brw_fs_reg_allocate.cpp +++ b/src/intel/compiler/brw_fs_reg_allocate.cpp @@ -1157,6 +1157,13 @@ fs_reg_alloc::assign_regs(bool allow_spilling, bool spill_all) if (!allow_spilling) return false; + /* Failed to allocate registers. Spill a reg, and the caller will + * loop back into here to try again. + */ + int reg = choose_spill_reg(); + if (reg == -1) + return false; + /* If we're going to spill but we've never spilled before, we need to * re-build the interference graph with MRFs enabled to allow spilling. */ @@ -1167,13 +1174,6 @@ fs_reg_alloc::assign_regs(bool allow_spilling, bool spill_all) spilled = true; - /* Failed to allocate registers. Spill a reg, and the caller will - * loop back into here to try again. - */ - int reg = choose_spill_reg(); - if (reg == -1) - return false; - spill_reg(reg); } |