event DrawInstancedEvent
{
- uint32_t id;
+ uint32_t drawId;
uint32_t topology;
uint32_t numVertices;
int32_t startVertex;
event DrawIndexedInstancedEvent
{
- uint32_t id;
+ uint32_t drawId;
uint32_t topology;
uint32_t numIndices;
int32_t indexOffset;
event DispatchEvent
{
- uint32_t id;
+ uint32_t drawId;
uint32_t threadGroupCountX;
uint32_t threadGroupCountY;
uint32_t threadGroupCountZ;
event FrontendStatsEvent
{
+ uint32_t drawId;
uint64_t IaVertices;
uint64_t IaPrimitives;
uint64_t VsInvocations;
event BackendStatsEvent
{
+ uint32_t drawId;
uint64_t DepthPassCount;
uint64_t PsInvocations;
uint64_t CsInvocations;
{
SWR_STATS_FE& stats = pDC->dynState.statsFE;
- AR_EVENT(FrontendStatsEvent(
+ AR_EVENT(FrontendStatsEvent(pDC->drawId,
stats.IaVertices, stats.IaPrimitives, stats.VsInvocations, stats.HsInvocations,
stats.DsInvocations, stats.GsInvocations, stats.GsPrimitives, stats.CInvocations, stats.CPrimitives,
stats.SoPrimStorageNeeded[0], stats.SoPrimStorageNeeded[1], stats.SoPrimStorageNeeded[2], stats.SoPrimStorageNeeded[3],
% for name in protos['event_names']:
//////////////////////////////////////////////////////////////////////////
- /// ${name}
+ /// ${name}Data
//////////////////////////////////////////////////////////////////////////
- struct ${name} : Event
+#pragma pack(push, 1)
+ struct ${name}Data
{<%
field_names = protos['events'][name]['field_names']
field_types = protos['events'][name]['field_types'] %>
% for i in range(len(field_names)):
${field_types[i]} ${field_names[i]};
% endfor
+ };
+#pragma pack(pop)
+
+ //////////////////////////////////////////////////////////////////////////
+ /// ${name}
+ //////////////////////////////////////////////////////////////////////////
+ struct ${name} : Event
+ {<%
+ field_names = protos['events'][name]['field_names']
+ field_types = protos['events'][name]['field_types'] %>
+ ${name}Data data;
// Constructor
${name}(
% endfor
{
% for i in range(len(field_names)):
- this->${field_names[i]} = ${field_names[i]};
+ data.${field_names[i]} = ${field_names[i]};
% endfor
}
% for name in protos['event_names']:
virtual void handle(${name}& event)
{
- write(${protos['events'][name]['event_id']}, (char*)&event, sizeof(event));
+ write(${protos['events'][name]['event_id']}, (char*)&event.data, sizeof(event.data));
}
% endfor