Mesa (master): swr: [rasterizer core] remove all old stats code

Tim Rowley torowley at kemper.freedesktop.org
Wed Aug 10 18:17:13 UTC 2016


Module: Mesa
Branch: master
Commit: f833b694cd04d08ed4742cd49ae478948e4bca3a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f833b694cd04d08ed4742cd49ae478948e4bca3a

Author: Tim Rowley <timothy.o.rowley at intel.com>
Date:   Fri Aug  5 16:45:41 2016 -0600

swr: [rasterizer core] remove all old stats code

Signed-off-by: Tim Rowley <timothy.o.rowley at intel.com>

---

 src/gallium/drivers/swr/rasterizer/core/api.cpp    | 16 -----------
 src/gallium/drivers/swr/rasterizer/core/api.h      | 11 --------
 .../drivers/swr/rasterizer/core/backend.cpp        | 32 ----------------------
 src/gallium/drivers/swr/rasterizer/core/backend.h  |  1 -
 src/gallium/drivers/swr/rasterizer/core/context.h  |  8 ------
 .../drivers/swr/rasterizer/core/frontend.cpp       | 23 ----------------
 src/gallium/drivers/swr/rasterizer/core/frontend.h |  1 -
 7 files changed, 92 deletions(-)

diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp
index 3e1bb33..0797c8a 100644
--- a/src/gallium/drivers/swr/rasterizer/core/api.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/api.cpp
@@ -1510,22 +1510,6 @@ VOID* SwrAllocDrawContextMemory(
 }
 
 //////////////////////////////////////////////////////////////////////////
-/// @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
 /// @param enable - If true then counts are incremented.
diff --git a/src/gallium/drivers/swr/rasterizer/core/api.h b/src/gallium/drivers/swr/rasterizer/core/api.h
index 304169e..4ee04dc 100644
--- a/src/gallium/drivers/swr/rasterizer/core/api.h
+++ b/src/gallium/drivers/swr/rasterizer/core/api.h
@@ -532,17 +532,6 @@ VOID* SWR_API SwrAllocDrawContextMemory(
     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
 /// @param enable - If true then counts are incremented.
diff --git a/src/gallium/drivers/swr/rasterizer/core/backend.cpp b/src/gallium/drivers/swr/rasterizer/core/backend.cpp
index c421179..d360e6c 100644
--- a/src/gallium/drivers/swr/rasterizer/core/backend.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/backend.cpp
@@ -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)
 {
diff --git a/src/gallium/drivers/swr/rasterizer/core/backend.h b/src/gallium/drivers/swr/rasterizer/core/backend.h
index 486a650..27851a1 100644
--- a/src/gallium/drivers/swr/rasterizer/core/backend.h
+++ b/src/gallium/drivers/swr/rasterizer/core/backend.h
@@ -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);
diff --git a/src/gallium/drivers/swr/rasterizer/core/context.h b/src/gallium/drivers/swr/rasterizer/core/context.h
index 163ee5b..c478ee9 100644
--- a/src/gallium/drivers/swr/rasterizer/core/context.h
+++ b/src/gallium/drivers/swr/rasterizer/core/context.h
@@ -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;
 };
 
diff --git a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
index 0f0adf4..e32f743 100644
--- a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
@@ -81,29 +81,6 @@ void ProcessSync(
 }
 
 //////////////////////////////////////////////////////////////////////////
-/// @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.
 /// @param pDC - pointer to draw context.
diff --git a/src/gallium/drivers/swr/rasterizer/core/frontend.h b/src/gallium/drivers/swr/rasterizer/core/frontend.h
index b4e6f9a..d47f17f 100644
--- a/src/gallium/drivers/swr/rasterizer/core/frontend.h
+++ b/src/gallium/drivers/swr/rasterizer/core/frontend.h
@@ -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);
 




More information about the mesa-commit mailing list