swr/rast: Removed unused variable
authorGeorge Kyriazis <george.kyriazis@intel.com>
Wed, 7 Feb 2018 01:42:06 +0000 (19:42 -0600)
committerGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 16 Feb 2018 16:53:59 +0000 (10:53 -0600)
Gets rid of zillions of unused variable warnings, made worse by templates.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/backend.cpp
src/gallium/drivers/swr/rasterizer/core/backend_impl.h
src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp
src/gallium/drivers/swr/rasterizer/core/backend_singlesample.cpp
src/gallium/drivers/swr/rasterizer/core/binner.cpp
src/gallium/drivers/swr/rasterizer/core/clip.cpp
src/gallium/drivers/swr/rasterizer/core/clip.h
src/gallium/drivers/swr/rasterizer/core/context.h
src/gallium/drivers/swr/rasterizer/core/frontend.cpp
src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp
src/gallium/drivers/swr/rasterizer/core/rasterizer_impl.h

index 5878361be58a16fcd620d6129740284ac4d2c628..ccc7150283d55f25e37e60c200b4277f31faa313 100644 (file)
@@ -199,8 +199,6 @@ void ProcessDiscardInvalidateTilesBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint3
 template<uint32_t sampleCountT>
 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);
index b62ff03bffc45e6d5af4095c58ab2aace873089a..2cfd52e829d29f53c46877d2e2aecbc736c5cc2f 100644 (file)
@@ -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);
 
index 8f0a5b19e63c42deb83771792cd07d55eb20207a..16418f7dc87ee83d6a14e44cf9f460eee4ad6821 100644 (file)
@@ -40,8 +40,6 @@
 template<typename T>
 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);
 
index 57338afe0ccd9a5fd5d19fcd87131dad80c265b1..4cc1ed5266b1c9d211f0161805bf1ae1c99253bc 100644 (file)
@@ -40,8 +40,6 @@
 template<typename T>
 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);
 
index 986ecc6a734f081c932657cd366a872bbc7e56f6..4510b13969cc7b0fa1d278e126b64ada4a94ed49 100644 (file)
@@ -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<const uint32_t *>(&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<const uint32_t *>(&rtIdx);
 
     RDTSC_BEGIN(FEBinLines, pDC->drawId);
index 22d89bc599659c06016760c2814441cc277b6f13..780ca15ce712e1783d84e81849d348ab487e6e6c 100644 (file)
@@ -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<SIMD256, 3> 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<SIMD256, 2> 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<SIMD256, 1> 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 };
index cda40f14f22da1b57c66e0ac7b080e6d3a16c853..f47b4b004d005f65ca613f791efdbfad72efc6e0 100644 (file)
@@ -687,8 +687,6 @@ public:
     {
         SWR_ASSERT(pa.pDC != nullptr);
 
-        SWR_CONTEXT *pContext = pa.pDC->pContext;
-
         BinnerChooser<SIMD_T> binner(pa.binTopology, pa.pDC->pState->state.rastState.conservativeRast);
 
         // update clipper invocations pipeline stat
index 5bae53f380676085a232553ca8c6a66e50142977..a284c422dff9a3a24dca347330fcd37157ec2885 100644 (file)
@@ -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)
index a9b1372d9abf209afd8664b2c28b8dbf0a53d499..c44dd2c2da01c4d730bfaf4b05691b22a7efdfd0 100644 (file)
@@ -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;
 
index 6c5f17d8ec8dce4a8b6490e97582f298ae6cd666..08dd51bf73168932edb872ca788a37e4492d665e 100644 (file)
@@ -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)
     {
index 6dba1b66a75f112d1818ecd8d534aec8841b876a..62856cce8bf5e5ba8a5917dafb6058428e80af89 100644 (file)
@@ -772,8 +772,6 @@ struct GenerateSVInnerCoverage<RT, AllEdgesValidT, InnerConservativeCoverageT>
 {
     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<RT, ValidEdgeMaskT, InnerConservativeCov
 template <typename RT>
 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)