From: Marek Olšák Date: Wed, 10 Jun 2020 12:53:40 +0000 (-0400) Subject: amd/addrlib: fix the C++ one definition rule violation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0fcf55329bed583a7459ae0c6f854d0c034f2a91;p=mesa.git amd/addrlib: fix the C++ one definition rule violation Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1854 Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- 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;