Mesa (master): swr/rast: Remove draw type from event definitions
George Kyriazis
gkyriazis at kemper.freedesktop.org
Wed Feb 28 17:49:04 UTC 2018
Module: Mesa
Branch: master
Commit: 190ead3d79f1f4037c08f7d6a87d9a1a955ff30d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=190ead3d79f1f4037c08f7d6a87d9a1a955ff30d
Author: George Kyriazis <george.kyriazis at intel.com>
Date: Tue Feb 13 17:38:55 2018 -0600
swr/rast: Remove draw type from event definitions
- Have the draw type sent to DrawInfoEvent in handlers created in
archrast.cpp. The draw type no longer needs to be sent during during
AR_API_EVENT() call in api.cpp.
- Remove draw type from event defintions in events_private.proto, no
longer needed
Reviewed-By: Bruce Cherniak <bruce.cherniak at intel.com>
---
src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp | 8 ++++----
src/gallium/drivers/swr/rasterizer/archrast/events_private.proto | 4 ----
src/gallium/drivers/swr/rasterizer/core/api.cpp | 8 ++++----
3 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp
index d7a3b292d6..8c09411029 100644
--- a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp
+++ b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp
@@ -175,28 +175,28 @@ namespace ArchRast
virtual void Handle(const DrawInstancedEvent& event)
{
- DrawInfoEvent e(event.data.drawId, event.data.type, event.data.topology, event.data.numVertices, 0, 0, event.data.startVertex, event.data.numInstances, event.data.startInstance);
+ DrawInfoEvent e(event.data.drawId, ArchRast::Instanced, event.data.topology, event.data.numVertices, 0, 0, event.data.startVertex, event.data.numInstances, event.data.startInstance);
EventHandlerFile::Handle(e);
}
virtual void Handle(const DrawIndexedInstancedEvent& event)
{
- DrawInfoEvent e(event.data.drawId, event.data.type, event.data.topology, 0, event.data.numIndices, event.data.indexOffset, event.data.baseVertex, event.data.numInstances, event.data.startInstance);
+ 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);
EventHandlerFile::Handle(e);
}
virtual void Handle(const DrawInstancedSplitEvent& event)
{
- DrawInfoEvent e(event.data.drawId, event.data.type, 0, 0, 0, 0, 0, 0, 0);
+ DrawInfoEvent e(event.data.drawId, ArchRast::InstancedSplit, 0, 0, 0, 0, 0, 0, 0);
EventHandlerFile::Handle(e);
}
virtual void Handle(const DrawIndexedInstancedSplitEvent& event)
{
- DrawInfoEvent e(event.data.drawId, event.data.type, 0, 0, 0, 0, 0, 0, 0);
+ DrawInfoEvent e(event.data.drawId, ArchRast::IndexedInstancedSplit, 0, 0, 0, 0, 0, 0, 0);
EventHandlerFile::Handle(e);
}
diff --git a/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto b/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto
index 71b723d5f6..8970141d60 100644
--- a/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto
+++ b/src/gallium/drivers/swr/rasterizer/archrast/events_private.proto
@@ -117,7 +117,6 @@ event ClipInfoEvent
event DrawInstancedEvent
{
uint32_t drawId;
- AR_DRAW_TYPE type;
uint32_t topology;
uint32_t numVertices;
int32_t startVertex;
@@ -128,7 +127,6 @@ event DrawInstancedEvent
event DrawIndexedInstancedEvent
{
uint32_t drawId;
- AR_DRAW_TYPE type;
uint32_t topology;
uint32_t numIndices;
int32_t indexOffset;
@@ -141,12 +139,10 @@ event DrawIndexedInstancedEvent
event DrawInstancedSplitEvent
{
uint32_t drawId;
- AR_DRAW_TYPE type;
};
///@brief API Stat: Split draw event for DrawIndexedInstanced.
event DrawIndexedInstancedSplitEvent
{
uint32_t drawId;
- AR_DRAW_TYPE type;
};
diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp
index cb98cbe7ee..99d3cd5bb0 100644
--- a/src/gallium/drivers/swr/rasterizer/core/api.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/api.cpp
@@ -1169,7 +1169,7 @@ void DrawInstanced(
DRAW_CONTEXT* pDC = GetDrawContext(pContext);
RDTSC_BEGIN(APIDraw, pDC->drawId);
- AR_API_EVENT(DrawInstancedEvent(pDC->drawId, ArchRast::Instanced, topology, numVertices, startVertex, numInstances, startInstance));
+ AR_API_EVENT(DrawInstancedEvent(pDC->drawId, topology, numVertices, startVertex, numInstances, startInstance));
uint32_t maxVertsPerDraw = MaxVertsPerDraw(pDC, numVertices, topology);
uint32_t primsPerDraw = GetNumPrims(topology, maxVertsPerDraw);
@@ -1221,7 +1221,7 @@ void DrawInstanced(
//enqueue DC
QueueDraw(pContext);
- AR_API_EVENT(DrawInstancedSplitEvent(pDC->drawId, ArchRast::InstancedSplit));
+ AR_API_EVENT(DrawInstancedSplitEvent(pDC->drawId));
remainingVerts -= numVertsForDraw;
draw++;
@@ -1297,7 +1297,7 @@ void DrawIndexedInstance(
API_STATE* pState = &pDC->pState->state;
RDTSC_BEGIN(APIDrawIndexed, pDC->drawId);
- AR_API_EVENT(DrawIndexedInstancedEvent(pDC->drawId, ArchRast::IndexedInstancedSplit, topology, numIndices, indexOffset, baseVertex, numInstances, startInstance));
+ AR_API_EVENT(DrawIndexedInstancedEvent(pDC->drawId, topology, numIndices, indexOffset, baseVertex, numInstances, startInstance));
uint32_t maxIndicesPerDraw = MaxVertsPerDraw(pDC, numIndices, topology);
uint32_t primsPerDraw = GetNumPrims(topology, maxIndicesPerDraw);
@@ -1366,7 +1366,7 @@ void DrawIndexedInstance(
//enqueue DC
QueueDraw(pContext);
- AR_API_EVENT(DrawIndexedInstancedSplitEvent(pDC->drawId, ArchRast::IndexedInstancedSplit));
+ AR_API_EVENT(DrawIndexedInstancedSplitEvent(pDC->drawId));
pIB += maxIndicesPerDraw * indexSize;
remainingIndices -= numIndicesForDraw;
More information about the mesa-commit
mailing list