mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-08-26 08:06:33 +00:00
Fix NVSDK Scoped init class
This commit is contained in:
@@ -20,18 +20,18 @@ static inline int evalCounter = 0;
|
||||
static inline bool shutdown = false;
|
||||
static inline bool _skipInit = false;
|
||||
|
||||
class ScopedInit
|
||||
class ScopedInitDx11
|
||||
{
|
||||
private:
|
||||
bool previousState;
|
||||
|
||||
public:
|
||||
ScopedInit()
|
||||
ScopedInitDx11()
|
||||
{
|
||||
previousState = _skipInit;
|
||||
_skipInit = true;
|
||||
}
|
||||
~ScopedInit() { _skipInit = previousState; }
|
||||
~ScopedInitDx11() { _skipInit = previousState; }
|
||||
};
|
||||
|
||||
#pragma region NVSDK_NGX_D3D11_Init
|
||||
|
||||
@@ -30,18 +30,19 @@ static std::wstring appDataPath = L".";
|
||||
static bool shutdown = false;
|
||||
static inline bool _skipInit = false;
|
||||
|
||||
class ScopedInit
|
||||
class ScopedInitDx12
|
||||
{
|
||||
private:
|
||||
bool previousState;
|
||||
|
||||
public:
|
||||
ScopedInit()
|
||||
ScopedInitDx12()
|
||||
{
|
||||
previousState = _skipInit;
|
||||
_skipInit = true;
|
||||
}
|
||||
~ScopedInit() { _skipInit = previousState; }
|
||||
|
||||
~ScopedInitDx12() { _skipInit = previousState; }
|
||||
};
|
||||
|
||||
#pragma region DLSS Init Calls
|
||||
|
||||
@@ -26,18 +26,18 @@ static inline int evalCounter = 0;
|
||||
static inline bool shutdown = false;
|
||||
static inline bool _skipInit = false;
|
||||
|
||||
class ScopedInit
|
||||
class ScopedInitVk
|
||||
{
|
||||
private:
|
||||
bool previousState;
|
||||
|
||||
public:
|
||||
ScopedInit()
|
||||
ScopedInitVk()
|
||||
{
|
||||
previousState = _skipInit;
|
||||
_skipInit = true;
|
||||
}
|
||||
~ScopedInit() { _skipInit = previousState; }
|
||||
~ScopedInitVk() { _skipInit = previousState; }
|
||||
};
|
||||
|
||||
NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_VULKAN_Init_Ext2(
|
||||
|
||||
Reference in New Issue
Block a user