From aa038fbf23cb26e411b38252231e0f920c46e56d Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Sun, 1 May 2016 15:48:31 -0500 Subject: [PATCH] Skip the wrapping packet end after parsing IB end (to avoid false draws appearing) --- src/xenia/gpu/trace_reader.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xenia/gpu/trace_reader.cc b/src/xenia/gpu/trace_reader.cc index 16980c28c..6bedfb9b4 100644 --- a/src/xenia/gpu/trace_reader.cc +++ b/src/xenia/gpu/trace_reader.cc @@ -111,6 +111,11 @@ void TraceReader::ParseTrace() { auto cmd = reinterpret_cast(trace_ptr); trace_ptr += sizeof(*cmd); + // IB packet is wrapped in a kPacketStart/kPacketEnd. Skip the end. + auto end_cmd = reinterpret_cast(trace_ptr); + assert_true(end_cmd->type == TraceCommandType::kPacketEnd); + trace_ptr += sizeof(*cmd); + // Go back up a level. If parent is null, this frame started in an // indirect buffer. if (current_command_buffer->parent) {