Mesa (master): amd/addrlib: fix the C++ one definition rule violation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 11 09:22:57 UTC 2020


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Wed Jun 10 08:53:40 2020 -0400

amd/addrlib: fix the C++ one definition rule violation

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1854

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5414>

---

 src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h | 2 +-
 src/amd/addrlib/src/gfx9/gfx9addrlib.cpp    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h b/src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h
index ee49bd883be..43e3738c503 100644
--- a/src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h
+++ b/src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h
@@ -45,7 +45,7 @@
 #define BIGENDIAN_CPU
 #endif
 
-union GB_ADDR_CONFIG {
+union GB_ADDR_CONFIG_gfx9 {
     struct {
 #if        defined(LITTLEENDIAN_CPU)
         unsigned int                       NUM_PIPES : 3;
diff --git a/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp b/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp
index cc4d5af4c4f..dcc080cbec4 100644
--- a/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp
+++ b/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp
@@ -1046,7 +1046,7 @@ BOOL_32 Gfx9Lib::HwlInitGlobalParams(
 
     if (m_settings.isArcticIsland)
     {
-        GB_ADDR_CONFIG gbAddrConfig;
+        GB_ADDR_CONFIG_gfx9 gbAddrConfig;
 
         gbAddrConfig.u32All = pCreateIn->regValue.gbAddrConfig;
 



More information about the mesa-commit mailing list