swr: [rasterizer archrast] Add additional API events

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
Tim Rowley 2017-02-15 23:57:50 -08:00
parent d2759c1eb3
commit 5830a0a6f8
2 changed files with 48 additions and 0 deletions

View File

@ -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;

View File

@ -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);
}