ac: Use the renumbered const address space for LLVM 7.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 13 Feb 2018 22:25:30 +0000 (23:25 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 14 Feb 2018 00:05:03 +0000 (01:05 +0100)
The LLVM AMDGPU backend decided to renumber the constant address
space ....

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/common/ac_llvm_build.h

index e78e9589cf3f5ec158d4608931724c4d5fe12c97..a4d80cd8b00ae01df0d7f66a02e4cdea2fb38d3b 100644 (file)
@@ -35,7 +35,8 @@ extern "C" {
 #endif
 
 enum {
-       AC_CONST_ADDR_SPACE = 2, /* CONST is the only address space that selects SMEM loads */
+       /* CONST is the only address space that selects SMEM loads */
+       AC_CONST_ADDR_SPACE = HAVE_LLVM >= 0x700 ? 4 : 2,
        AC_LOCAL_ADDR_SPACE = 3,
 };