Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(game/five): show accurate VRAM impact for 'extended budget'
Multiplying the original estimate was inaccurate when compared to the
real VRAM usage.

Using the raw data (offset by ~1 GB) seems to more closely match the
usage reported by Task Manager.
  • Loading branch information
blattersturm committed Sep 10, 2022
1 parent 6834bfb commit 079e62e
Showing 1 changed file with 4 additions and 2 deletions.
@@ -1,6 +1,5 @@
#include <StdInc.h>

#include <jitasm.h>
#include <Hooking.h>

#include <CoreConsole.h>
Expand Down Expand Up @@ -89,7 +88,10 @@ static uint64_t (*g_origSettingsVramTex)(void* self, int quality, void* settings
static uint64_t SettingsVramTex(void* self, int quality, void* settings)
{
float multiplier = (GetBudgetVar().GetValue() / 8.0f) + 1.0f;
return g_origSettingsVramTex(self, quality, settings) * multiplier;
g_origSettingsVramTex(self, quality, settings);

// 1 GB is the approximate difference between default 'fake settings' amount and our 3 GB assumption
return g_vramLocation[quality + 1] - (1 * GB);
}

static uint64_t (*g_origGetAvailableMemoryForStreamer)(void* self);
Expand Down

0 comments on commit 079e62e

Please sign in to comment.