From 95ad9bca2fd4c3d0c9d7b0b55e6cca034bec0377 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Mon, 30 Apr 2012 15:22:27 +0200 Subject: [PATCH] nv50/ir/ra: Fix maxGPR calculation for programs with multiple functions. --- src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp index b74faec1d4f..dbf43d43039 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp @@ -1338,7 +1338,7 @@ GCRA::allocateRegisters(ArrayList& insns) if (prog->dbgFlags & NV50_IR_DEBUG_REG_ALLOC) func->print(); } else { - prog->maxGPR = regs.getMaxAssigned(FILE_GPR); + prog->maxGPR = std::max(prog->maxGPR, regs.getMaxAssigned(FILE_GPR)); } out: -- 2.30.2