[Mesa-dev] [PATCH] radeon/llvm: fix calculation of max register number
Tom Stellard
tstellar at gmail.com
Tue Jul 31 15:16:49 PDT 2012
On Tue, Jul 31, 2012 at 06:40:11PM +0200, Christian König wrote:
> Signed-off-by: Christian König <deathsimple at vodafone.de>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
> ---
> src/gallium/drivers/radeon/SICodeEmitter.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeon/SICodeEmitter.cpp b/src/gallium/drivers/radeon/SICodeEmitter.cpp
> index a7647aa..9fc4aab 100644
> --- a/src/gallium/drivers/radeon/SICodeEmitter.cpp
> +++ b/src/gallium/drivers/radeon/SICodeEmitter.cpp
> @@ -154,7 +154,7 @@ void SICodeEmitter::InitProgramInfo(MachineFunction &MF) {
> assert("!Unknown register class");
> }
> hwReg = RI->getHWRegNum(reg);
> - maxUsed = ((hwReg + 1) * width) - 1;
> + maxUsed = hwReg + width - 1;
> if (isSGPR) {
> MaxSGPR = maxUsed > MaxSGPR ? maxUsed : MaxSGPR;
> } else {
> --
> 1.7.9.5
>
More information about the mesa-dev
mailing list