libraries: gnmdriver: fix for incorrect offset in `sceGnmDrawInitDefaultHardwareState175`

This commit is contained in:
psucien 2024-06-29 18:11:32 +02:00 committed by georgemoralis
parent cc945fb92e
commit 3663c60f3d
1 changed files with 3 additions and 2 deletions

View File

@ -664,9 +664,10 @@ u32 PS4_SYSV_ABI sceGnmDrawInitDefaultHardwareState175(u32* cmdbuf, u32 size) {
cmdbuf = ClearContextState(cmdbuf); cmdbuf = ClearContextState(cmdbuf);
std::memcpy(cmdbuf, InitSequence175.data(), InitSequence175.size() * 4); std::memcpy(cmdbuf, InitSequence175.data(), InitSequence175.size() * 4);
cmdbuf += InitSequence175.size();
cmdbuf[0x7f] = 0xc07f1000; constexpr auto cmdbuf_left = HwInitPacketSize - InitSequence175.size() - 0xc - 1;
cmdbuf[0x80] = 0; WriteTrailingNop<cmdbuf_left>(cmdbuf);
return HwInitPacketSize; return HwInitPacketSize;
} }