Fixing tracing of games that do everything in nested indirect buffers.
This commit is contained in:
parent
14c6fbfba4
commit
05239daecf
|
@ -775,7 +775,12 @@ bool CommandProcessor::ExecutePacketType3(RingbufferReader* reader,
|
|||
uint32_t count = ((packet >> 16) & 0x3FFF) + 1;
|
||||
auto data_start_offset = reader->offset();
|
||||
|
||||
trace_writer_.WritePacketStart(reader->ptr() - 4, 1 + count);
|
||||
// To handle nesting behavior when tracing we special case indirect buffers.
|
||||
if (opcode == PM4_INDIRECT_BUFFER) {
|
||||
trace_writer_.WritePacketStart(reader->ptr() - 4, 2);
|
||||
} else {
|
||||
trace_writer_.WritePacketStart(reader->ptr() - 4, 1 + count);
|
||||
}
|
||||
|
||||
// & 1 == predicate - when set, we do bin check to see if we should execute
|
||||
// the packet. Only type 3 packets are affected.
|
||||
|
|
|
@ -665,7 +665,7 @@ class TraceReader {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (pending_break) {
|
||||
if (pending_break || current_frame.command_count) {
|
||||
current_frame.end_ptr = trace_ptr;
|
||||
frames_.push_back(std::move(current_frame));
|
||||
}
|
||||
|
|
|
@ -112,10 +112,9 @@ class TraceWriter {
|
|||
return;
|
||||
}
|
||||
auto cmd = PrimaryBufferStartCommand({
|
||||
TraceCommandType::kPrimaryBufferStart, base_ptr, count,
|
||||
TraceCommandType::kPrimaryBufferStart, base_ptr, 0,
|
||||
});
|
||||
fwrite(&cmd, 1, sizeof(cmd), file_);
|
||||
fwrite(membase_ + base_ptr, 4, count, file_);
|
||||
}
|
||||
|
||||
void WritePrimaryBufferEnd() {
|
||||
|
@ -133,10 +132,9 @@ class TraceWriter {
|
|||
return;
|
||||
}
|
||||
auto cmd = IndirectBufferStartCommand({
|
||||
TraceCommandType::kIndirectBufferStart, base_ptr, count,
|
||||
TraceCommandType::kIndirectBufferStart, base_ptr, 0,
|
||||
});
|
||||
fwrite(&cmd, 1, sizeof(cmd), file_);
|
||||
fwrite(membase_ + base_ptr, 4, count, file_);
|
||||
}
|
||||
|
||||
void WriteIndirectBufferEnd() {
|
||||
|
|
Loading…
Reference in New Issue