Skip to content

Commit 7d0563c

Browse files
Baraldi, GiovanniApoKalipse-V
andauthored
gfx10+: Only enable SQTT on active shader engines (#19)
Only enable SQTT on active shader engines Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>
1 parent 0a2f96b commit 7d0563c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/pm4/sqtt_builder.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,14 @@ class GpuSqttBuilder : public SqttBuilder, protected Builder, protected Primitiv
324324

325325
base_addr += sqtt_size;
326326
}
327+
for (uint64_t index = 0; index < se_number_total; index ++)
328+
{
329+
if (config->target_cu_per_se.at(index) < 0) continue; // Ignore masked SEs
330+
Select_GRBM_SE_SH0(cmd_buffer, index);
331+
Builder::BuildWriteShRegPacket(cmd_buffer, Primitives::COMPUTE_THREAD_TRACE_ENABLE_ADDR, 1);
332+
}
327333
// Reset the GRBM to broadcast mode
328334
SetGRBMToBroadcast(cmd_buffer);
329-
Builder::BuildWriteShRegPacket(cmd_buffer, Primitives::COMPUTE_THREAD_TRACE_ENABLE_ADDR, 1);
330335
}
331336
Builder::BuildWriteWaitIdlePacket(cmd_buffer);
332337

0 commit comments

Comments
 (0)