amd/addrlib: fix the C++ one definition rule violation
authorMarek Olšák <marek.olsak@amd.com>
Wed, 10 Jun 2020 12:53:40 +0000 (08:53 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 11 Jun 2020 09:11:50 +0000 (05:11 -0400)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1854
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5414>

src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h
src/amd/addrlib/src/gfx9/gfx9addrlib.cpp

index ee49bd883bec4e0336dbf1c526700c6515947df0..43e3738c50339163622d1b33826d6d742f272d0f 100644 (file)
@@ -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;
index cc4d5af4c4fa8eed41a2f623778fc05b2e0175eb..dcc080cbec483a717c06a7d5f962dec06192d863 100644 (file)
@@ -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;