From 1fc2f52d36211c753bb94cd5d46ec1c4d3d0dd46 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 3 Nov 2025 11:11:53 -0800 Subject: [PATCH] brw: Force allow_spilling when spill_all is set This ensures that g0 is reserved for spilling since there is going to be spilling. Fixes: 8bca7e520ce ("intel/brw: Only force g0's liveness to be the whole program if spilling") Reviewed-by: Kenneth Graunke Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/brw/brw_reg_allocate.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/intel/compiler/brw/brw_reg_allocate.cpp b/src/intel/compiler/brw/brw_reg_allocate.cpp index 1929fd10b73..fdb31af96d9 100644 --- a/src/intel/compiler/brw/brw_reg_allocate.cpp +++ b/src/intel/compiler/brw/brw_reg_allocate.cpp @@ -1429,6 +1429,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) {