Check macro existence instead of relying on the compiler turning undef into 0.
Signed-off-by: Eric Engestrom <eric.engest...@imgtec.com> --- src/amd/addrlib/core/addrlib1.cpp | 2 +- src/amd/addrlib/r800/egbaddrlib.cpp | 4 ++-- src/amd/addrlib/r800/siaddrlib.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/amd/addrlib/core/addrlib1.cpp b/src/amd/addrlib/core/addrlib1.cpp index c796a63436c71969ddcd..86cd66aee43c4487ffe5 100644 --- a/src/amd/addrlib/core/addrlib1.cpp +++ b/src/amd/addrlib/core/addrlib1.cpp @@ -236,7 +236,7 @@ ADDR_E_RETURNCODE Lib::ComputeSurfaceInfo( pOut->last2DLevel = FALSE; pOut->tcCompatible = FALSE; -#if !ALT_TEST +#ifndef ALT_TEST if (localIn.numSamples > 1) { ADDR_ASSERT(localIn.mipLevel == 0); diff --git a/src/amd/addrlib/r800/egbaddrlib.cpp b/src/amd/addrlib/r800/egbaddrlib.cpp index 99aa6cf4cdb52affe42c..854d4cbe8ad87f70db14 100644 --- a/src/amd/addrlib/r800/egbaddrlib.cpp +++ b/src/amd/addrlib/r800/egbaddrlib.cpp @@ -242,7 +242,7 @@ BOOL_32 EgBasedLib::ComputeSurfaceInfoLinear( if ((pIn->tileMode == ADDR_TM_LINEAR_GENERAL) && pIn->flags.color && (pIn->height > 1)) { -#if !ALT_TEST +#ifndef ALT_TEST // When linear_general surface is accessed in multiple lines, it requires 8 pixels in pitch // alignment since PITCH_TILE_MAX is in unit of 8 pixels. // It is OK if it is accessed per line. @@ -3905,7 +3905,7 @@ ADDR_E_RETURNCODE EgBasedLib::HwlComputeSurfaceAddrFromCoord( ADDR_E_RETURNCODE retCode = ADDR_OK; if ( -#if !ALT_TEST // Overflow test needs this out-of-boundary coord +#ifndef ALT_TEST // Overflow test needs this out-of-boundary coord (pIn->x > pIn->pitch) || (pIn->y > pIn->height) || #endif diff --git a/src/amd/addrlib/r800/siaddrlib.cpp b/src/amd/addrlib/r800/siaddrlib.cpp index 0fb5c2befdc2a3ad7590..70f0d5cb240ad01de2be 100644 --- a/src/amd/addrlib/r800/siaddrlib.cpp +++ b/src/amd/addrlib/r800/siaddrlib.cpp @@ -1834,7 +1834,7 @@ UINT_64 SiLib::HwlGetSizeAdjustmentMicroTiled( physicalSliceSize = logicalSliceSize * thickness; } -#if !ALT_TEST +#ifndef ALT_TEST // // Special workaround for depth/stencil buffer, use 8 bpp to align depth buffer again since // the stencil plane may have larger pitch if the slice size is smaller than base alignment. -- Cheers, Eric _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev