Added a magic value to XE_SWAP packets to make it obvious if there's an opcode collision.
This commit is contained in:
parent
aee205101b
commit
35bea36fc4
|
@ -946,10 +946,13 @@ bool CommandProcessor::ExecutePacketType3_XE_SWAP(RingbufferReader* reader,
|
||||||
// VdSwap will post this to tell us we need to swap the screen/fire an
|
// VdSwap will post this to tell us we need to swap the screen/fire an
|
||||||
// interrupt.
|
// interrupt.
|
||||||
// 63 words here, but only the first has any data.
|
// 63 words here, but only the first has any data.
|
||||||
|
uint32_t magic = reader->Read();
|
||||||
|
assert_true(magic == 'SWAP');
|
||||||
|
|
||||||
uint32_t frontbuffer_ptr = reader->Read();
|
uint32_t frontbuffer_ptr = reader->Read();
|
||||||
uint32_t frontbuffer_width = reader->Read();
|
uint32_t frontbuffer_width = reader->Read();
|
||||||
uint32_t frontbuffer_height = reader->Read();
|
uint32_t frontbuffer_height = reader->Read();
|
||||||
reader->Advance(count - 3);
|
reader->Advance(count - 4);
|
||||||
last_swap_width_ = frontbuffer_width;
|
last_swap_width_ = frontbuffer_width;
|
||||||
last_swap_height_ = frontbuffer_height;
|
last_swap_height_ = frontbuffer_height;
|
||||||
|
|
||||||
|
|
|
@ -434,11 +434,12 @@ SHIM_CALL VdSwap_shim(PPCContext* ppc_state, KernelState* state) {
|
||||||
auto dwords = reinterpret_cast<uint32_t*>(SHIM_MEM_ADDR(unk0));
|
auto dwords = reinterpret_cast<uint32_t*>(SHIM_MEM_ADDR(unk0));
|
||||||
dwords[0] = xe::byte_swap((0x3 << 30) | ((63 - 1) << 16) |
|
dwords[0] = xe::byte_swap((0x3 << 30) | ((63 - 1) << 16) |
|
||||||
(xe::gpu::xenos::PM4_XE_SWAP << 8));
|
(xe::gpu::xenos::PM4_XE_SWAP << 8));
|
||||||
dwords[1] = xe::byte_swap(frontbuffer);
|
dwords[1] = xe::byte_swap('SWAP');
|
||||||
|
dwords[2] = xe::byte_swap(frontbuffer);
|
||||||
|
|
||||||
// Set by VdCallGraphicsNotificationRoutines.
|
// Set by VdCallGraphicsNotificationRoutines.
|
||||||
dwords[2] = xe::byte_swap(last_frontbuffer_width_);
|
dwords[3] = xe::byte_swap(last_frontbuffer_width_);
|
||||||
dwords[3] = xe::byte_swap(last_frontbuffer_height_);
|
dwords[4] = xe::byte_swap(last_frontbuffer_height_);
|
||||||
|
|
||||||
SHIM_SET_RETURN_64(0);
|
SHIM_SET_RETURN_64(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue