Module: Mesa
Branch: master
Commit: 6574fe3c4a9e36791cde88dfd73429ba4faf3215
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6574fe3c4a9e36791cde88dfd73429ba4faf3215

Author: Christian König <deathsim...@vodafone.de>
Date:   Tue Jul 31 18:30:45 2012 +0200

radeon/llvm: fix calculation of max register number

Signed-off-by: Christian König <deathsim...@vodafone.de>
Reviewed-by: Tom Stellard <thomas.stell...@amd.com>

---

 src/gallium/drivers/radeon/SICodeEmitter.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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 {

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to