liverpool: Revert queue scope markers. (#2166)

This commit is contained in:
squidbus 2025-01-16 18:24:29 -08:00 committed by GitHub
parent 8695383d35
commit eb49193309
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -224,10 +224,6 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
RESUME_GFX(ce_task); RESUME_GFX(ce_task);
} }
if (rasterizer) {
rasterizer->ScopeMarkerBegin("gfx");
}
const auto base_addr = reinterpret_cast<uintptr_t>(dcb.data()); const auto base_addr = reinterpret_cast<uintptr_t>(dcb.data());
while (!dcb.empty()) { while (!dcb.empty()) {
const auto* header = reinterpret_cast<const PM4Header*>(dcb.data()); const auto* header = reinterpret_cast<const PM4Header*>(dcb.data());
@ -416,7 +412,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
} }
if (rasterizer) { if (rasterizer) {
const auto cmd_address = reinterpret_cast<const void*>(header); const auto cmd_address = reinterpret_cast<const void*>(header);
rasterizer->ScopeMarkerBegin(fmt::format("{}:DrawIndex2", cmd_address)); rasterizer->ScopeMarkerBegin(fmt::format("gfx:{}:DrawIndex2", cmd_address));
rasterizer->Draw(true); rasterizer->Draw(true);
rasterizer->ScopeMarkerEnd(); rasterizer->ScopeMarkerEnd();
} }
@ -433,7 +429,8 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
} }
if (rasterizer) { if (rasterizer) {
const auto cmd_address = reinterpret_cast<const void*>(header); const auto cmd_address = reinterpret_cast<const void*>(header);
rasterizer->ScopeMarkerBegin(fmt::format("{}:DrawIndexOffset2", cmd_address)); rasterizer->ScopeMarkerBegin(
fmt::format("gfx:{}:DrawIndexOffset2", cmd_address));
rasterizer->Draw(true, draw_index_off->index_offset); rasterizer->Draw(true, draw_index_off->index_offset);
rasterizer->ScopeMarkerEnd(); rasterizer->ScopeMarkerEnd();
} }
@ -448,7 +445,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
} }
if (rasterizer) { if (rasterizer) {
const auto cmd_address = reinterpret_cast<const void*>(header); const auto cmd_address = reinterpret_cast<const void*>(header);
rasterizer->ScopeMarkerBegin(fmt::format("{}:DrawIndexAuto", cmd_address)); rasterizer->ScopeMarkerBegin(fmt::format("gfx:{}:DrawIndexAuto", cmd_address));
rasterizer->Draw(false); rasterizer->Draw(false);
rasterizer->ScopeMarkerEnd(); rasterizer->ScopeMarkerEnd();
} }
@ -463,7 +460,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
} }
if (rasterizer) { if (rasterizer) {
const auto cmd_address = reinterpret_cast<const void*>(header); const auto cmd_address = reinterpret_cast<const void*>(header);
rasterizer->ScopeMarkerBegin(fmt::format("{}:DrawIndirect", cmd_address)); rasterizer->ScopeMarkerBegin(fmt::format("gfx:{}:DrawIndirect", cmd_address));
rasterizer->DrawIndirect(false, indirect_args_addr, offset, size, 1, 0); rasterizer->DrawIndirect(false, indirect_args_addr, offset, size, 1, 0);
rasterizer->ScopeMarkerEnd(); rasterizer->ScopeMarkerEnd();
} }
@ -479,7 +476,8 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
} }
if (rasterizer) { if (rasterizer) {
const auto cmd_address = reinterpret_cast<const void*>(header); const auto cmd_address = reinterpret_cast<const void*>(header);
rasterizer->ScopeMarkerBegin(fmt::format("{}:DrawIndexIndirect", cmd_address)); rasterizer->ScopeMarkerBegin(
fmt::format("gfx:{}:DrawIndexIndirect", cmd_address));
rasterizer->DrawIndirect(true, indirect_args_addr, offset, size, 1, 0); rasterizer->DrawIndirect(true, indirect_args_addr, offset, size, 1, 0);
rasterizer->ScopeMarkerEnd(); rasterizer->ScopeMarkerEnd();
} }
@ -495,7 +493,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
if (rasterizer) { if (rasterizer) {
const auto cmd_address = reinterpret_cast<const void*>(header); const auto cmd_address = reinterpret_cast<const void*>(header);
rasterizer->ScopeMarkerBegin( rasterizer->ScopeMarkerBegin(
fmt::format("{}:DrawIndexIndirectCountMulti", cmd_address)); fmt::format("gfx:{}:DrawIndexIndirectCountMulti", cmd_address));
rasterizer->DrawIndirect( rasterizer->DrawIndirect(
true, indirect_args_addr, offset, draw_index_indirect->stride, true, indirect_args_addr, offset, draw_index_indirect->stride,
draw_index_indirect->count, draw_index_indirect->countAddr); draw_index_indirect->count, draw_index_indirect->countAddr);
@ -516,7 +514,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
} }
if (rasterizer && (cs_program.dispatch_initiator & 1)) { if (rasterizer && (cs_program.dispatch_initiator & 1)) {
const auto cmd_address = reinterpret_cast<const void*>(header); const auto cmd_address = reinterpret_cast<const void*>(header);
rasterizer->ScopeMarkerBegin(fmt::format("{}:DispatchDirect", cmd_address)); rasterizer->ScopeMarkerBegin(fmt::format("gfx:{}:DispatchDirect", cmd_address));
rasterizer->DispatchDirect(); rasterizer->DispatchDirect();
rasterizer->ScopeMarkerEnd(); rasterizer->ScopeMarkerEnd();
} }
@ -534,7 +532,8 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
} }
if (rasterizer && (cs_program.dispatch_initiator & 1)) { if (rasterizer && (cs_program.dispatch_initiator & 1)) {
const auto cmd_address = reinterpret_cast<const void*>(header); const auto cmd_address = reinterpret_cast<const void*>(header);
rasterizer->ScopeMarkerBegin(fmt::format("{}:DispatchIndirect", cmd_address)); rasterizer->ScopeMarkerBegin(
fmt::format("gfx:{}:DispatchIndirect", cmd_address));
rasterizer->DispatchIndirect(indirect_args_addr, offset, size); rasterizer->DispatchIndirect(indirect_args_addr, offset, size);
rasterizer->ScopeMarkerEnd(); rasterizer->ScopeMarkerEnd();
} }
@ -702,10 +701,6 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
} }
} }
if (rasterizer) {
rasterizer->ScopeMarkerEnd();
}
if (ce_task.handle) { if (ce_task.handle) {
ASSERT_MSG(ce_task.handle.done(), "Partially processed CCB"); ASSERT_MSG(ce_task.handle.done(), "Partially processed CCB");
ce_task.handle.destroy(); ce_task.handle.destroy();
@ -719,10 +714,6 @@ Liverpool::Task Liverpool::ProcessCompute(std::span<const u32> acb, u32 vqid) {
FIBER_ENTER(acb_task_name[vqid]); FIBER_ENTER(acb_task_name[vqid]);
const auto& queue = asc_queues[{vqid}]; const auto& queue = asc_queues[{vqid}];
if (rasterizer) {
rasterizer->ScopeMarkerBegin(fmt::format("asc[{}]", vqid));
}
auto base_addr = reinterpret_cast<uintptr_t>(acb.data()); auto base_addr = reinterpret_cast<uintptr_t>(acb.data());
while (!acb.empty()) { while (!acb.empty()) {
const auto* header = reinterpret_cast<const PM4Header*>(acb.data()); const auto* header = reinterpret_cast<const PM4Header*>(acb.data());
@ -820,7 +811,8 @@ Liverpool::Task Liverpool::ProcessCompute(std::span<const u32> acb, u32 vqid) {
} }
if (rasterizer && (cs_program.dispatch_initiator & 1)) { if (rasterizer && (cs_program.dispatch_initiator & 1)) {
const auto cmd_address = reinterpret_cast<const void*>(header); const auto cmd_address = reinterpret_cast<const void*>(header);
rasterizer->ScopeMarkerBegin(fmt::format("{}:DispatchDirect", cmd_address)); rasterizer->ScopeMarkerBegin(
fmt::format("asc[{}]:{}:DispatchDirect", vqid, cmd_address));
rasterizer->DispatchDirect(); rasterizer->DispatchDirect();
rasterizer->ScopeMarkerEnd(); rasterizer->ScopeMarkerEnd();
} }
@ -838,7 +830,8 @@ Liverpool::Task Liverpool::ProcessCompute(std::span<const u32> acb, u32 vqid) {
} }
if (rasterizer && (cs_program.dispatch_initiator & 1)) { if (rasterizer && (cs_program.dispatch_initiator & 1)) {
const auto cmd_address = reinterpret_cast<const void*>(header); const auto cmd_address = reinterpret_cast<const void*>(header);
rasterizer->ScopeMarkerBegin(fmt::format("{}:DispatchIndirect", cmd_address)); rasterizer->ScopeMarkerBegin(
fmt::format("asc[{}]:{}:DispatchIndirect", vqid, cmd_address));
rasterizer->DispatchIndirect(ib_address, 0, size); rasterizer->DispatchIndirect(ib_address, 0, size);
rasterizer->ScopeMarkerEnd(); rasterizer->ScopeMarkerEnd();
} }
@ -886,10 +879,6 @@ Liverpool::Task Liverpool::ProcessCompute(std::span<const u32> acb, u32 vqid) {
} }
} }
if (rasterizer) {
rasterizer->ScopeMarkerEnd();
}
FIBER_EXIT; FIBER_EXIT;
} }