mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-06 10:43:16 +00:00
Properly implement sceVideoOutGetBufferLabelAddress (#2642)
* Export sceVideoOutGetBufferLabelAddress It's an exported function, used by red_prig's BLACKSQUAR2 homebrew sample. This also fixes the function's return type accordingly. * More sceVideoOutGetBufferLabelAddress fixups Library decomp shows a hardcoded return 16 on success. Not sure why it does that, but it never hurts to be accurate. Also needs to have an openOrbis-specific export to get it to work with the homebrew sample I'm testing. * Final fixups Removed the port assert and added asserts in libSceGnmDriver for when sceVideoOutGetBufferLabelAddress calls fail.
This commit is contained in:
parent
f663176a5d
commit
4d0c03fd4a
3 changed files with 17 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue