swr: [rasterizer core] remove all old stats code
authorTim Rowley <timothy.o.rowley@intel.com>
Fri, 5 Aug 2016 22:45:41 +0000 (16:45 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Wed, 10 Aug 2016 16:08:45 +0000 (11:08 -0500)
Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
src/gallium/drivers/swr/rasterizer/core/api.cpp
src/gallium/drivers/swr/rasterizer/core/api.h
src/gallium/drivers/swr/rasterizer/core/backend.cpp
src/gallium/drivers/swr/rasterizer/core/backend.h
src/gallium/drivers/swr/rasterizer/core/context.h
src/gallium/drivers/swr/rasterizer/core/frontend.cpp
src/gallium/drivers/swr/rasterizer/core/frontend.h

index 3e1bb336729ffe053ca52130e22426b975fc6d76..0797c8ac86b70932eec66ae74db048682a7a9395 100644 (file)
@@ -1509,22 +1509,6 @@ VOID* SwrAllocDrawContextMemory(
     return pDC->pState->pArena->AllocAligned(size, align);
 }
 
-//////////////////////////////////////////////////////////////////////////
-/// @brief Returns pointer to SWR stats.
-/// @note The counters are atomically incremented by multiple threads.
-///       When calling this, you need to ensure all previous operations
-///       have completed.
-/// @todo If necessary, add a callback to avoid stalling the pipe to
-///       sample the counters.
-/// @param hContext - Handle passed back from SwrCreateContext
-/// @param pStats - SWR will fill this out for caller.
-void SwrGetStats(
-    HANDLE hContext,
-    SWR_STATS* pStats)
-{
-    SWR_ASSERT(0);
-}
-
 //////////////////////////////////////////////////////////////////////////
 /// @brief Enables stats counting
 /// @param hContext - Handle passed back from SwrCreateContext
index 304169eda78728a444ba523efb6aa54cd0b9c45e..4ee04dc1368f70ab6d6f744e8b670b05747980ee 100644 (file)
@@ -531,17 +531,6 @@ VOID* SWR_API SwrAllocDrawContextMemory(
     uint32_t size,
     uint32_t align);
 
-//////////////////////////////////////////////////////////////////////////
-/// @brief Returns pointer to SWR stats.
-/// @note The counters are incremented by multiple threads.
-///       When calling this, you need to ensure all previous operations
-///       have completed.
-/// @param hContext - Handle passed back from SwrCreateContext
-/// @param pStats - SWR will fill this out for caller.
-void SWR_API SwrGetStats(
-    HANDLE hContext,
-    SWR_STATS* pStats);
-
 //////////////////////////////////////////////////////////////////////////
 /// @brief Enables stats counting
 /// @param hContext - Handle passed back from SwrCreateContext
index c421179d5ebbe18ca5199c60f76ebad325699787..d360e6cb6a2cd038705ac1d90b0d409d3b9f6fe7 100644 (file)
@@ -85,38 +85,6 @@ void ProcessSyncBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, voi
     SWR_ASSERT(x == 0 && y == 0);
 }
 
-void ProcessQueryStatsBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, void *pUserData)
-{
-    QUERY_DESC* pQueryDesc = (QUERY_DESC*)pUserData;
-    SWR_STATS* pStats = pQueryDesc->pStats;
-    SWR_CONTEXT *pContext = pDC->pContext;
-
-    SWR_ASSERT(pStats != nullptr);
-
-    for (uint32_t i = 0; i < pContext->NumWorkerThreads; ++i)
-    {
-        pStats->DepthPassCount += pContext->stats[i].DepthPassCount;
-
-        pStats->IaVertices    += pContext->stats[i].IaVertices;
-        pStats->IaPrimitives  += pContext->stats[i].IaPrimitives;
-        pStats->VsInvocations += pContext->stats[i].VsInvocations;
-        pStats->HsInvocations += pContext->stats[i].HsInvocations;
-        pStats->DsInvocations += pContext->stats[i].DsInvocations;
-        pStats->GsInvocations += pContext->stats[i].GsInvocations;
-        pStats->PsInvocations += pContext->stats[i].PsInvocations;
-        pStats->CInvocations  += pContext->stats[i].CInvocations;
-        pStats->CsInvocations += pContext->stats[i].CsInvocations;
-        pStats->CPrimitives   += pContext->stats[i].CPrimitives;
-        pStats->GsPrimitives  += pContext->stats[i].GsPrimitives;
-
-        for (uint32_t stream = 0; stream < MAX_SO_STREAMS; ++stream)
-        {
-            pStats->SoPrimStorageNeeded[stream] += pContext->stats[i].SoPrimStorageNeeded[stream];
-            pStats->SoNumPrimsWritten[stream] += pContext->stats[i].SoNumPrimsWritten[stream];
-        }
-    }
-}
-
 template<SWR_FORMAT format>
 void ClearRasterTile(uint8_t *pTileBuffer, simdvector &value)
 {
index 486a6500a1cb48239f794163469c144880a30e95..27851a1156c3fee84c47f162d9039d2a2fa1a72a 100644 (file)
@@ -35,7 +35,6 @@
 
 void ProcessComputeBE(DRAW_CONTEXT* pDC, uint32_t workerId, uint32_t threadGroupId, void*& pSpillFillBuffer);
 void ProcessSyncBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, void *pUserData);
