Mesa (master): ac: Use the renumbered const address space for LLVM 7.

Bas Nieuwenhuizen bnieuwenhuizen at kemper.freedesktop.org
Wed Feb 14 00:37:18 UTC 2018


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

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Tue Feb 13 23:25:30 2018 +0100

ac: Use the renumbered const address space for LLVM 7.

The LLVM AMDGPU backend decided to renumber the constant address
space ....

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

---

 src/amd/common/ac_llvm_build.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h
index e78e9589cf..a4d80cd8b0 100644
--- a/src/amd/common/ac_llvm_build.h
+++ b/src/amd/common/ac_llvm_build.h
@@ -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,
 };
 




More information about the mesa-commit mailing list