Skip to content

Commit

Permalink
Hotfix for VBlank counting thread running while a game has destroyed …
Browse files Browse the repository at this point in the history
…and is re-creating a SwapChain
  • Loading branch information
Kaldaien committed Sep 17, 2024
1 parent 35e03c7 commit 0f85aba
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
17 changes: 14 additions & 3 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
24.9.17.1
24.9.17.2
=========
+ Add RAM warning if used system RAM reaches >= 95% while a game is running
+ Hotfix for VBlank counting thread running while a game has destroyed and
is re-creating a SwapChain.

24.9.17.1
=========
+ Add RAM warning if used system RAM reaches >= 98% while a game is running
+ Added command console variable to control DXGI Budget Scale (see 24.9.10)

DXGI.VRAMBudgetScale (Range: 0.1 - 5.0)

* Some games will respond in real-time to changes to this.
[ Press Ctrl+Shift+Tab to Open/Close the Command Console ]

* Some games will respond in real-time to changes to this.
* Changes made from the command console are saved to SK's per-game INI.

This allows tweaking over- or under-reporting of available VRAM to get a
game to load in higher detail assets or evict memory to reduce stutter.
Expand All @@ -15,6 +23,9 @@
Nixxes games have a weird Dedicated VRAM => Shared Mem offload system that
can make tuning this worthwhile on cards with low VRAM (i.e. RTX 3070).

-> Using a scale slightly above 1.0 will cause Nixxes ports to keep more
in VRAM and page textures in/out of system memory less often.

24.9.17
=======
+ Disable tearing when using a VRR screen w/ DLSS3 Frame Generation,
Expand Down
4 changes: 2 additions & 2 deletions include/SpecialK/DLL_VERSION.H
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#define SK_YEAR 24
#define SK_MONTH 9
#define SK_DATE 17
#define SK_REV_N 1
#define SK_REV 1
#define SK_REV_N 2
#define SK_REV 2

#ifndef _A2
#define _A2(a) #a
Expand Down
2 changes: 1 addition & 1 deletion src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ SK_InitFinishCallback (void)

if (GlobalMemoryStatusEx (&msex))
{
if (msex.dwMemoryLoad >= 95)
if (msex.dwMemoryLoad >= 98)
{
SK_ImGui_CreateNotification (
"RAM.HighLoad", SK_ImGui_Toast::Warning,
Expand Down
7 changes: 4 additions & 3 deletions src/render/render_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4864,7 +4864,7 @@ void
SK_Render_CountVBlanks ()
{
static HANDLE hVRREvent =
SK_CreateEvent (nullptr, FALSE, TRUE, FALSE);
SK_CreateEvent (nullptr, FALSE, FALSE, nullptr);

SK_RunOnce (
{
Expand All @@ -4891,8 +4891,9 @@ SK_Render_CountVBlanks ()

pOutput->WaitForVBlank ();

pSwapChain = rb.swapchain.p;
pSwapChain->GetFrameStatistics (&frameStats);
if (pSwapChain = rb.swapchain.p;
pSwapChain.p != nullptr)
pSwapChain->GetFrameStatistics (&frameStats);
}

if (pSwapChain.p != nullptr)
Expand Down

0 comments on commit 0f85aba

Please sign in to comment.