From b56afe1a4f019a98356afe0a76fe9dcf719a817a Mon Sep 17 00:00:00 2001 From: George Kyriazis Date: Wed, 28 Feb 2018 17:33:13 -0600 Subject: [PATCH] swr/rast: Add tracking for stream out topology Reviewed-by: Bruce Cherniak --- src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp | 6 +++--- src/gallium/drivers/swr/rasterizer/archrast/events.proto | 1 + .../drivers/swr/rasterizer/archrast/events_private.proto | 2 ++ src/gallium/drivers/swr/rasterizer/core/api.cpp | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp index af18b161eaf..1f87dbabcd0 100644 --- a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp +++ b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp @@ -87,8 +87,8 @@ namespace ArchRast { DrawInfoEvent e(event.data.drawId, ArchRast::Instanced, event.data.topology, event.data.numVertices, 0, 0, event.data.startVertex, event.data.numInstances, - event.data.startInstance, event.data.tsEnable, event.data.gsEnable, event.data.soEnable, event.data.splitId); - + event.data.startInstance, event.data.tsEnable, event.data.gsEnable, event.data.soEnable, event.data.soTopology, event.data.splitId); + EventHandlerFile::Handle(e); } @@ -96,7 +96,7 @@ namespace ArchRast { DrawInfoEvent e(event.data.drawId, ArchRast::IndexedInstanced, event.data.topology, 0, event.data.numIndices, event.data.indexOffset, event.data.baseVertex, event.data.numInstances, - event.data.startInstance, event.data.tsEnable, event.data.gsEnable, event.data.soEnable, event.data.splitId); + event.data.startInstance, event.data.tsEnable, event.data.gsEnable, event.data.soEnable, event.data.soTopology, event.data.splitId); EventHandlerFile::Handle(e); } diff --git a/src/gallium/drivers/swr/rasterizer/archrast/events.proto b/src/gallium/drivers/swr/rasterizer/archrast/events.proto index 45193a33fd3..7d9a68d502e 100644 --- a/src/gallium/drivers/swr/rasterizer/archrast/events.proto +++ b/src/gallium/drivers/swr/rasterizer/archrast/events.proto @@ -51,6 +51,7 @@ event DrawInfoEvent uint32_t tsEnable; uint32_t gsEnable; uint32_t soEnable; + uint32_t soTopology; uint32_t splitId; // Split draw count or id. }; diff --git a/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto b/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto index 760f7aa4957..f0a93107e5e 100644 --- a/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto +++ b/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto @@ -131,6 +131,7 @@ event DrawInstancedEvent uint32_t tsEnable; uint32_t gsEnable; uint32_t soEnable; + uint32_t soTopology; uint32_t splitId; // Split draw count or id. }; @@ -146,5 +147,6 @@ event DrawIndexedInstancedEvent uint32_t tsEnable; uint32_t gsEnable; uint32_t soEnable; + uint32_t soTopology; uint32_t splitId; // Split draw count or id. }; diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp index 86864f022aa..b2529598bd1 100644 --- a/src/gallium/drivers/swr/rasterizer/core/api.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/api.cpp @@ -1221,7 +1221,7 @@ void DrawInstanced( QueueDraw(pContext); AR_API_EVENT(DrawInstancedEvent(pDC->drawId, topology, numVertsForDraw, startVertex, numInstances, - startInstance, pState->tsState.tsEnable, pState->gsState.gsEnable, pState->soState.soEnable, draw)); + startInstance, pState->tsState.tsEnable, pState->gsState.gsEnable, pState->soState.soEnable, pState->gsState.outputTopology, draw)); remainingVerts -= numVertsForDraw; draw++; @@ -1366,7 +1366,7 @@ void DrawIndexedInstance( QueueDraw(pContext); AR_API_EVENT(DrawIndexedInstancedEvent(pDC->drawId, topology, numIndicesForDraw, indexOffset, baseVertex, - numInstances, startInstance, pState->tsState.tsEnable, pState->gsState.gsEnable, pState->soState.soEnable, draw)); + numInstances, startInstance, pState->tsState.tsEnable, pState->gsState.gsEnable, pState->soState.soEnable, pState->gsState.outputTopology, draw)); pIB += maxIndicesPerDraw * indexSize; remainingIndices -= numIndicesForDraw; -- 2.30.2