diff options
author | Tim Rowley <[email protected]> | 2017-02-15 23:57:50 -0800 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2017-03-20 18:04:53 -0500 |
commit | 5830a0a6f8aeb25c5365a849600f2f35d9257ee9 (patch) | |
tree | b7f70b34021d6ee34d3eeeacdc54982e044dba5a /src/gallium/drivers/swr | |
parent | d2759c1eb3b77e9d86c52f2f8e6471a8f339228d (diff) |
swr: [rasterizer archrast] Add additional API events
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/archrast/events.proto | 36 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/api.cpp | 12 |
2 files changed, 48 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/archrast/events.proto b/src/gallium/drivers/swr/rasterizer/archrast/events.proto index 95cb79bd69f..1afad3b5efc 100644 --- a/src/gallium/drivers/swr/rasterizer/archrast/events.proto +++ b/src/gallium/drivers/swr/rasterizer/archrast/events.proto @@ -140,6 +140,42 @@ event FrameEndEvent uint32_t nextDrawId; }; +///@brief API Stat: Split draw event for DrawInstanced. In certain cases, Rasty can split draws up into smaller draws. +event DrawInstancedSplitEvent +{ + uint32_t drawId; +}; + +///@brief API Stat: Split draw event for DrawIndexedInstanced. +event DrawIndexedInstancedSplitEvent +{ + uint32_t drawId; +}; + +///@brief API Stat: Synchonization event. +event SwrSyncEvent +{ + uint32_t drawId; +}; + +///@brief API Stat: Invalidate hot tiles (i.e. tile cache) +event SwrInvalidateTilesEvent +{ + uint32_t drawId; +}; + +///@brief API Stat: Invalidate and discard hot tiles within pixel region +event SwrDiscardRectEvent +{ + uint32_t drawId; +}; + +///@brief API Stat: Flush tiles out to memory that is typically owned by driver (e.g. Flush RT cache) +event SwrStoreTilesEvent +{ + uint32_t drawId; +}; + event FrontendStatsEvent { uint32_t drawId; diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp index b99df2dc669..90503ba6de4 100644 --- a/src/gallium/drivers/swr/rasterizer/core/api.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/api.cpp @@ -455,6 +455,8 @@ void SwrSync(HANDLE hContext, PFN_CALLBACK_FUNC pfnFunc, uint64_t userData, uint pDC->retireCallback.userData2 = userData2; pDC->retireCallback.userData3 = userData3; + AR_API_EVENT(SwrSyncEvent(pDC->drawId)); + //enqueue QueueDraw(pContext); @@ -1138,6 +1140,8 @@ void DrawInstanced( //enqueue DC QueueDraw(pContext); + AR_API_EVENT(DrawInstancedSplitEvent(pDC->drawId)); + remainingVerts -= numVertsForDraw; draw++; } @@ -1283,6 +1287,8 @@ void DrawIndexedInstance( //enqueue DC QueueDraw(pContext); + AR_API_EVENT(DrawIndexedInstancedSplitEvent(pDC->drawId)); + pIB += maxIndicesPerDraw * indexSize; remainingIndices -= numIndicesForDraw; draw++; @@ -1366,6 +1372,8 @@ void SWR_API SwrInvalidateTiles( //enqueue QueueDraw(pContext); + + AR_API_EVENT(SwrInvalidateTilesEvent(pDC->drawId)); } ////////////////////////////////////////////////////////////////////////// @@ -1399,6 +1407,8 @@ void SWR_API SwrDiscardRect( //enqueue QueueDraw(pContext); + + AR_API_EVENT(SwrDiscardRectEvent(pDC->drawId)); } ////////////////////////////////////////////////////////////////////////// @@ -1468,6 +1478,8 @@ void SWR_API SwrStoreTiles( //enqueue QueueDraw(pContext); + AR_API_EVENT(SwrStoreTilesEvent(pDC->drawId)); + AR_API_END(APIStoreTiles, 1); } |