summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index d3da8a470a4..9de0112878e 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -100,8 +100,8 @@ static uint64_t si_desc_extract_buffer_address(const uint32_t *desc)
((uint64_t)G_008F04_BASE_ADDRESS_HI(desc[1]) << 32);
/* Sign-extend the 48-bit address. */
- if (va & (1ull << 47))
- va |= 0xffffull << 48;
+ va <<= 16;
+ va = (int64_t)va >> 16;
return va;
}