From dbf48e88eb11270e080eced8468008ed2c3329cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Thu, 19 Apr 2012 19:14:45 +0200 Subject: [PATCH] radeonsi: Fix VGPR_BIT() definition. Fixes encoding of VOP3 shader instructions. The shift was wrong for source registers 2 and 3, and the resulting value was only 32 bits, so the shift in SICodeEmitter::VOPPostEncode() didn't work as intended. --- 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 0553f0e..ad494fa 100644 --- a/src/gallium/drivers/radeon/SICodeEmitter.cpp +++ b/src/gallium/drivers/radeon/SICodeEmitter.cpp @@ -25,7 +25,7 @@ #include #define LITERAL_REG 255 -#define VGPR_BIT(src_idx) (1 << (8 * (src_idx))) +#define VGPR_BIT(src_idx) (1ULL << (9 * src_idx - 1)) using namespace llvm; namespace { -- 2.7.4