Fix depth invert shader dispatch width calculation

This commit is contained in:
cdozdil
2025-11-28 22:56:55 +03:00
parent 1461162641
commit 6d5916daa8
+2 -12
View File
@@ -194,18 +194,8 @@ bool DI_Dx12::Dispatch(ID3D12Device* InDevice, ID3D12GraphicsCommandList* InCmdL
UINT dispatchWidth = 0;
UINT dispatchHeight = 0;
if ((State::Instance().currentFeature->GetFeatureFlags() & NVSDK_NGX_DLSS_Feature_Flags_MVLowRes) == 0)
{
dispatchWidth =
static_cast<UINT>((State::Instance().currentFeature->DisplayWidth() + InNumThreadsX - 1) / InNumThreadsX);
dispatchHeight = (State::Instance().currentFeature->DisplayHeight() + InNumThreadsY - 1) / InNumThreadsY;
}
else
{
dispatchWidth =
static_cast<UINT>((State::Instance().currentFeature->RenderWidth() + InNumThreadsX - 1) / InNumThreadsX);
dispatchHeight = (State::Instance().currentFeature->RenderHeight() + InNumThreadsY - 1) / InNumThreadsY;
}
dispatchWidth = static_cast<UINT>((outDesc.Width + InNumThreadsX - 1) / InNumThreadsX);
dispatchHeight = (outDesc.Height + InNumThreadsY - 1) / InNumThreadsY;
InCmdList->Dispatch(dispatchWidth, dispatchHeight, 1);