mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-09-23 13:56:19 +00:00
better ini option
This commit is contained in:
@@ -98,7 +98,7 @@ void Config::Reload()
|
||||
|
||||
FsrVerticalFov = readFloat("FSR", "VerticalFov");
|
||||
|
||||
UseSyncQueries = readBool("Dx11withDx12", "UseSyncQueries");
|
||||
UseSafeSyncQueries = readInt("Dx11withDx12", "UseSafeSyncQueries");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ public:
|
||||
std::optional<float> FsrVerticalFov;
|
||||
|
||||
// dx11wdx12
|
||||
std::optional<bool> UseSyncQueries;
|
||||
std::optional<int> UseSafeSyncQueries;
|
||||
|
||||
|
||||
// Engine Info
|
||||
|
||||
@@ -484,8 +484,10 @@ bool FSR2FeatureDx11on12::Evaluate(ID3D11DeviceContext* InDeviceContext, const N
|
||||
spdlog::warn("FSR2FeatureDx11on12::Evaluate bias mask not exist and its enabled in config, it may cause problems!!");
|
||||
}
|
||||
|
||||
Dx11DeviceContext->Signal(dx11fence_1, 10);
|
||||
if (Config::Instance()->UseSafeSyncQueries.value_or(0) > 0)
|
||||
Dx11DeviceContext->Flush();
|
||||
|
||||
Dx11DeviceContext->Signal(dx11fence_1, 10);
|
||||
Dx12CommandQueue->Wait(dx12fence_1, 10);
|
||||
|
||||
if (paramColor)
|
||||
@@ -701,7 +703,7 @@ bool FSR2FeatureDx11on12::Evaluate(ID3D11DeviceContext* InDeviceContext, const N
|
||||
Dx11DeviceContext->Wait(dx11fence_2, 20);
|
||||
|
||||
// copy back output
|
||||
if (Config::Instance()->UseSyncQueries.value_or(false))
|
||||
if (Config::Instance()->UseSafeSyncQueries.value_or(0) > 1)
|
||||
{
|
||||
// intel arc fix
|
||||
D3D11_QUERY_DESC pQueryDesc{};
|
||||
|
||||
@@ -494,6 +494,9 @@ bool XeSSFeatureDx11::Evaluate(ID3D11DeviceContext* InDeviceContext, const NVSDK
|
||||
spdlog::warn("XeSSFeatureDx11::Evaluate bias mask not exist and its enabled in config, it may cause problems!!");
|
||||
}
|
||||
|
||||
if (Config::Instance()->UseSafeSyncQueries.value_or(0) > 0)
|
||||
Dx11DeviceContext->Flush();
|
||||
|
||||
Dx11DeviceContext->Signal(dx11fence_1, 10);
|
||||
Dx12CommandQueue->Wait(dx12fence_1, 10);
|
||||
|
||||
@@ -674,7 +677,7 @@ bool XeSSFeatureDx11::Evaluate(ID3D11DeviceContext* InDeviceContext, const NVSDK
|
||||
|
||||
|
||||
// copy back output
|
||||
if (Config::Instance()->UseSyncQueries.value_or(false))
|
||||
if (Config::Instance()->UseSafeSyncQueries.value_or(0) > 1)
|
||||
{
|
||||
D3D11_QUERY_DESC pQueryDesc{};
|
||||
pQueryDesc.Query = D3D11_QUERY_EVENT;
|
||||
@@ -696,7 +699,7 @@ bool XeSSFeatureDx11::Evaluate(ID3D11DeviceContext* InDeviceContext, const NVSDK
|
||||
Dx11DeviceContext->End(query1);
|
||||
|
||||
// Execute dx11 commands
|
||||
//Dx11DeviceContext->Flush();
|
||||
Dx11DeviceContext->Flush();
|
||||
|
||||
// wait for completion
|
||||
while (Dx11DeviceContext->GetData(query1, nullptr, 0, D3D11_ASYNC_GETDATA_DONOTFLUSH) == S_FALSE);
|
||||
|
||||
@@ -10,10 +10,18 @@ Dx11Upscaler=auto
|
||||
Dx12Upscaler=auto
|
||||
|
||||
[Dx11withDx12]
|
||||
; Use a DX11 Query to ensure copyback operation for output texture is finished
|
||||
; Needed for Intel Arc cards :/
|
||||
; true or false - Default (auto) is false
|
||||
Dx11withDx12=auto
|
||||
; Safe syncing measures for Dx11 with Dx12
|
||||
; Might be needed for Intel Arc cards or different Dx11 drivers
|
||||
;
|
||||
; Valid values are;
|
||||
; 0 - Safe syncing is off
|
||||
; 1 - Flush after Dx11 texture copies
|
||||
; 2 - Sync after output copy
|
||||
;
|
||||
; 0 is fastest, 2 is slowest
|
||||
;
|
||||
; 0 - 2 - Default (auto) is 0
|
||||
UseSafeSyncQueries=auto
|
||||
|
||||
[XeSS]
|
||||
; Building pipeline for XeSS before init
|
||||
|
||||
Reference in New Issue
Block a user