mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 23:42:43 +00:00
Final fixups
Removed the port assert and added asserts in libSceGnmDriver for when sceVideoOutGetBufferLabelAddress calls fail.
This commit is contained in:
parent
06994fa705
commit
67d9218101
@ -1087,7 +1087,8 @@ s32 PS4_SYSV_ABI sceGnmInsertWaitFlipDone(u32* cmdbuf, u32 size, s32 vo_handle,
|
||||
}
|
||||
|
||||
uintptr_t label_addr{};
|
||||
VideoOut::sceVideoOutGetBufferLabelAddress(vo_handle, &label_addr);
|
||||
ASSERT_MSG(VideoOut::sceVideoOutGetBufferLabelAddress(vo_handle, &label_addr) == 16,
|
||||
"sceVideoOutGetBufferLabelAddress call failed");
|
||||
|
||||
auto* wait_reg_mem = reinterpret_cast<PM4CmdWaitRegMem*>(cmdbuf);
|
||||
wait_reg_mem->header = PM4Type3Header{PM4ItOpcode::WaitRegMem, 5};
|
||||
@ -2041,7 +2042,8 @@ static inline s32 PatchFlipRequest(u32* cmdbuf, u32 size, u32 vo_handle, u32 buf
|
||||
}
|
||||
|
||||
uintptr_t label_addr{};
|
||||
VideoOut::sceVideoOutGetBufferLabelAddress(vo_handle, &label_addr);
|
||||
ASSERT_MSG(VideoOut::sceVideoOutGetBufferLabelAddress(vo_handle, &label_addr) == 16,
|
||||
"sceVideoOutGetBufferLabelAddress call failed");
|
||||
|
||||
// Write event to lock the VO surface
|
||||
auto* write_lock = reinterpret_cast<PM4CmdWriteData*>(cmdbuf);
|
||||
|
@ -300,7 +300,9 @@ s32 PS4_SYSV_ABI sceVideoOutGetBufferLabelAddress(s32 handle, uintptr_t* label_a
|
||||
return ORBIS_VIDEO_OUT_ERROR_INVALID_ADDRESS;
|
||||
}
|
||||
auto* port = driver->GetPort(handle);
|
||||
ASSERT(port);
|
||||
if (!port) {
|
||||
return ORBIS_VIDEO_OUT_ERROR_INVALID_HANDLE;
|
||||
}
|
||||
*label_addr = reinterpret_cast<uintptr_t>(port->buffer_labels.data());
|
||||
return 16;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user