From dd570e040bb42bc4c38470edac090d418c81a61b Mon Sep 17 00:00:00 2001 From: cdozdil Date: Tue, 19 Aug 2025 14:11:52 +0300 Subject: [PATCH] Fixed Unity Flip issue --- OptiScaler/framegen/IFGFeature_Dx12.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OptiScaler/framegen/IFGFeature_Dx12.cpp b/OptiScaler/framegen/IFGFeature_Dx12.cpp index 8777ceb7..1d637b06 100644 --- a/OptiScaler/framegen/IFGFeature_Dx12.cpp +++ b/OptiScaler/framegen/IFGFeature_Dx12.cpp @@ -66,7 +66,7 @@ void IFGFeature_Dx12::FlipResource(Dx12Resource* resource) flipOutput = _resourceCopy[fIndex][type]; if (!CreateBufferResource(_device, resource->resource, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, &flipOutput, true, - false)) + resource->type == FG_ResourceType::Depth)) { LOG_ERROR("{}, CreateBufferResource for flip is failed!", magic_enum::enum_name(type)); return; @@ -74,7 +74,7 @@ void IFGFeature_Dx12::FlipResource(Dx12Resource* resource) _resourceCopy[fIndex][type] = flipOutput; - if (type != FG_ResourceType::Depth) + if (type == FG_ResourceType::Depth) { if (_depthFlip.get() == nullptr) {