swr/rast: Add tracking for stream out topology
authorGeorge Kyriazis <george.kyriazis@intel.com>
Wed, 28 Feb 2018 23:33:13 +0000 (17:33 -0600)
committerGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 9 Mar 2018 15:36:14 +0000 (09:36 -0600)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp
src/gallium/drivers/swr/rasterizer/archrast/events.proto
src/gallium/drivers/swr/rasterizer/archrast/events_private.proto
src/gallium/drivers/swr/rasterizer/core/api.cpp

index af18b16..1f87dba 100644 (file)
@@ -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);
         }
index 45193a3..7d9a68d 100644 (file)
@@ -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.
 };
 
index 760f7aa..f0a9310 100644 (file)
@@ -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.
 };
index 86864f0..b252959 100644 (file)
@@ -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;