changed version info format

This commit is contained in:
cdozdil
2024-04-10 22:05:22 +03:00
parent 20a722f9a1
commit a2abd81ebc
6 changed files with 18 additions and 10 deletions
+8 -1
View File
@@ -39,6 +39,13 @@ protected:
virtual void SetInit(bool InValue) { _isInited = InValue; }
public:
typedef struct _feature_version
{
unsigned int major;
unsigned int minor;
unsigned int patch;
} feature_version;
NVSDK_NGX_Handle* Handle() const { return _handle; };
static unsigned int GetNextHandleId() { return handleCounter++; }
@@ -61,7 +68,7 @@ public:
bool HasExposure() const { return _hasExposure; }
bool HasOutput() const { return _hasOutput; }
int InitFlags() const { return _initFlags; }
virtual const char* Version() = 0;
virtual feature_version Version() = 0;
virtual const char* Name() = 0;
IFeature(unsigned int InHandleId, const NVSDK_NGX_Parameter* InParameters)
+2 -1
View File
@@ -47,6 +47,7 @@ private:
bool _depthInverted = false;
unsigned int _lastWidth = 0;
unsigned int _lastHeight = 0;
static inline feature_version _version{ 2, 2, 1 };
protected:
FfxFsr2Context _context = {};
@@ -60,7 +61,7 @@ protected:
public:
bool IsDepthInverted() const;
const char* Version() final { return "2.2.1"; }
feature_version Version() final { return _version; }
const char* Name() final { return "FSR"; }
FSR2Feature(unsigned int InHandleId, const NVSDK_NGX_Parameter* InParameters) : IFeature(InHandleId, InParameters)
@@ -34,6 +34,7 @@ private:
bool _depthInverted = false;
unsigned int _lastWidth = 0;
unsigned int _lastHeight = 0;
static inline feature_version _version{ 2, 1, 2 };
protected:
Fsr212::FfxFsr2Context _context = {};
@@ -47,7 +48,7 @@ protected:
public:
bool IsDepthInverted() const;
const char* Version() final { return "2.1.2"; }
feature_version Version() final { return _version; }
const char* Name() final { return "FSR"; }
FSR2Feature212(unsigned int InHandleId, const NVSDK_NGX_Parameter* InParameters) : IFeature(InHandleId, InParameters)
+3 -2
View File
@@ -34,6 +34,7 @@ class XeSSFeature : public virtual IFeature
{
private:
std::string _version = "1.3.0";
xess_version_t _xessVersion{};
protected:
xess_context_handle_t _xessContext = nullptr;
@@ -43,10 +44,10 @@ protected:
bool InitXeSS(ID3D12Device* device, const NVSDK_NGX_Parameter* InParameters);
float GetSharpness(const NVSDK_NGX_Parameter* InParameters);
bool CreateBufferResource(ID3D12Device* InDevice, ID3D12Resource* InSource, ID3D12Resource** OutDest, D3D12_RESOURCE_STATES InDestState);
const char* Version() final { return _version.c_str(); }
const char* Name() final { return "XeSS"; }
public:
feature_version Version() final { return feature_version{ _xessVersion.major, _xessVersion.minor, _xessVersion.patch }; }
const char* Name() final { return "XeSS"; }
XeSSFeature(unsigned int handleId, const NVSDK_NGX_Parameter* InParameters) : IFeature(handleId, InParameters)
{
+3 -1
View File
@@ -82,9 +82,11 @@ bool XeSSFeatureDx12::Evaluate(ID3D12GraphicsCommandList* InCommandList, const N
auto sharpness = GetSharpness(InParameters);
float ssMulti = Version().major >= 1 && Version().minor >= 3 ? Config::Instance()->SuperSamplingMultiplier.value_or(3.0f) : Config::Instance()->SuperSamplingMultiplier.value_or(2.5f);
bool useSS = Config::Instance()->SuperSamplingEnabled.value_or(false) &&
!Config::Instance()->DisplayResolution.value_or(false) &&
((float)DisplayWidth() / (float)params.inputWidth) < Config::Instance()->SuperSamplingMultiplier.value_or(3.0f);
((float)DisplayWidth() / (float)params.inputWidth) < ssMulti;
spdlog::debug("XeSSFeatureDx12::Evaluate Input Resolution: {0}x{1}", params.inputWidth, params.inputHeight);
-4
View File
@@ -119,10 +119,7 @@ Imgui_Dx11::~Imgui_Dx11()
if (!_dx11Init)
return;
spdlog::debug("Imgui_Dx11::~Imgui_Dx11");
ImGui::SetCurrentContext(context);
spdlog::trace("Imgui_Dx11::~Imgui_Dx11 sleeping before ImGui_ImplDX11_Shutdown for 250ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
ImGui_ImplDX11_Shutdown();
@@ -131,7 +128,6 @@ Imgui_Dx11::~Imgui_Dx11()
ImGui::SetCurrentContext(currCtx);
// hackzor
spdlog::trace("Imgui_Dx11::~Imgui_Dx11 sleeping after ImGui_ImplDX11_Shutdown for 250ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
if (_renderTargetTexture)