From 7070027d7b65a1fa3187ea161f2c3dd5ee4e7e32 Mon Sep 17 00:00:00 2001 From: George Kyriazis Date: Tue, 6 Feb 2018 19:42:06 -0600 Subject: [PATCH] swr/rast: Removed unused variable Gets rid of zillions of unused variable warnings, made worse by templates. Reviewed-by: Bruce Cherniak --- src/gallium/drivers/swr/rasterizer/core/backend.cpp | 2 -- src/gallium/drivers/swr/rasterizer/core/backend_impl.h | 3 --- src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp | 2 -- .../drivers/swr/rasterizer/core/backend_singlesample.cpp | 2 -- src/gallium/drivers/swr/rasterizer/core/binner.cpp | 4 ---- src/gallium/drivers/swr/rasterizer/core/clip.cpp | 6 ------ src/gallium/drivers/swr/rasterizer/core/clip.h | 2 -- src/gallium/drivers/swr/rasterizer/core/context.h | 4 ++-- src/gallium/drivers/swr/rasterizer/core/frontend.cpp | 5 ----- src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp | 3 --- src/gallium/drivers/swr/rasterizer/core/rasterizer_impl.h | 3 --- 11 files changed, 2 insertions(+), 34 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/core/backend.cpp b/src/gallium/drivers/swr/rasterizer/core/backend.cpp index 5878361be58..ccc7150283d 100644 --- a/src/gallium/drivers/swr/rasterizer/core/backend.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/backend.cpp @@ -199,8 +199,6 @@ void ProcessDiscardInvalidateTilesBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint3 template void BackendNullPS(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t x, uint32_t y, SWR_TRIANGLE_DESC &work, RenderOutputBuffers &renderBuffers) { - SWR_CONTEXT *pContext = pDC->pContext; - RDTSC_BEGIN(BENullBackend, pDC->drawId); ///@todo: handle center multisample pattern RDTSC_BEGIN(BESetup, pDC->drawId); diff --git a/src/gallium/drivers/swr/rasterizer/core/backend_impl.h b/src/gallium/drivers/swr/rasterizer/core/backend_impl.h index b62ff03bffc..2cfd52e829d 100644 --- a/src/gallium/drivers/swr/rasterizer/core/backend_impl.h +++ b/src/gallium/drivers/swr/rasterizer/core/backend_impl.h @@ -569,7 +569,6 @@ struct PixelRateZTestLoop uint32_t operator()(simdscalar& activeLanes, SWR_PS_CONTEXT& psContext, const CORE_BUCKETS BEDepthBucket, uint32_t currentSimdIn8x8 = 0) { - SWR_CONTEXT *pContext = pDC->pContext; uint32_t statCount = 0; simdscalar anyDepthSamplePassed = _simd_setzero_ps(); @@ -867,8 +866,6 @@ void BackendPixelRate(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t x, uint32_t ///@todo: Need to move locals off stack to prevent __chkstk's from being generated for the backend - SWR_CONTEXT *pContext = pDC->pContext; - RDTSC_BEGIN(BEPixelRateBackend, pDC->drawId); RDTSC_BEGIN(BESetup, pDC->drawId); diff --git a/src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp b/src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp index 8f0a5b19e63..16418f7dc87 100644 --- a/src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp @@ -40,8 +40,6 @@ template void BackendSampleRate(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t x, uint32_t y, SWR_TRIANGLE_DESC &work, RenderOutputBuffers &renderBuffers) { - SWR_CONTEXT *pContext = pDC->pContext; - RDTSC_BEGIN(BESampleRateBackend, pDC->drawId); RDTSC_BEGIN(BESetup, pDC->drawId); diff --git a/src/gallium/drivers/swr/rasterizer/core/backend_singlesample.cpp b/src/gallium/drivers/swr/rasterizer/core/backend_singlesample.cpp index 57338afe0cc..4cc1ed5266b 100644 --- a/src/gallium/drivers/swr/rasterizer/core/backend_singlesample.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/backend_singlesample.cpp @@ -40,8 +40,6 @@ template void BackendSingleSample(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t x, uint32_t y, SWR_TRIANGLE_DESC &work, RenderOutputBuffers &renderBuffers) { - SWR_CONTEXT *pContext = pDC->pContext; - RDTSC_BEGIN(BESingleSampleBackend, pDC->drawId); RDTSC_BEGIN(BESetup, pDC->drawId); diff --git a/src/gallium/drivers/swr/rasterizer/core/binner.cpp b/src/gallium/drivers/swr/rasterizer/core/binner.cpp index 986ecc6a734..4510b13969c 100644 --- a/src/gallium/drivers/swr/rasterizer/core/binner.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/binner.cpp @@ -648,7 +648,6 @@ void SIMDCALL BinTrianglesImpl( typename SIMD_T::Integer const &viewportIdx, typename SIMD_T::Integer const &rtIdx) { - SWR_CONTEXT *pContext = pDC->pContext; const uint32_t *aRTAI = reinterpret_cast(&rtIdx); RDTSC_BEGIN(FEBinTriangles, pDC->drawId); @@ -1195,8 +1194,6 @@ void BinPostSetupPointsImpl( typename SIMD_T::Integer const &viewportIdx, typename SIMD_T::Integer const &rtIdx) { - SWR_CONTEXT *pContext = pDC->pContext; - RDTSC_BEGIN(FEBinPoints, pDC->drawId); typename SIMD_T::Vec4 &primVerts = prim[0]; @@ -1605,7 +1602,6 @@ void BinPostSetupLinesImpl( typename SIMD_T::Integer const &viewportIdx, typename SIMD_T::Integer const &rtIdx) { - SWR_CONTEXT *pContext = pDC->pContext; const uint32_t *aRTAI = reinterpret_cast(&rtIdx); RDTSC_BEGIN(FEBinLines, pDC->drawId); diff --git a/src/gallium/drivers/swr/rasterizer/core/clip.cpp b/src/gallium/drivers/swr/rasterizer/core/clip.cpp index 22d89bc5996..780ca15ce71 100644 --- a/src/gallium/drivers/swr/rasterizer/core/clip.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/clip.cpp @@ -163,7 +163,6 @@ int ClipTriToPlane( const float *pInPts, int numInPts, void ClipTriangles(DRAW_CONTEXT *pDC, PA_STATE& pa, uint32_t workerId, simdvector prims[], uint32_t primMask, simdscalari const &primId, simdscalari const &viewportIdx, simdscalari const &rtIdx) { - SWR_CONTEXT *pContext = pDC->pContext; RDTSC_BEGIN(FEClipTriangles, pDC->drawId); Clipper clipper(workerId, pDC); clipper.ExecuteStage(pa, prims, primMask, primId, viewportIdx, rtIdx); @@ -173,7 +172,6 @@ void ClipTriangles(DRAW_CONTEXT *pDC, PA_STATE& pa, uint32_t workerId, simdvecto void ClipLines(DRAW_CONTEXT *pDC, PA_STATE& pa, uint32_t workerId, simdvector prims[], uint32_t primMask, simdscalari const &primId, simdscalari const &viewportIdx, simdscalari const &rtIdx) { - SWR_CONTEXT *pContext = pDC->pContext; RDTSC_BEGIN(FEClipLines, pDC->drawId); Clipper clipper(workerId, pDC); clipper.ExecuteStage(pa, prims, primMask, primId, viewportIdx, rtIdx); @@ -183,7 +181,6 @@ void ClipLines(DRAW_CONTEXT *pDC, PA_STATE& pa, uint32_t workerId, simdvector pr void ClipPoints(DRAW_CONTEXT *pDC, PA_STATE& pa, uint32_t workerId, simdvector prims[], uint32_t primMask, simdscalari const &primId, simdscalari const &viewportIdx, simdscalari const &rtIdx) { - SWR_CONTEXT *pContext = pDC->pContext; RDTSC_BEGIN(FEClipPoints, pDC->drawId); Clipper clipper(workerId, pDC); clipper.ExecuteStage(pa, prims, primMask, primId, viewportIdx, rtIdx); @@ -194,7 +191,6 @@ void ClipPoints(DRAW_CONTEXT *pDC, PA_STATE& pa, uint32_t workerId, simdvector p void SIMDCALL ClipTriangles_simd16(DRAW_CONTEXT *pDC, PA_STATE& pa, uint32_t workerId, simd16vector prims[], uint32_t primMask, simd16scalari const &primId, simd16scalari const &viewportIdx, simd16scalari const &rtIdx) { - SWR_CONTEXT *pContext = pDC->pContext; RDTSC_BEGIN(FEClipTriangles, pDC->drawId); enum { VERTS_PER_PRIM = 3 }; @@ -210,7 +206,6 @@ void SIMDCALL ClipTriangles_simd16(DRAW_CONTEXT *pDC, PA_STATE& pa, uint32_t wor void SIMDCALL ClipLines_simd16(DRAW_CONTEXT *pDC, PA_STATE& pa, uint32_t workerId, simd16vector prims[], uint32_t primMask, simd16scalari const &primId, simd16scalari const &viewportIdx, simd16scalari const &rtIdx) { - SWR_CONTEXT *pContext = pDC->pContext; RDTSC_BEGIN(FEClipLines, pDC->drawId); enum { VERTS_PER_PRIM = 2 }; @@ -226,7 +221,6 @@ void SIMDCALL ClipLines_simd16(DRAW_CONTEXT *pDC, PA_STATE& pa, uint32_t workerI void SIMDCALL ClipPoints_simd16(DRAW_CONTEXT *pDC, PA_STATE& pa, uint32_t workerId, simd16vector prims[], uint32_t primMask, simd16scalari const &primId, simd16scalari const &viewportIdx, simd16scalari const &rtIdx) { - SWR_CONTEXT *pContext = pDC->pContext; RDTSC_BEGIN(FEClipPoints, pDC->drawId); enum { VERTS_PER_PRIM = 1 }; diff --git a/src/gallium/drivers/swr/rasterizer/core/clip.h b/src/gallium/drivers/swr/rasterizer/core/clip.h index cda40f14f22..f47b4b004d0 100644 --- a/src/gallium/drivers/swr/rasterizer/core/clip.h +++ b/src/gallium/drivers/swr/rasterizer/core/clip.h @@ -687,8 +687,6 @@ public: { SWR_ASSERT(pa.pDC != nullptr); - SWR_CONTEXT *pContext = pa.pDC->pContext; - BinnerChooser binner(pa.binTopology, pa.pDC->pState->state.rastState.conservativeRast); // update clipper invocations pipeline stat diff --git a/src/gallium/drivers/swr/rasterizer/core/context.h b/src/gallium/drivers/swr/rasterizer/core/context.h index 5bae53f3806..a284c422dff 100644 --- a/src/gallium/drivers/swr/rasterizer/core/context.h +++ b/src/gallium/drivers/swr/rasterizer/core/context.h @@ -523,8 +523,8 @@ struct SWR_CONTEXT #define UPDATE_STAT_FE(name, count) if (GetApiState(pDC).enableStatsFE) { pDC->dynState.statsFE.name += count; } // ArchRast instrumentation framework -#define AR_WORKER_CTX pContext->pArContext[workerId] -#define AR_API_CTX pContext->pArContext[pContext->NumWorkerThreads] +#define AR_WORKER_CTX pDC->pContext->pArContext[workerId] +#define AR_API_CTX pDC->pContext->pArContext[pContext->NumWorkerThreads] #ifdef KNOB_ENABLE_RDTSC #define RDTSC_BEGIN(type, drawid) RDTSC_START(type) diff --git a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp index a9b1372d9ab..c44dd2c2da0 100644 --- a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp @@ -505,8 +505,6 @@ static void StreamOut( uint32_t* pPrimData, uint32_t streamIndex) { - SWR_CONTEXT *pContext = pDC->pContext; - RDTSC_BEGIN(FEStreamout, pDC->drawId); const API_STATE& state = GetApiState(pDC); @@ -799,8 +797,6 @@ static void GeometryShaderStage( #endif simdscalari const &primID) { - SWR_CONTEXT *pContext = pDC->pContext; - RDTSC_BEGIN(FEGeometryShader, pDC->drawId); const API_STATE& state = GetApiState(pDC); @@ -1170,7 +1166,6 @@ static void TessellationStages( #endif simdscalari const &primID) { - SWR_CONTEXT *pContext = pDC->pContext; const API_STATE& state = GetApiState(pDC); const SWR_TS_STATE& tsState = state.tsState; diff --git a/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp b/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp index 6c5f17d8ec8..08dd51bf731 100644 --- a/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp @@ -43,7 +43,6 @@ PFN_WORK_FUNC gRasterizerFuncs[SWR_MULTISAMPLE_TYPE_COUNT][2][2][SWR_INPUT_COVER void RasterizeLine(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, void *pData) { - SWR_CONTEXT *pContext = pDC->pContext; const TRIANGLE_WORK_DESC &workDesc = *((TRIANGLE_WORK_DESC*)pData); #if KNOB_ENABLE_TOSS_POINTS if (KNOB_TOSS_BIN_TRIS) @@ -251,8 +250,6 @@ void RasterizeLine(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, voi void RasterizeSimplePoint(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, void* pData) { - SWR_CONTEXT *pContext = pDC->pContext; - #if KNOB_ENABLE_TOSS_POINTS if (KNOB_TOSS_BIN_TRIS) { diff --git a/src/gallium/drivers/swr/rasterizer/core/rasterizer_impl.h b/src/gallium/drivers/swr/rasterizer/core/rasterizer_impl.h index 6dba1b66a75..62856cce8bf 100644 --- a/src/gallium/drivers/swr/rasterizer/core/rasterizer_impl.h +++ b/src/gallium/drivers/swr/rasterizer/core/rasterizer_impl.h @@ -772,8 +772,6 @@ struct GenerateSVInnerCoverage { INLINE GenerateSVInnerCoverage(DRAW_CONTEXT* pDC, uint32_t workerId, EDGE* pRastEdges, double* pStartQuadEdges, uint64_t &innerCoverageMask) { - SWR_CONTEXT *pContext = pDC->pContext; - double startQuadEdgesAdj[RT::NumEdgesT::value]; for(uint32_t e = 0; e < RT::NumEdgesT::value; ++e) { @@ -839,7 +837,6 @@ struct UpdateEdgeMasksInnerConservative void RasterizeTriangle(DRAW_CONTEXT* pDC, uint32_t workerId, uint32_t macroTile, void* pDesc) { - SWR_CONTEXT *pContext = pDC->pContext; const TRIANGLE_WORK_DESC &workDesc = *((TRIANGLE_WORK_DESC*)pDesc); #if KNOB_ENABLE_TOSS_POINTS if (KNOB_TOSS_BIN_TRIS) -- 2.30.2