Add perfetto tracepoints to async record

This commit is contained in:
Billy Laws 2022-09-29 20:43:03 +01:00
parent 6dfef095e8
commit a3f38c0cf7
2 changed files with 6 additions and 3 deletions

View File

@ -37,6 +37,7 @@ namespace skyline::gpu::interconnect {
}
void CommandRecordThread::ProcessSlot(Slot *slot) {
TRACE_EVENT_FMT("gpu", "ProcessSlot: 0x{:X}, execution: {}", slot, slot->executionNumber);
auto &gpu{*state.gpu};
vk::RenderPass lRenderPass;
@ -129,6 +130,7 @@ namespace skyline::gpu::interconnect {
slot = recordThread.AcquireSlot();
cycle = slot->Reset(gpu);
slot->executionNumber = executionNumber;
allocator = &slot->allocator;
}
@ -411,12 +413,12 @@ namespace skyline::gpu::interconnect {
for (const auto &callback : flushCallbacks)
callback();
executionNumber++;
if (!slot->nodes.empty()) {
TRACE_EVENT("gpu", "CommandExecutor::Submit");
SubmitInternal();
}
ResetInternal();
executionNumber++;
}
}

View File

@ -25,6 +25,7 @@ namespace skyline::gpu::interconnect {
std::shared_ptr<FenceCycle> cycle;
boost::container::stable_vector<node::NodeVariant> nodes;
LinearAllocatorState<> allocator;
u32 executionNumber;
Slot(GPU &gpu);
@ -151,7 +152,7 @@ namespace skyline::gpu::interconnect {
std::shared_ptr<FenceCycle> cycle; //!< The fence cycle that this command executor uses to wait for the GPU to finish executing commands
LinearAllocatorState<> *allocator;
ContextTag tag; //!< The tag associated with this command executor, any tagged resource locking must utilize this tag
size_t executionNumber{};
u32 executionNumber{};
CommandExecutor(const DeviceState &state);