Skip to content

Commit abb7ed0

Browse files
committed
Remove unused submitID tracking
1 parent 128f50c commit abb7ed0

File tree

4 files changed

+24
-69
lines changed

4 files changed

+24
-69
lines changed

source_common/trackers/layer_command_stream.cpp

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ LCSRenderPass::LCSRenderPass(
7575

7676
/* See header for details. */
7777
std::string LCSRenderPass::getBeginMetadata(
78-
const std::string* debugLabel,
79-
uint64_t submitID) const
78+
const std::string* debugLabel) const
8079
{
8180
// Draw count for a multi-submit command buffer cannot be reliably
8281
// associated with a single tagID if restartable across command buffer
@@ -96,11 +95,6 @@ std::string LCSRenderPass::getBeginMetadata(
9695
{ "drawCallCount", drawCount }
9796
};
9897

99-
if (submitID != 0)
100-
{
101-
metadata["sid"] = submitID;
102-
}
103-
10498
if (debugLabel && debugLabel->size())
10599
{
106100
metadata["label"] = *debugLabel;
@@ -147,8 +141,7 @@ std::string LCSRenderPass::getBeginMetadata(
147141
/* See header for details. */
148142
std::string LCSRenderPass::getContinuationMetadata(
149143
const std::string* debugLabel,
150-
uint64_t tagIDContinuation,
151-
uint64_t submitID) const
144+
uint64_t tagIDContinuation) const
152145
{
153146
json metadata = {
154147
{ "type", "renderpass" },
@@ -161,28 +154,22 @@ std::string LCSRenderPass::getContinuationMetadata(
161154
metadata["label"] = *debugLabel;
162155
}
163156

164-
if (submitID != 0)
165-
{
166-
metadata["sid"] = submitID;
167-
}
168-
169157
return metadata.dump();
170158
}
171159

172160
/* See header for details. */
173161
std::string LCSRenderPass::getMetadata(
174162
const std::string* debugLabel,
175-
uint64_t tagIDContinuation,
176-
uint64_t submitID) const
163+
uint64_t tagIDContinuation) const
177164
{
178165
if (tagID)
179166
{
180167
assert(tagIDContinuation == 0);
181-
return getBeginMetadata(debugLabel, submitID);
168+
return getBeginMetadata(debugLabel);
182169
}
183170

184171
assert(tagIDContinuation != 0);
185-
return getContinuationMetadata(debugLabel, tagIDContinuation, submitID);
172+
return getContinuationMetadata(debugLabel, tagIDContinuation);
186173
}
187174

188175
/* See header for details. */
@@ -203,11 +190,9 @@ LCSDispatch::LCSDispatch(
203190
/* See header for details. */
204191
std::string LCSDispatch::getMetadata(
205192
const std::string* debugLabel,
206-
uint64_t tagIDContinuation,
207-
uint64_t submitID
193+
uint64_t tagIDContinuation
208194
) const {
209195
UNUSED(tagIDContinuation);
210-
UNUSED(submitID);
211196

212197
json metadata = {
213198
{ "type", "dispatch" },
@@ -243,11 +228,9 @@ LCSTraceRays::LCSTraceRays(
243228
/* See header for details. */
244229
std::string LCSTraceRays::getMetadata(
245230
const std::string* debugLabel,
246-
uint64_t tagIDContinuation,
247-
uint64_t submitID
231+
uint64_t tagIDContinuation
248232
) const {
249233
UNUSED(tagIDContinuation);
250-
UNUSED(submitID);
251234

252235
json metadata = {
253236
{ "type", "tracerays" },
@@ -281,11 +264,9 @@ LCSImageTransfer::LCSImageTransfer(
281264
/* See header for details. */
282265
std::string LCSImageTransfer::getMetadata(
283266
const std::string* debugLabel,
284-
uint64_t tagIDContinuation,
285-
uint64_t submitID
267+
uint64_t tagIDContinuation
286268
) const {
287269
UNUSED(tagIDContinuation);
288-
UNUSED(submitID);
289270

290271
json metadata = {
291272
{ "type", "imagetransfer" },
@@ -318,11 +299,9 @@ LCSBufferTransfer::LCSBufferTransfer(
318299
/* See header for details. */
319300
std::string LCSBufferTransfer::getMetadata(
320301
const std::string* debugLabel,
321-
uint64_t tagIDContinuation,
322-
uint64_t submitID
302+
uint64_t tagIDContinuation
323303
) const {
324304
UNUSED(tagIDContinuation);
325-
UNUSED(submitID);
326305

327306
json metadata = {
328307
{ "type", "buffertransfer" },

source_common/trackers/layer_command_stream.hpp

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ class LCSWorkload
8585

8686
virtual std::string getMetadata(
8787
const std::string* debugLabel=nullptr,
88-
uint64_t tagIDContinuation=0,
89-
uint64_t submitID=0) const = 0;
88+
uint64_t tagIDContinuation=0) const = 0;
9089

9190
/**
9291
* @brief Get this workloads tagID.
@@ -151,18 +150,15 @@ class LCSRenderPass : public LCSWorkload
151150

152151
virtual std::string getMetadata(
153152
const std::string* debugLabel=nullptr,
154-
uint64_t tagIDContinuation=0,
155-
uint64_t submitID=0) const;
153+
uint64_t tagIDContinuation=0) const;
156154

157155
private:
158156
std::string getBeginMetadata(
159-
const std::string* debugLabel=nullptr,
160-
uint64_t submitID=0) const;
157+
const std::string* debugLabel=nullptr) const;
161158

162159
std::string getContinuationMetadata(
163160
const std::string* debugLabel=nullptr,
164-
uint64_t tagIDContinuation=0,
165-
uint64_t submitID=0) const;
161+
uint64_t tagIDContinuation=0) const;
166162

167163
uint32_t width;
168164

@@ -195,8 +191,7 @@ class LCSDispatch : public LCSWorkload
195191

196192
virtual std::string getMetadata(
197193
const std::string* debugLabel=nullptr,
198-
uint64_t tagIDContinuation=0,
199-
uint64_t submitID=0) const;
194+
uint64_t tagIDContinuation=0) const;
200195

201196
private:
202197
int64_t xGroups;
@@ -220,8 +215,7 @@ class LCSTraceRays : public LCSWorkload
220215

221216
virtual std::string getMetadata(
222217
const std::string* debugLabel=nullptr,
223-
uint64_t tagIDContinuation=0,
224-
uint64_t submitID=0) const;
218+
uint64_t tagIDContinuation=0) const;
225219

226220
private:
227221
int64_t xItems;
@@ -244,8 +238,7 @@ class LCSImageTransfer : public LCSWorkload
244238

245239
virtual std::string getMetadata(
246240
const std::string* debugLabel=nullptr,
247-
uint64_t tagIDContinuation=0,
248-
uint64_t submitID=0) const;
241+
uint64_t tagIDContinuation=0) const;
249242

250243
private:
251244
std::string transferType;
@@ -267,8 +260,7 @@ class LCSBufferTransfer : public LCSWorkload
267260

268261
virtual std::string getMetadata(
269262
const std::string* debugLabel=nullptr,
270-
uint64_t tagIDContinuation=0,
271-
uint64_t submitID=0) const;
263+
uint64_t tagIDContinuation=0) const;
272264

273265
private:
274266
std::string transferType;
@@ -288,12 +280,10 @@ class LCSMarker : public LCSWorkload
288280

289281
virtual std::string getMetadata(
290282
const std::string* debugLabel=nullptr,
291-
uint64_t tagIDContinuation=0,
292-
uint64_t submitID=0) const
283+
uint64_t tagIDContinuation=0) const
293284
{
294285
UNUSED(debugLabel);
295286
UNUSED(tagIDContinuation);
296-
UNUSED(submitID);
297287
return label;
298288
};
299289

source_common/trackers/queue.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@
2929

3030
namespace Tracker
3131
{
32-
/* See header for details. */
33-
std::atomic<uint64_t> Queue::nextSubmitID { 1 };
34-
3532
/* See header for details. */
3633
Queue::Queue(
37-
VkQueue _handle):
38-
handle(_handle) { };
34+
VkQueue _handle
35+
):
36+
handle(_handle)
37+
{
38+
39+
};
3940

4041
/* See header for details. */
4142
void Queue::runSubmitCommandStream(

source_common/trackers/queue.hpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,6 @@ class Queue
7272
const std::vector<LCSInstruction>& stream,
7373
std::function<void(const std::string&)> callback);
7474

75-
/**
76-
* @brief Get a unique submitID to label a command buffer submit.
77-
*
78-
* @return The assigned ID.
79-
*/
80-
static uint64_t assignSubmitID()
81-
{
82-
return nextSubmitID.fetch_add(1, std::memory_order_relaxed);
83-
}
84-
8575
private:
8676
/**
8777
* The handle of the native queue we are wrapping.
@@ -97,11 +87,6 @@ class Queue
9787
* @brief The last non-zero render pass tagID submitted.
9888
*/
9989
uint64_t lastRenderPassTagID { 0 };
100-
101-
/**
102-
* @brief The command buffer submitID allocator.
103-
*/
104-
static std::atomic<uint64_t> nextSubmitID;
10590
};
10691

10792
}

0 commit comments

Comments
 (0)