Precompile pipelines for the custom gaussian blur shaders.

This commit is contained in:
Skyth 2024-12-08 00:00:12 +03:00
parent 56068f77d8
commit fde79061b9

View file

@ -5464,8 +5464,23 @@ static void ModelConsumerThread()
EnqueueGraphicsPipelineCompilation(msaaPipelineState, emptyHolderPair, "Precompiled Pipeline MSAA"); EnqueueGraphicsPipelineCompilation(msaaPipelineState, emptyHolderPair, "Precompiled Pipeline MSAA");
} }
SanitizePipelineState(pipelineState); // Compile the custom gaussian blur shaders that we pass to the game.
EnqueueGraphicsPipelineCompilation(pipelineState, emptyHolderPair, "Precompiled Pipeline"); if (pipelineState.pixelShader != nullptr &&
pipelineState.pixelShader->shaderCacheEntry != nullptr &&
pipelineState.pixelShader->shaderCacheEntry->hash == 0x4294510C775F4EE8)
{
for (auto& shader : g_gaussianBlurShaders)
{
pipelineState.pixelShader = shader.get();
SanitizePipelineState(pipelineState);
EnqueueGraphicsPipelineCompilation(pipelineState, emptyHolderPair, "Precompiled Gaussian Blur Pipeline");
}
}
else
{
SanitizePipelineState(pipelineState);
EnqueueGraphicsPipelineCompilation(pipelineState, emptyHolderPair, "Precompiled Pipeline");
}
} }
g_pendingPipelineStateCache = false; g_pendingPipelineStateCache = false;