GPUOpen-Effects / FidelityFX-FSR2

FidelityFX Super Resolution 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[UE5.0.3 FSR2.1 plugin] Game crashing when resizing the game window smaller then 64x64

marieBHVR opened this issue · comments

Hello,
We recently encountered this issue when FSR is activated in our project. If we try to resize the window to a very small size ( lower then 64x64) we get a 100% crash when trying to create a UAV.

This seems to happen because the values set for the UAVMips of FFX_FSR2_RESOURCE_IDENTIFIER_AUTO_EXPOSURE_MIPMAP_5 in
static void scheduleDispatch(FfxFsr2Context_Private* context, const FfxFsr2DispatchDescription* params, const FfxPipelineState* pipeline, uint32_t dispatchX, uint32_t dispatchY)
for the ComputeLuminancePyramid pass uses some defines values that assumes that the image is always going to be big enough to have those mips :
jobDescriptor.uavMip[currentUnorderedAccessViewIndex] = currentResourceId -FFX_FSR2_RESOURCE_IDENTIFIER_AUTO_EXPOSURE_MIPMAP_0;

To prevent this crash on our end, we ended up clamping those mips index to a valid value.
Here'a a callstack of the crash :

> UnrealEditor-RenderCore.dll!FRDGUserValidation::ValidateCreateUAV(const FRDGTextureUAVDesc & Desc) Line 359 C++ UnrealEditor-RenderCore.dll!FRDGBuilder::CreateUAV(const FRDGTextureUAVDesc & Desc, ERDGUnorderedAccessViewFlags InFlags) Line 98 C++ UnrealEditor-FSR2TemporalUpscaling.dll!FFSR2ComputeLuminancePyramidCS::BindParameters(FRDGBuilder & GraphBuilder, FFSR2BackendState * Context, const FfxGpuJobDescription * job, FFSR2ComputeLuminancePyramidCS::FParameters * Parameters) Line 162 C++ UnrealEditor-FSR2TemporalUpscaling.dll!TFSR2SubPass<FFSR2ComputeLuminancePyramidCS>::Dispatch(FRDGBuilder & GraphBuilder, FFSR2BackendState * Context, const FfxGpuJobDescription * job) Line 107 C++ UnrealEditor-FSR2TemporalUpscaling.dll!FlushRenderJobs_UE(FfxFsr2Interface * backendInterface, void * commandList) Line 526 C++ UnrealEditor-FFXFSR2Api.dll!fsr2Dispatch(FfxFsr2Context_Private * context, const FfxFsr2DispatchDescription * params) Line 803 C++ UnrealEditor-FSR2TemporalUpscaling.dll!FFSR2TemporalUpscaler::AddPasses(FRDGBuilder & GraphBuilder, const FViewInfo & View, const ITemporalUpscaler::FPassInputs & PassInputs) Line 1453 C++ UnrealEditor-Renderer.dll!AddPostProcessingPasses(FRDGBuilder & GraphBuilder, const FViewInfo & View, bool bAnyLumenActive, const FPostProcessingInputs & Inputs, const Nanite::FRasterResults * NaniteRasterResults, FInstanceCullingManager & InstanceCullingManager, FVirtualShadowMapArray * VirtualShadowMapArray, FLumenSceneFrameTemporaries & LumenFrameTemporaries) Line 610 C++ UnrealEditor-Renderer.dll!FDeferredShadingSceneRenderer::Render(FRDGBuilder & GraphBuilder) Line 3329 C++ UnrealEditor-Renderer.dll!RenderViewFamily_RenderThread(FRHICommandListImmediate & RHICmdList, FSceneRenderer * SceneRenderer) Line 4149 C++ UnrealEditor-Renderer.dll!FRendererModule::BeginRenderingViewFamily::__l46::<lambda>(FRHICommandListImmediate & RHICmdList) Line 4400 C++ UnrealEditor-Renderer.dll!TEnqueueUniqueRenderCommandType<FRendererModule::BeginRenderingViewFamily'::46'::FDrawSceneCommandName,void <lambda>(FRHICommandListImmediate &)>::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 193 C++ UnrealEditor-Renderer.dll!TGraphTask<TEnqueueUniqueRenderCommandType<FRendererModule::BeginRenderingViewFamily'::46'::FDrawSceneCommandName,void <lambda>(FRHICommandListImmediate &)>>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool bDeleteOnCompletion) Line 975 C++ [Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & CurrentThread, ENamedThreads::Type) Line 587 C++ UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 753 C++ UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 642 C++ UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type CurrentThread) Line 2115 C++ UnrealEditor-RenderCore.dll!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 380 C++ UnrealEditor-RenderCore.dll!FRenderingThread::Run() Line 546 C++ UnrealEditor-Core.dll!FRunnableThreadWin::Run() Line 146 C++ UnrealEditor-Core.dll!FRunnableThreadWin::GuardedRun() Line 68 C++``