summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer/archrast
diff options
context:
space:
mode:
authorGeorge Kyriazis <[email protected]>2018-02-23 16:11:04 -0600
committerGeorge Kyriazis <[email protected]>2018-03-09 09:35:47 -0600
commit9e25f298eb169c03a566eaea07cf2cc1329012fe (patch)
tree77318899ebf040032db5fe7c81f90b1dfcfa1d00 /src/gallium/drivers/swr/rasterizer/archrast
parentd78b28fc335059b058ce7e97c19302c254d1630c (diff)
swr/rast: Rasterized Subspans stats support
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/archrast')
-rw-r--r--src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp15
-rw-r--r--src/gallium/drivers/swr/rasterizer/archrast/events.proto6
-rw-r--r--src/gallium/drivers/swr/rasterizer/archrast/events_private.proto6
3 files changed, 27 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;