From: Tim Rowley Date: Thu, 16 Feb 2017 07:57:50 +0000 (-0800) Subject: swr: [rasterizer archrast] Add additional API events X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5830a0a6f8aeb25c5365a849600f2f35d9257ee9;p=mesa.git swr: [rasterizer archrast] Add additional API events Reviewed-by: Bruce Cherniak --- 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); }