diff --git a/src/xenia/gpu/gl4/command_processor.cc b/src/xenia/gpu/gl4/command_processor.cc index c4bea0187..5692b8878 100644 --- a/src/xenia/gpu/gl4/command_processor.cc +++ b/src/xenia/gpu/gl4/command_processor.cc @@ -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 // interrupt. // 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_width = reader->Read(); uint32_t frontbuffer_height = reader->Read(); - reader->Advance(count - 3); + reader->Advance(count - 4); last_swap_width_ = frontbuffer_width; last_swap_height_ = frontbuffer_height; diff --git a/src/xenia/kernel/xboxkrnl_video.cc b/src/xenia/kernel/xboxkrnl_video.cc index cfa38074f..f7a6cbc3e 100644 --- a/src/xenia/kernel/xboxkrnl_video.cc +++ b/src/xenia/kernel/xboxkrnl_video.cc @@ -434,11 +434,12 @@ SHIM_CALL VdSwap_shim(PPCContext* ppc_state, KernelState* state) { auto dwords = reinterpret_cast(SHIM_MEM_ADDR(unk0)); dwords[0] = xe::byte_swap((0x3 << 30) | ((63 - 1) << 16) | (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. - dwords[2] = xe::byte_swap(last_frontbuffer_width_); - dwords[3] = xe::byte_swap(last_frontbuffer_height_); + dwords[3] = xe::byte_swap(last_frontbuffer_width_); + dwords[4] = xe::byte_swap(last_frontbuffer_height_); SHIM_SET_RETURN_64(0); }