diff options
author | George Kyriazis <[email protected]> | 2018-02-23 16:11:04 -0600 |
---|---|---|
committer | George Kyriazis <[email protected]> | 2018-03-09 09:35:47 -0600 |
commit | 9e25f298eb169c03a566eaea07cf2cc1329012fe (patch) | |
tree | 77318899ebf040032db5fe7c81f90b1dfcfa1d00 /src/gallium | |
parent | d78b28fc335059b058ce7e97c19302c254d1630c (diff) |
swr/rast: Rasterized Subspans stats support
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium')
4 files changed, 30 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp index 8c09411029f..918616157eb 100644 --- a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp +++ b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp @@ -68,6 +68,11 @@ namespace ArchRast uint32_t vertsInput; }; + struct RastStats + { + uint32_t rasterTiles = 0; + }; + ////////////////////////////////////////////////////////////////////////// /// @brief Event handler that saves stat events to event files. This /// handler filters out unwanted events. @@ -227,12 +232,16 @@ namespace ArchRast EventHandlerFile::Handle(EarlyZNullPS(drawId, mDSNullPS.earlyZTestPassCount, mDSNullPS.earlyZTestFailCount)); EventHandlerFile::Handle(EarlyStencilNullPS(drawId, mDSNullPS.earlyStencilTestPassCount, mDSNullPS.earlyStencilTestFailCount)); + // Rasterized Subspans + EventHandlerFile::Handle(RasterTiles(drawId, rastStats.rasterTiles)); + //Reset Internal Counters mDSSingleSample = {}; mDSSampleRate = {}; mDSPixelRate = {}; mDSNullPS = {}; + rastStats = {}; mNeedFlush = false; } @@ -267,6 +276,11 @@ namespace ArchRast mTS.inputPrims += event.data.primCount; } + virtual void Handle(const RasterTileCount& event) + { + rastStats.rasterTiles += event.data.rasterTiles; + } + protected: bool mNeedFlush; // Per draw stats @@ -278,6 +292,7 @@ namespace ArchRast CStats mClipper = {}; TEStats mTS = {}; GSStats mGS = {}; + RastStats rastStats = {}; }; diff --git a/src/gallium/drivers/swr/rasterizer/archrast/events.proto b/src/gallium/drivers/swr/rasterizer/archrast/events.proto index 638dfd067c6..4a71e0d36a3 100644 --- a/src/gallium/drivers/swr/rasterizer/archrast/events.proto +++ b/src/gallium/drivers/swr/rasterizer/archrast/events.proto @@ -256,6 +256,12 @@ event TessPrims uint64_t primCount; }; +event RasterTiles +{ + uint32_t drawId; + uint32_t rastTileCount; +}; + event ClipperEvent { uint32_t drawId; diff --git a/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto b/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto index 8970141d60b..a07c4a7f136 100644 --- a/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto +++ b/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto @@ -95,6 +95,12 @@ event TessPrimCount uint64_t primCount; }; +event RasterTileCount +{ + uint32_t drawId; + uint64_t rasterTiles; +}; + event GSPrimInfo { uint64_t inputPrimCount; diff --git a/src/gallium/drivers/swr/rasterizer/core/rasterizer_impl.h b/src/gallium/drivers/swr/rasterizer/core/rasterizer_impl.h index 62856cce8bf..7f9b3788c7f 100644 --- a/src/gallium/drivers/swr/rasterizer/core/rasterizer_impl.h +++ b/src/gallium/drivers/swr/rasterizer/core/rasterizer_impl.h @@ -1268,6 +1268,9 @@ void RasterizeTriangle(DRAW_CONTEXT* pDC, uint32_t workerId, uint32_t macroTile, UnrollerL<1, RT::MT::numSamples, 1>::step(copyCoverage); } + // Track rasterized subspans + AR_EVENT(RasterTileCount(pDC->drawId, 1)); + RDTSC_BEGIN(BEPixelBackend, pDC->drawId); backendFuncs.pfnBackend(pDC, workerId, tileX << KNOB_TILE_X_DIM_SHIFT, tileY << KNOB_TILE_Y_DIM_SHIFT, triDesc, renderBuffers); RDTSC_END(BEPixelBackend, 0); |