diff --git a/src/xenia/gpu/command_processor.cc b/src/xenia/gpu/command_processor.cc index 4d0ee3378..40188ea3c 100644 --- a/src/xenia/gpu/command_processor.cc +++ b/src/xenia/gpu/command_processor.cc @@ -377,7 +377,7 @@ void CommandProcessor::ExecutePrimaryBuffer(uint32_t start_index, void CommandProcessor::ExecuteIndirectBuffer(uint32_t ptr, uint32_t length) { SCOPE_profile_cpu_f("gpu"); - trace_writer_.WriteIndirectBufferStart(ptr, length / sizeof(uint32_t)); + trace_writer_.WriteIndirectBufferStart(ptr, length * sizeof(uint32_t)); // Execute commands! uint32_t ptr_mask = 0; @@ -509,6 +509,7 @@ bool CommandProcessor::ExecutePacketType3(RingbufferReader* reader, result = ExecutePacketType3_XE_SWAP(reader, packet, count); break; case PM4_INDIRECT_BUFFER: + case PM4_INDIRECT_BUFFER_PFD: result = ExecutePacketType3_INDIRECT_BUFFER(reader, packet, count); break; case PM4_WAIT_REG_MEM: @@ -683,7 +684,7 @@ bool CommandProcessor::ExecutePacketType3_INDIRECT_BUFFER( RingbufferReader* reader, uint32_t packet, uint32_t count) { // indirect buffer dispatch uint32_t list_ptr = CpuToGpu(reader->Read()); - uint32_t list_length = reader->Read(); + uint32_t list_length = reader->Read() & 0xFFFFF; ExecuteIndirectBuffer(GpuToCpu(list_ptr), list_length); return true; } diff --git a/src/xenia/gpu/packet_disassembler.cc b/src/xenia/gpu/packet_disassembler.cc index 198323294..14e4bb425 100644 --- a/src/xenia/gpu/packet_disassembler.cc +++ b/src/xenia/gpu/packet_disassembler.cc @@ -159,7 +159,8 @@ bool PacketDisassembler::DisasmPacketType3(const uint8_t* base_ptr, uint32_t frontbuffer_ptr = xe::load_and_swap(ptr + 0); break; } - case PM4_INDIRECT_BUFFER: { + case PM4_INDIRECT_BUFFER: + case PM4_INDIRECT_BUFFER_PFD: { // indirect buffer dispatch static const PacketTypeInfo op_info = {PacketCategory::kGeneric, "PM4_INDIRECT_BUFFER"};