Skip printing info for pipelines compiled during loading.

This commit is contained in:
Skyth 2024-11-27 14:37:51 +03:00
parent 8cbccf4b6e
commit 516b59467d

View file

@ -2743,15 +2743,24 @@ static RenderPipeline* CreateGraphicsPipelineInRenderThread(PipelineState pipeli
pipeline = CreateGraphicsPipeline(pipelineState); pipeline = CreateGraphicsPipeline(pipelineState);
#ifdef ASYNC_PSO_DEBUG #ifdef ASYNC_PSO_DEBUG
bool loading = *reinterpret_cast<bool*>(g_memory.Translate(0x83367A4C));
if (loading)
++g_pipelinesCreatedAsynchronously;
else
++g_pipelinesCreatedInRenderThread; ++g_pipelinesCreatedInRenderThread;
pipeline->setName(std::format("{} {} {:X}",
pipeline->setName(std::format("{} {} {} {:X}", loading ? "ASYNC" : "",
pipelineState.vertexShader->name, pipelineState.pixelShader != nullptr ? pipelineState.pixelShader->name : "<none>", hash)); pipelineState.vertexShader->name, pipelineState.pixelShader != nullptr ? pipelineState.pixelShader->name : "<none>", hash));
if (!loading)
{
std::lock_guard lock(g_debugMutex); std::lock_guard lock(g_debugMutex);
g_pipelineDebugText = std::format( g_pipelineDebugText = std::format(
"PipelineState {:X}:\n" "PipelineState {:X}:\n"
" vertexShader: {}\n" " vertexShader: {}\n"
" pixelShader: {}\n" " pixelShader: {}\n"
" vertexDeclaration: {:X}\n"
" instancing: {}\n" " instancing: {}\n"
" zEnable: {}\n" " zEnable: {}\n"
" zWriteEnable: {}\n" " zWriteEnable: {}\n"
@ -2780,6 +2789,7 @@ static RenderPipeline* CreateGraphicsPipelineInRenderThread(PipelineState pipeli
hash, hash,
pipelineState.vertexShader->name, pipelineState.vertexShader->name,
pipelineState.pixelShader != nullptr ? pipelineState.pixelShader->name : "<none>", pipelineState.pixelShader != nullptr ? pipelineState.pixelShader->name : "<none>",
reinterpret_cast<size_t>(pipelineState.vertexDeclaration),
pipelineState.instancing, pipelineState.instancing,
pipelineState.zEnable, pipelineState.zEnable,
pipelineState.zWriteEnable, pipelineState.zWriteEnable,
@ -2806,6 +2816,7 @@ static RenderPipeline* CreateGraphicsPipelineInRenderThread(PipelineState pipeli
pipelineState.enableAlphaToCoverage, pipelineState.enableAlphaToCoverage,
pipelineState.specConstants) pipelineState.specConstants)
+ g_pipelineDebugText; + g_pipelineDebugText;
}
#endif #endif
} }