mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-08-24 07:06:33 +00:00
Fix NVSDK Scoped init class
This commit is contained in:
@@ -22,18 +22,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
|
||||
|
||||
@@ -33,18 +33,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
|
||||
|
||||
@@ -28,18 +28,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