From: Tim Rowley Date: Fri, 7 Oct 2016 14:52:19 +0000 (-0500) Subject: swr: [rasterizer] eliminate unused label warnings on gcc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eaec263427631b3aa3a86f6287f3144381866510;p=mesa.git swr: [rasterizer] eliminate unused label warnings on gcc Signed-off-by: Tim Rowley --- diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h b/src/gallium/drivers/swr/rasterizer/common/os.h index f175a8a19e5..0671c5a56ee 100644 --- a/src/gallium/drivers/swr/rasterizer/common/os.h +++ b/src/gallium/drivers/swr/rasterizer/common/os.h @@ -249,4 +249,10 @@ typedef MEGABYTE GIGABYTE[1024]; #include "common/swr_assert.h" +#ifdef __GNUC__ +#define ATTR_UNUSED __attribute__((unused)) +#else +#define ATTR_UNUSED +#endif + #endif//__SWR_OS_H__ diff --git a/src/gallium/drivers/swr/rasterizer/core/backend.cpp b/src/gallium/drivers/swr/rasterizer/core/backend.cpp index ad9f0d3d300..143bd258afd 100644 --- a/src/gallium/drivers/swr/rasterizer/core/backend.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/backend.cpp @@ -828,6 +828,7 @@ void BackendSampleRate(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t x, uint32_ } Endtile: + ATTR_UNUSED; AR_BEGIN(BEEndTile, pDC->drawId); if(T::InputCoverage == SWR_INPUT_COVERAGE_INNER_CONSERVATIVE) { @@ -1171,6 +1172,7 @@ void BackendNullPS(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t x, uint32_t y, } Endtile: + ATTR_UNUSED; work.coverageMask[sample] >>= (SIMD_TILE_Y_DIM * SIMD_TILE_X_DIM); } pDepthBase += (KNOB_SIMD_WIDTH * FormatTraits::bpp) / 8;