From: Tim Rowley Date: Fri, 17 Feb 2017 22:14:06 +0000 (-0800) Subject: swr: [rasterizer archrast] Remove redundant data from archrast files X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0a36a7cf04d4f0e638e702aee9a03c91cdbc1d1a;p=mesa.git swr: [rasterizer archrast] Remove redundant data from archrast files If count can be derived from other counts then this can be done in post processing scripts. Reviewed-by: Bruce Cherniak --- diff --git a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp index 2798223356a..ad4d20c2479 100644 --- a/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp +++ b/src/gallium/drivers/swr/rasterizer/archrast/archrast.cpp @@ -46,10 +46,6 @@ namespace ArchRast uint32_t earlyStencilTestFailCount = 0; uint32_t lateStencilTestPassCount = 0; uint32_t lateStencilTestFailCount = 0; - uint32_t earlyZTestCount = 0; - uint32_t lateZTestCount = 0; - uint32_t earlyStencilTestCount = 0; - uint32_t lateStencilTestCount = 0; }; struct CStats @@ -87,12 +83,10 @@ namespace ArchRast //earlyZ test compute mDSSingleSample.earlyZTestPassCount += _mm_popcnt_u32(event.data.depthPassMask); mDSSingleSample.earlyZTestFailCount += _mm_popcnt_u32((!event.data.depthPassMask) & event.data.coverageMask); - mDSSingleSample.earlyZTestCount += (_mm_popcnt_u32(event.data.depthPassMask) + _mm_popcnt_u32((!event.data.depthPassMask) & event.data.coverageMask)); //earlyStencil test compute mDSSingleSample.earlyStencilTestPassCount += _mm_popcnt_u32(event.data.stencilPassMask); mDSSingleSample.earlyStencilTestFailCount += _mm_popcnt_u32((!event.data.stencilPassMask) & event.data.coverageMask); - mDSSingleSample.earlyStencilTestCount += (_mm_popcnt_u32(event.data.stencilPassMask) + _mm_popcnt_u32((!event.data.stencilPassMask) & event.data.coverageMask)); } virtual void Handle(const EarlyDepthStencilInfoSampleRate& event) @@ -100,12 +94,10 @@ namespace ArchRast //earlyZ test compute mDSSampleRate.earlyZTestPassCount += _mm_popcnt_u32(event.data.depthPassMask); mDSSampleRate.earlyZTestFailCount += _mm_popcnt_u32((!event.data.depthPassMask) & event.data.coverageMask); - mDSSampleRate.earlyZTestCount += (_mm_popcnt_u32(event.data.depthPassMask) + _mm_popcnt_u32((!event.data.depthPassMask) & event.data.coverageMask)); //earlyStencil test compute mDSSampleRate.earlyStencilTestPassCount += _mm_popcnt_u32(event.data.stencilPassMask); mDSSampleRate.earlyStencilTestFailCount += _mm_popcnt_u32((!event.data.stencilPassMask) & event.data.coverageMask); - mDSSampleRate.earlyStencilTestCount += (_mm_popcnt_u32(event.data.stencilPassMask) + _mm_popcnt_u32((!event.data.stencilPassMask) & event.data.coverageMask)); } virtual void Handle(const EarlyDepthStencilInfoNullPS& event) @@ -113,12 +105,10 @@ namespace ArchRast //earlyZ test compute mDSNullPS.earlyZTestPassCount += _mm_popcnt_u32(event.data.depthPassMask); mDSNullPS.earlyZTestFailCount += _mm_popcnt_u32((!event.data.depthPassMask) & event.data.coverageMask); - mDSNullPS.earlyZTestCount += (_mm_popcnt_u32(event.data.depthPassMask) + _mm_popcnt_u32((!event.data.depthPassMask) & event.data.coverageMask)); //earlyStencil test compute mDSNullPS.earlyStencilTestPassCount += _mm_popcnt_u32(event.data.stencilPassMask); mDSNullPS.earlyStencilTestFailCount += _mm_popcnt_u32((!event.data.stencilPassMask) & event.data.coverageMask); - mDSNullPS.earlyStencilTestCount += (_mm_popcnt_u32(event.data.stencilPassMask) + _mm_popcnt_u32((!event.data.stencilPassMask) & event.data.coverageMask)); } virtual void Handle(const LateDepthStencilInfoSingleSample& event) @@ -126,12 +116,10 @@ namespace ArchRast //lateZ test compute mDSSingleSample.lateZTestPassCount += _mm_popcnt_u32(event.data.depthPassMask); mDSSingleSample.lateZTestFailCount += _mm_popcnt_u32((!event.data.depthPassMask) & event.data.coverageMask); - mDSSingleSample.lateZTestCount += (_mm_popcnt_u32(event.data.depthPassMask) + _mm_popcnt_u32((!event.data.depthPassMask) & event.data.coverageMask)); //lateStencil test compute mDSSingleSample.lateStencilTestPassCount += _mm_popcnt_u32(event.data.stencilPassMask); mDSSingleSample.lateStencilTestFailCount += _mm_popcnt_u32((!event.data.stencilPassMask) & event.data.coverageMask); - mDSSingleSample.lateStencilTestCount += (_mm_popcnt_u32(event.data.stencilPassMask) + _mm_popcnt_u32((!event.data.stencilPassMask) & event.data.coverageMask)); } virtual void Handle(const LateDepthStencilInfoSampleRate& event) @@ -139,12 +127,10 @@ namespace ArchRast //lateZ test compute mDSSampleRate.lateZTestPassCount += _mm_popcnt_u32(event.data.depthPassMask); mDSSampleRate.lateZTestFailCount += _mm_popcnt_u32((!event.data.depthPassMask) & event.data.coverageMask); - mDSSampleRate.lateZTestCount += (_mm_popcnt_u32(event.data.depthPassMask) + _mm_popcnt_u32((!event.data.depthPassMask) & event.data.coverageMask)); //lateStencil test compute mDSSampleRate.lateStencilTestPassCount += _mm_popcnt_u32(event.data.stencilPassMask); mDSSampleRate.lateStencilTestFailCount += _mm_popcnt_u32((!event.data.stencilPassMask) & event.data.coverageMask); - mDSSampleRate.lateStencilTestCount += (_mm_popcnt_u32(event.data.stencilPassMask) + _mm_popcnt_u32((!event.data.stencilPassMask) & event.data.coverageMask)); } virtual void Handle(const LateDepthStencilInfoNullPS& event) @@ -152,18 +138,15 @@ namespace ArchRast //lateZ test compute mDSNullPS.lateZTestPassCount += _mm_popcnt_u32(event.data.depthPassMask); mDSNullPS.lateZTestFailCount += _mm_popcnt_u32((!event.data.depthPassMask) & event.data.coverageMask); - mDSNullPS.lateZTestCount += (_mm_popcnt_u32(event.data.depthPassMask) + _mm_popcnt_u32((!event.data.depthPassMask) & event.data.coverageMask)); //lateStencil test compute mDSNullPS.lateStencilTestPassCount += _mm_popcnt_u32(event.data.stencilPassMask); mDSNullPS.lateStencilTestFailCount += _mm_popcnt_u32((!event.data.stencilPassMask) & event.data.coverageMask); - mDSNullPS.lateStencilTestCount += (_mm_popcnt_u32(event.data.stencilPassMask) + _mm_popcnt_u32((!event.data.stencilPassMask) & event.data.coverageMask)); } virtual void Handle(const EarlyDepthInfoPixelRate& event) { //earlyZ test compute - mDSPixelRate.earlyZTestCount += _mm_popcnt_u32(event.data.activeLanes); mDSPixelRate.earlyZTestPassCount += event.data.depthPassCount; mDSPixelRate.earlyZTestFailCount += (_mm_popcnt_u32(event.data.activeLanes) - event.data.depthPassCount); } @@ -172,7 +155,6 @@ namespace ArchRast virtual void Handle(const LateDepthInfoPixelRate& event) { //lateZ test compute - mDSPixelRate.lateZTestCount += _mm_popcnt_u32(event.data.activeLanes); mDSPixelRate.lateZTestPassCount += event.data.depthPassCount; mDSPixelRate.lateZTestFailCount += (_mm_popcnt_u32(event.data.activeLanes) - event.data.depthPassCount); @@ -182,25 +164,25 @@ namespace ArchRast virtual void Handle(const BackendDrawEndEvent& event) { //singleSample - EventHandlerFile::Handle(EarlyZSingleSample(event.data.drawId, mDSSingleSample.earlyZTestPassCount, mDSSingleSample.earlyZTestFailCount, mDSSingleSample.earlyZTestCount)); - EventHandlerFile::Handle(LateZSingleSample(event.data.drawId, mDSSingleSample.lateZTestPassCount, mDSSingleSample.lateZTestFailCount, mDSSingleSample.lateZTestCount)); - EventHandlerFile::Handle(EarlyStencilSingleSample(event.data.drawId, mDSSingleSample.earlyStencilTestPassCount, mDSSingleSample.earlyStencilTestFailCount, mDSSingleSample.earlyStencilTestCount)); - EventHandlerFile::Handle(LateStencilSingleSample(event.data.drawId, mDSSingleSample.lateStencilTestPassCount, mDSSingleSample.lateStencilTestFailCount, mDSSingleSample.lateStencilTestCount)); + EventHandlerFile::Handle(EarlyZSingleSample(event.data.drawId, mDSSingleSample.earlyZTestPassCount, mDSSingleSample.earlyZTestFailCount)); + EventHandlerFile::Handle(LateZSingleSample(event.data.drawId, mDSSingleSample.lateZTestPassCount, mDSSingleSample.lateZTestFailCount)); + EventHandlerFile::Handle(EarlyStencilSingleSample(event.data.drawId, mDSSingleSample.earlyStencilTestPassCount, mDSSingleSample.earlyStencilTestFailCount)); + EventHandlerFile::Handle(LateStencilSingleSample(event.data.drawId, mDSSingleSample.lateStencilTestPassCount, mDSSingleSample.lateStencilTestFailCount)); //sampleRate - EventHandlerFile::Handle(EarlyZSampleRate(event.data.drawId, mDSSampleRate.earlyZTestPassCount, mDSSampleRate.earlyZTestFailCount, mDSSampleRate.earlyZTestCount)); - EventHandlerFile::Handle(LateZSampleRate(event.data.drawId, mDSSampleRate.lateZTestPassCount, mDSSampleRate.lateZTestFailCount, mDSSampleRate.lateZTestCount)); - EventHandlerFile::Handle(EarlyStencilSampleRate(event.data.drawId, mDSSampleRate.earlyStencilTestPassCount, mDSSampleRate.earlyStencilTestFailCount, mDSSampleRate.earlyStencilTestCount)); - EventHandlerFile::Handle(LateStencilSampleRate(event.data.drawId, mDSSampleRate.lateStencilTestPassCount, mDSSampleRate.lateStencilTestFailCount, mDSSampleRate.lateStencilTestCount)); + EventHandlerFile::Handle(EarlyZSampleRate(event.data.drawId, mDSSampleRate.earlyZTestPassCount, mDSSampleRate.earlyZTestFailCount)); + EventHandlerFile::Handle(LateZSampleRate(event.data.drawId, mDSSampleRate.lateZTestPassCount, mDSSampleRate.lateZTestFailCount)); + EventHandlerFile::Handle(EarlyStencilSampleRate(event.data.drawId, mDSSampleRate.earlyStencilTestPassCount, mDSSampleRate.earlyStencilTestFailCount)); + EventHandlerFile::Handle(LateStencilSampleRate(event.data.drawId, mDSSampleRate.lateStencilTestPassCount, mDSSampleRate.lateStencilTestFailCount)); //pixelRate - EventHandlerFile::Handle(EarlyZPixelRate(event.data.drawId, mDSPixelRate.earlyZTestPassCount, mDSPixelRate.earlyZTestFailCount, mDSPixelRate.earlyZTestCount)); - EventHandlerFile::Handle(LateZPixelRate(event.data.drawId, mDSPixelRate.lateZTestPassCount, mDSPixelRate.lateZTestFailCount, mDSPixelRate.lateZTestCount)); + EventHandlerFile::Handle(EarlyZPixelRate(event.data.drawId, mDSPixelRate.earlyZTestPassCount, mDSPixelRate.earlyZTestFailCount)); + EventHandlerFile::Handle(LateZPixelRate(event.data.drawId, mDSPixelRate.lateZTestPassCount, mDSPixelRate.lateZTestFailCount)); //NullPS - EventHandlerFile::Handle(EarlyZNullPS(event.data.drawId, mDSNullPS.earlyZTestPassCount, mDSNullPS.earlyZTestFailCount, mDSNullPS.earlyZTestCount)); - EventHandlerFile::Handle(EarlyStencilNullPS(event.data.drawId, mDSNullPS.earlyStencilTestPassCount, mDSNullPS.earlyStencilTestFailCount, mDSNullPS.earlyStencilTestCount)); + EventHandlerFile::Handle(EarlyZNullPS(event.data.drawId, mDSNullPS.earlyZTestPassCount, mDSNullPS.earlyZTestFailCount)); + EventHandlerFile::Handle(EarlyStencilNullPS(event.data.drawId, mDSNullPS.earlyStencilTestPassCount, mDSNullPS.earlyStencilTestFailCount)); //Reset Internal Counters mDSSingleSample = {}; diff --git a/src/gallium/drivers/swr/rasterizer/archrast/events.proto b/src/gallium/drivers/swr/rasterizer/archrast/events.proto index 1afad3b5efc..804222d9ad6 100644 --- a/src/gallium/drivers/swr/rasterizer/archrast/events.proto +++ b/src/gallium/drivers/swr/rasterizer/archrast/events.proto @@ -209,255 +209,239 @@ event BackendStatsEvent event EarlyDepthStencilInfoSingleSample { - uint64_t depthPassMask; - uint64_t stencilPassMask; - uint64_t coverageMask; + uint64_t depthPassMask; + uint64_t stencilPassMask; + uint64_t coverageMask; }; event EarlyDepthStencilInfoSampleRate { - uint64_t depthPassMask; - uint64_t stencilPassMask; - uint64_t coverageMask; + uint64_t depthPassMask; + uint64_t stencilPassMask; + uint64_t coverageMask; }; event EarlyDepthStencilInfoNullPS { - uint64_t depthPassMask; - uint64_t stencilPassMask; - uint64_t coverageMask; + uint64_t depthPassMask; + uint64_t stencilPassMask; + uint64_t coverageMask; }; event LateDepthStencilInfoSingleSample { - uint64_t depthPassMask; - uint64_t stencilPassMask; - uint64_t coverageMask; + uint64_t depthPassMask; + uint64_t stencilPassMask; + uint64_t coverageMask; }; event LateDepthStencilInfoSampleRate { - uint64_t depthPassMask; - uint64_t stencilPassMask; - uint64_t coverageMask; + uint64_t depthPassMask; + uint64_t stencilPassMask; + uint64_t coverageMask; }; event LateDepthStencilInfoNullPS { - uint64_t depthPassMask; - uint64_t stencilPassMask; - uint64_t coverageMask; + uint64_t depthPassMask; + uint64_t stencilPassMask; + uint64_t coverageMask; }; event EarlyDepthInfoPixelRate { - uint64_t depthPassCount; - uint64_t activeLanes; + uint64_t depthPassCount; + uint64_t activeLanes; }; event LateDepthInfoPixelRate { - uint64_t depthPassCount; - uint64_t activeLanes; + uint64_t depthPassCount; + uint64_t activeLanes; }; event BackendDrawEndEvent { - uint32_t drawId; + uint32_t drawId; }; event FrontendDrawEndEvent { - uint32_t drawId; + uint32_t drawId; }; event EarlyZSingleSample { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event LateZSingleSample { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event EarlyStencilSingleSample { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event LateStencilSingleSample { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event EarlyZSampleRate { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event LateZSampleRate { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event EarlyStencilSampleRate { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event LateStencilSampleRate { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event EarlyZNullPS { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event EarlyStencilNullPS { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event EarlyZPixelRate { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event LateZPixelRate { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event EarlyOmZ { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event EarlyOmStencil { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event LateOmZ { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event LateOmStencil { - uint32_t drawId; - uint64_t passCount; - uint64_t failCount; - uint64_t testCount; + uint32_t drawId; + uint64_t passCount; + uint64_t failCount; }; event GSPrimInfo { - uint64_t inputPrimCount; - uint64_t primGeneratedCount; - uint64_t vertsInput; + uint64_t inputPrimCount; + uint64_t primGeneratedCount; + uint64_t vertsInput; }; event GSInputPrims { - uint32_t drawId; - uint64_t inputPrimCount; + uint32_t drawId; + uint64_t inputPrimCount; }; event GSPrimsGen { - uint32_t drawId; - uint64_t primGeneratedCount; + uint32_t drawId; + uint64_t primGeneratedCount; }; event GSVertsInput { - uint32_t drawId; - uint64_t vertsInput; + uint32_t drawId; + uint64_t vertsInput; }; event ClipVertexCount { - uint64_t vertsPerPrim; - uint64_t primMask; + uint64_t vertsPerPrim; + uint64_t primMask; }; //REMOVE AND REPLACE event FlushVertClip { - uint32_t drawId; + uint32_t drawId; }; event VertsClipped { - uint32_t drawId; - uint64_t clipCount; + uint32_t drawId; + uint64_t clipCount; }; event TessPrimCount { - uint64_t primCount; + uint64_t primCount; }; //REMOVE AND REPLACE event TessPrimFlush { - uint32_t drawId; + uint32_t drawId; }; event TessPrims { - uint32_t drawId; - uint64_t primCount; -}; \ No newline at end of file + uint32_t drawId; + uint64_t primCount; +};