From 47ffee00437354a5c9d96968ca51ce830913f897 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Tue, 7 May 2024 14:47:09 +0200 Subject: [PATCH] Resource: additional dedicated build patches to improve runtime performance Disabled additional unnecessary DX code from patched dedicated server executable, this allows the dedicated server to run RPaks containing models without any material or texture data. This also allows us to fully rebuild all RPaks for dedicated while also omitting material/texture data to further reduce memory usage during the parsing thereof, and overall disk size. --- r5dev/resource/patch/r5apex_ds.patch | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/r5dev/resource/patch/r5apex_ds.patch b/r5dev/resource/patch/r5apex_ds.patch index 43b5a3dc..ce2e5cdb 100644 --- a/r5dev/resource/patch/r5apex_ds.patch +++ b/r5dev/resource/patch/r5apex_ds.patch @@ -27,3 +27,10 @@ // since the dedicated server doesn't use model or texture streaming, and as a // result the files aren't shipped. 0x44BE87: "mov ecx, 0x1" --> "mov ecx, 0x0" + +// Prevent this global bool from being set, as setting this enables CMaterialRenderContext code which shouldn't run on the dedicated server. +0x1E4CE0: "mov cs:byte_165C4D15B, al" --> "mov cs:byte_165C4D15B, 0x0" + +// Prevent VFTable global pointer from being initialized to HardwareConfigDX11, which disables additional DX/Render code. +0x44A460: "lea rax, ds:off_141F03730" --> "nop" +0x44A467: "mov ds:off_141F03730, rax" --> "nop" \ No newline at end of file