Resource: patch out forced texture streaming disable code

If we do not have resident pages, then we can still rely on the GPU driven texture streaming system. However, this code forces the mode to TSM_OPMODE_LEGACY_PICMIP. This is a bug because it contradicts the ability to switch between the dynamic and static systems. Patched the jump from a conditional one to an unconditional one to always skip over this broken code.

This also ultimately drops the need for having a dummy STBSP file, and the benefit of not having a dummy STBSP file is that 'hasResidentPages' will be false, which disables the STBSP world texture crediting code, reducing frame times.
This commit is contained in:
Kawe Mazidjatari 2025-01-03 22:32:37 +01:00
parent 36d2b3534a
commit 5e0c24ad84

View File

@ -53,6 +53,13 @@
0x1E3CB6: "xor rax, rax" // NULL RAX instead of mov'ing '0xDEADFEEDDEADFEED' to cache ptr in 'Pak_UpdateModelAsset()'
0x1E3EE2: "xor rax, rax" // NULL RAX instead of mov'ing '0xDEADFEEDDEADFEED' to cache ptr in 'Pak_UpdateAnimRigAsset()'
// If we don't have an STBSP file, the field s_textureStreamMgr.hasResidentPages will be false. But if the texture
// stream manager is initialized and the stream mode is set to default, the code will force the stream mode to disabled.
// However, our engine has a working implementation of the GPU driven texture streaming system, and the correct thing
// to do here is to not force anything, since our SDK will enable the GPU driven texture streaming system if an STBSP
// file wasn't provided for the level. We turn the conditional jump to an unconditional jump here to skip this code.
0x3E0363: "EB 0F"
/////////////////////////////
/////////////////////////////
//// Code defects ////