-void ProcessQueryStatsBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, void *pUserData);
 void ProcessClearBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, void *pUserData);
 void ProcessStoreTileBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, void *pData);
 void ProcessDiscardInvalidateTilesBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, void *pData);
index 163ee5b1245fed72b3ec52ea6c7a79303a18a3a0..c478ee9c261646d65afd52309ac0b97df5d85da6 100644 (file)
@@ -132,11 +132,6 @@ struct SYNC_DESC
     uint64_t userData3;
 };
 
-struct QUERY_DESC
-{
-    SWR_STATS* pStats;
-};
-
 struct STORE_TILES_DESC
 {
     SWR_RENDERTARGET_ATTACHMENT attachment;
@@ -159,7 +154,6 @@ enum WORK_TYPE
     CLEAR,
     DISCARDINVALIDATETILES,
     STORETILES,
-    QUERYSTATS,
 };
 
 struct BE_WORK
@@ -173,7 +167,6 @@ struct BE_WORK
         CLEAR_DESC clear;
         DISCARD_INVALIDATE_TILES_DESC discardInvalidateTiles;
         STORE_TILES_DESC storeTiles;
-        QUERY_DESC queryStats;
     } desc;
 };
 
@@ -210,7 +203,6 @@ struct FE_WORK
         CLEAR_DESC clear;
         DISCARD_INVALIDATE_TILES_DESC discardInvalidateTiles;
         STORE_TILES_DESC storeTiles;
-        QUERY_DESC queryStats;
     } desc;
 };
 
index 0f0adf45cbc12c2ea34f8d68cdb7892090b104cb..e32f743de7e20f336ab1baa617349deb4fa3d1a7 100644 (file)
@@ -80,29 +80,6 @@ void ProcessSync(
     pTileMgr->enqueue(0, 0, &work);
 }
 
-//////////////////////////////////////////////////////////////////////////
-/// @brief FE handler for SwrGetStats.
-/// @param pContext - pointer to SWR context.
-/// @param pDC - pointer to draw context.
-/// @param workerId - thread's worker id. Even thread has a unique id.
-/// @param pUserData - Pointer to user data passed back to stats callback.
-/// @todo This should go away when we switch this to use compute threading.
-void ProcessQueryStats(
-    SWR_CONTEXT *pContext,
-    DRAW_CONTEXT *pDC,
-    uint32_t workerId,
-    void *pUserData)
-{
-    QUERY_DESC *pQueryStats = (QUERY_DESC*)pUserData;
-    BE_WORK work;
-    work.type = QUERYSTATS;
-    work.pfnWork = ProcessQueryStatsBE;
-    work.desc.queryStats = *pQueryStats;
-
-    MacroTileMgr *pTileMgr = pDC->pTileMgr;
-    pTileMgr->enqueue(0, 0, &work);
-}
-
 //////////////////////////////////////////////////////////////////////////
 /// @brief FE handler for SwrClearRenderTarget.
 /// @param pContext - pointer to SWR context.
index b4e6f9a460d20b4ba9677e842bdbff082517c6bd..d47f17f42352f03edb820f61e15c54dfa002cab9 100644 (file)
@@ -284,7 +284,6 @@ void ProcessClear(SWR_CONTEXT *pContext, DRAW_CONTEXT *pDC, uint32_t workerId, v
 void ProcessStoreTiles(SWR_CONTEXT *pContext, DRAW_CONTEXT *pDC, uint32_t workerId, void *pUserData);
 void ProcessDiscardInvalidateTiles(SWR_CONTEXT *pContext, DRAW_CONTEXT *pDC, uint32_t workerId, void *pUserData);
 void ProcessSync(SWR_CONTEXT *pContext, DRAW_CONTEXT *pDC, uint32_t workerId, void *pUserData);
-void ProcessQueryStats(SWR_CONTEXT *pContext, DRAW_CONTEXT *pDC, uint32_t workerId, void *pUserData);
 
 PFN_PROCESS_PRIMS GetBinTrianglesFunc(bool IsConservative);