Fixing recording of LOAD_ALU_CONSTANT.

This commit is contained in:
Ben Vanik 2015-03-15 11:27:04 -07:00
parent 795df80687
commit d803612184
1 changed files with 4 additions and 4 deletions

View File

@ -1328,8 +1328,8 @@ bool CommandProcessor::ExecutePacketType3_LOAD_ALU_CONSTANT(
address &= 0x3FFFFFFF; address &= 0x3FFFFFFF;
uint32_t offset_type = reader->Read(); uint32_t offset_type = reader->Read();
uint32_t index = offset_type & 0x7FF; uint32_t index = offset_type & 0x7FF;
uint32_t size = reader->Read(); uint32_t size_dwords = reader->Read();
size &= 0xFFF; size_dwords &= 0xFFF;
uint32_t type = (offset_type >> 16) & 0xFF; uint32_t type = (offset_type >> 16) & 0xFF;
switch (type) { switch (type) {
case 0: // ALU case 0: // ALU
@ -1351,8 +1351,8 @@ bool CommandProcessor::ExecutePacketType3_LOAD_ALU_CONSTANT(
assert_always(); assert_always();
return true; return true;
} }
trace_writer_.WriteMemoryRead(address, size); trace_writer_.WriteMemoryRead(address, size_dwords * 4);
for (uint32_t n = 0; n < size; n++, index++) { for (uint32_t n = 0; n < size_dwords; n++, index++) {
uint32_t data = uint32_t data =
poly::load_and_swap<uint32_t>(membase_ + GpuToCpu(address + n * 4)); poly::load_and_swap<uint32_t>(membase_ + GpuToCpu(address + n * 4));
WriteRegister(index, data); WriteRegister(index, data);