diff --git a/.pick_status.json b/.pick_status.json index 1fc602e3561..10114757c23 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2114,7 +2114,7 @@ "description": "brw: Force allow_spilling when spill_all is set", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "8bca7e520ce01a59292c982f3b992bd4a2b3547e", "notes": null diff --git a/src/intel/compiler/brw_reg_allocate.cpp b/src/intel/compiler/brw_reg_allocate.cpp index 162d0149c53..782766d97fe 100644 --- a/src/intel/compiler/brw_reg_allocate.cpp +++ b/src/intel/compiler/brw_reg_allocate.cpp @@ -1388,6 +1388,12 @@ brw_reg_alloc::assign_regs(bool allow_spilling, bool spill_all) bool brw_assign_regs(brw_shader &s, bool allow_spilling, bool spill_all) { + /* Ensure that g0 is reserved for spilling since there is going to be + * spilling. + */ + if (spill_all) + allow_spilling = true; + brw_reg_alloc alloc(&s); bool success = alloc.assign_regs(allow_spilling, spill_all); if (!success && allow_spilling) {