added upscaleSize support for FSR3.1

This commit is contained in:
cdozdil
2025-03-10 01:41:00 +03:00
parent beb2f7facf
commit c9ea124125
5 changed files with 14 additions and 0 deletions
+2
View File
@@ -364,6 +364,8 @@ ffxReturnCode_t ffxDispatch_Dx12(ffxContext* context, ffxDispatchDescHeader* des
params->Set("FSR.transparencyAndComposition", dispatchDesc->transparencyAndComposition.resource);
params->Set("FSR.reactive", dispatchDesc->reactive.resource);
params->Set(NVSDK_NGX_Parameter_Sharpness, dispatchDesc->sharpness);
params->Set("FSR.upscaleSize.width", dispatchDesc->upscaleSize.width);
params->Set("FSR.upscaleSize.height", dispatchDesc->upscaleSize.height);
LOG_DEBUG("handle: {:X}, internalResolution: {}x{}", handle->Id, dispatchDesc->renderSize.width, dispatchDesc->renderSize.height);
@@ -444,6 +444,9 @@ bool FSR31FeatureDx11::Evaluate(ID3D11DeviceContext* DeviceContext, NVSDK_NGX_Pa
LOG_WARN("Velocity configure result: {}", (UINT)result);
}
InParameters->Get("FSR.upscaleSize.width", &params.upscaleSize.width);
InParameters->Get("FSR.upscaleSize.height", &params.upscaleSize.height);
LOG_DEBUG("Dispatch!!");
auto result = ffxFsr3ContextDispatchUpscale(&_upscalerContext, &params);
@@ -339,6 +339,9 @@ bool FSR31FeatureDx11on12::Evaluate(ID3D11DeviceContext* InDeviceContext, NVSDK_
LOG_WARN("Velocity configure result: {}", (UINT)result);
}
InParameters->Get("FSR.upscaleSize.width", &params.upscaleSize.width);
InParameters->Get("FSR.upscaleSize.height", &params.upscaleSize.height);
LOG_DEBUG("Dispatch!!");
auto ffxresult = FfxApiProxy::D3D12_Dispatch()(&_context, &params.header);
@@ -390,6 +390,9 @@ bool FSR31FeatureDx12::Evaluate(ID3D12GraphicsCommandList* InCommandList, NVSDK_
LOG_WARN("Velocity configure result: {}", (UINT)result);
}
InParameters->Get("FSR.upscaleSize.width", &params.upscaleSize.width);
InParameters->Get("FSR.upscaleSize.height", &params.upscaleSize.height);
LOG_DEBUG("Dispatch!!");
auto result = FfxApiProxy::D3D12_Dispatch()(&_context, &params.header);
@@ -542,6 +542,9 @@ bool FSR31FeatureVk::Evaluate(VkCommandBuffer InCmdBuffer, NVSDK_NGX_Parameter*
LOG_WARN("Velocity configure result: {}", (UINT)result);
}
InParameters->Get("FSR.upscaleSize.width", &params.upscaleSize.width);
InParameters->Get("FSR.upscaleSize.height", &params.upscaleSize.height);
LOG_DEBUG("Dispatch!!");
auto result = FfxApiProxy::VULKAN_Dispatch()(&_context, &params.header);