Skip to content

Commit

Permalink
Alternate indirect buffer command.
Browse files Browse the repository at this point in the history
  • Loading branch information
benvanik committed Dec 8, 2015
1 parent ed0b978 commit 522ff9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/xenia/gpu/command_processor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion src/xenia/gpu/packet_disassembler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ bool PacketDisassembler::DisasmPacketType3(const uint8_t* base_ptr,
uint32_t frontbuffer_ptr = xe::load_and_swap<uint32_t>(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"};
Expand Down

0 comments on commit 522ff9d

Please sign in to comment.