From abb7ed0fde6a974c06400edae4a2074715fd130b Mon Sep 17 00:00:00 2001 From: Peter Harris Date: Fri, 13 Dec 2024 16:28:39 +0000 Subject: [PATCH] Remove unused submitID tracking --- .../trackers/layer_command_stream.cpp | 39 +++++-------------- .../trackers/layer_command_stream.hpp | 28 +++++-------- source_common/trackers/queue.cpp | 11 +++--- source_common/trackers/queue.hpp | 15 ------- 4 files changed, 24 insertions(+), 69 deletions(-) diff --git a/source_common/trackers/layer_command_stream.cpp b/source_common/trackers/layer_command_stream.cpp index e3df7d8..3a54bc0 100644 --- a/source_common/trackers/layer_command_stream.cpp +++ b/source_common/trackers/layer_command_stream.cpp @@ -75,8 +75,7 @@ LCSRenderPass::LCSRenderPass( /* See header for details. */ std::string LCSRenderPass::getBeginMetadata( - const std::string* debugLabel, - uint64_t submitID) const + const std::string* debugLabel) const { // Draw count for a multi-submit command buffer cannot be reliably // associated with a single tagID if restartable across command buffer @@ -96,11 +95,6 @@ std::string LCSRenderPass::getBeginMetadata( { "drawCallCount", drawCount } }; - if (submitID != 0) - { - metadata["sid"] = submitID; - } - if (debugLabel && debugLabel->size()) { metadata["label"] = *debugLabel; @@ -147,8 +141,7 @@ std::string LCSRenderPass::getBeginMetadata( /* See header for details. */ std::string LCSRenderPass::getContinuationMetadata( const std::string* debugLabel, - uint64_t tagIDContinuation, - uint64_t submitID) const + uint64_t tagIDContinuation) const { json metadata = { { "type", "renderpass" }, @@ -161,28 +154,22 @@ std::string LCSRenderPass::getContinuationMetadata( metadata["label"] = *debugLabel; } - if (submitID != 0) - { - metadata["sid"] = submitID; - } - return metadata.dump(); } /* See header for details. */ std::string LCSRenderPass::getMetadata( const std::string* debugLabel, - uint64_t tagIDContinuation, - uint64_t submitID) const + uint64_t tagIDContinuation) const { if (tagID) { assert(tagIDContinuation == 0); - return getBeginMetadata(debugLabel, submitID); + return getBeginMetadata(debugLabel); } assert(tagIDContinuation != 0); - return getContinuationMetadata(debugLabel, tagIDContinuation, submitID); + return getContinuationMetadata(debugLabel, tagIDContinuation); } /* See header for details. */ @@ -203,11 +190,9 @@ LCSDispatch::LCSDispatch( /* See header for details. */ std::string LCSDispatch::getMetadata( const std::string* debugLabel, - uint64_t tagIDContinuation, - uint64_t submitID + uint64_t tagIDContinuation ) const { UNUSED(tagIDContinuation); - UNUSED(submitID); json metadata = { { "type", "dispatch" }, @@ -243,11 +228,9 @@ LCSTraceRays::LCSTraceRays( /* See header for details. */ std::string LCSTraceRays::getMetadata( const std::string* debugLabel, - uint64_t tagIDContinuation, - uint64_t submitID + uint64_t tagIDContinuation ) const { UNUSED(tagIDContinuation); - UNUSED(submitID); json metadata = { { "type", "tracerays" }, @@ -281,11 +264,9 @@ LCSImageTransfer::LCSImageTransfer( /* See header for details. */ std::string LCSImageTransfer::getMetadata( const std::string* debugLabel, - uint64_t tagIDContinuation, - uint64_t submitID + uint64_t tagIDContinuation ) const { UNUSED(tagIDContinuation); - UNUSED(submitID); json metadata = { { "type", "imagetransfer" }, @@ -318,11 +299,9 @@ LCSBufferTransfer::LCSBufferTransfer( /* See header for details. */ std::string LCSBufferTransfer::getMetadata( const std::string* debugLabel, - uint64_t tagIDContinuation, - uint64_t submitID + uint64_t tagIDContinuation ) const { UNUSED(tagIDContinuation); - UNUSED(submitID); json metadata = { { "type", "buffertransfer" }, diff --git a/source_common/trackers/layer_command_stream.hpp b/source_common/trackers/layer_command_stream.hpp index 29acdd6..bae1496 100644 --- a/source_common/trackers/layer_command_stream.hpp +++ b/source_common/trackers/layer_command_stream.hpp @@ -85,8 +85,7 @@ class LCSWorkload virtual std::string getMetadata( const std::string* debugLabel=nullptr, - uint64_t tagIDContinuation=0, - uint64_t submitID=0) const = 0; + uint64_t tagIDContinuation=0) const = 0; /** * @brief Get this workloads tagID. @@ -151,18 +150,15 @@ class LCSRenderPass : public LCSWorkload virtual std::string getMetadata( const std::string* debugLabel=nullptr, - uint64_t tagIDContinuation=0, - uint64_t submitID=0) const; + uint64_t tagIDContinuation=0) const; private: std::string getBeginMetadata( - const std::string* debugLabel=nullptr, - uint64_t submitID=0) const; + const std::string* debugLabel=nullptr) const; std::string getContinuationMetadata( const std::string* debugLabel=nullptr, - uint64_t tagIDContinuation=0, - uint64_t submitID=0) const; + uint64_t tagIDContinuation=0) const; uint32_t width; @@ -195,8 +191,7 @@ class LCSDispatch : public LCSWorkload virtual std::string getMetadata( const std::string* debugLabel=nullptr, - uint64_t tagIDContinuation=0, - uint64_t submitID=0) const; + uint64_t tagIDContinuation=0) const; private: int64_t xGroups; @@ -220,8 +215,7 @@ class LCSTraceRays : public LCSWorkload virtual std::string getMetadata( const std::string* debugLabel=nullptr, - uint64_t tagIDContinuation=0, - uint64_t submitID=0) const; + uint64_t tagIDContinuation=0) const; private: int64_t xItems; @@ -244,8 +238,7 @@ class LCSImageTransfer : public LCSWorkload virtual std::string getMetadata( const std::string* debugLabel=nullptr, - uint64_t tagIDContinuation=0, - uint64_t submitID=0) const; + uint64_t tagIDContinuation=0) const; private: std::string transferType; @@ -267,8 +260,7 @@ class LCSBufferTransfer : public LCSWorkload virtual std::string getMetadata( const std::string* debugLabel=nullptr, - uint64_t tagIDContinuation=0, - uint64_t submitID=0) const; + uint64_t tagIDContinuation=0) const; private: std::string transferType; @@ -288,12 +280,10 @@ class LCSMarker : public LCSWorkload virtual std::string getMetadata( const std::string* debugLabel=nullptr, - uint64_t tagIDContinuation=0, - uint64_t submitID=0) const + uint64_t tagIDContinuation=0) const { UNUSED(debugLabel); UNUSED(tagIDContinuation); - UNUSED(submitID); return label; }; diff --git a/source_common/trackers/queue.cpp b/source_common/trackers/queue.cpp index 7b79606..e9a57d2 100644 --- a/source_common/trackers/queue.cpp +++ b/source_common/trackers/queue.cpp @@ -29,13 +29,14 @@ namespace Tracker { -/* See header for details. */ -std::atomic Queue::nextSubmitID { 1 }; - /* See header for details. */ Queue::Queue( - VkQueue _handle): - handle(_handle) { }; + VkQueue _handle +): + handle(_handle) +{ + +}; /* See header for details. */ void Queue::runSubmitCommandStream( diff --git a/source_common/trackers/queue.hpp b/source_common/trackers/queue.hpp index b57a07b..7f39b05 100644 --- a/source_common/trackers/queue.hpp +++ b/source_common/trackers/queue.hpp @@ -72,16 +72,6 @@ class Queue const std::vector& stream, std::function callback); - /** - * @brief Get a unique submitID to label a command buffer submit. - * - * @return The assigned ID. - */ - static uint64_t assignSubmitID() - { - return nextSubmitID.fetch_add(1, std::memory_order_relaxed); - } - private: /** * The handle of the native queue we are wrapping. @@ -97,11 +87,6 @@ class Queue * @brief The last non-zero render pass tagID submitted. */ uint64_t lastRenderPassTagID { 0 }; - - /** - * @brief The command buffer submitID allocator. - */ - static std::atomic nextSubmitID; }; }