Hello hello!
For a few of the PCG Graphs, we rely on HLSL nodes and they rely on ComputeFramework for compiling the shaders for it.
While upgrading to UE 5.6, we noticed that the PCG Builder Commandlet keeps spamming the following message and never finishes. (This was not happening with 5.5)
LogPCG: Verbose: Deferring until next frame as the kernel has pending shader compilations
After following through on this, it seems that the Custom_HLSL_PCGCustomHLSLKernel node created for a given HLSL node failed to load from a DDC, and hence it tried to recompile during generation.
[2025.07.23-01.59.32:303][ 8]LogComputeFramework: Loading shader for kernel <CustomPCGGraph>/Custom_HLSL_PCGCustomHLSLKernel from DDC failed. Shader needs recompile.
[2025.07.23-01.59.32:304][ 8]LogComputeFramework: Missing cached shader map for kernel <CustomPCGGraph>/Custom_HLSL_PCGCustomHLSLKernel, compiling.
While PCG Builder calls WaitForAllAsyncEditorProcesses before generating components, since the shader compilation started during the generation, it did not try to finish compilation for the shader compilation job as it would have within WaitForAllAsyncEditorProcesses.
I wanted your opinion on
- Whether there’s something we are missing to set in HLSL node for this
- A fix I just tried, which is to call FAssetCompilingManager::Get().FinishAllCompilation(); within WaitForComponentGeneration lambda before it does FakeEngineTick. This makes sure it does a blocking call for compiling all remaining compile jobs. Looking at FinishAllCompilation by multiple types of Compilation Managers, I wonder if this is something we should do before ticking while generating for PCG Components.
Regards,
Vaishvik