[GPU] Async shader compilation for D3D12 and Vulkan

Adds async_shader_compilation cvar (default true) that forces new
pipelines to be created async from the main thread, skips draws entirely
on D3D12 and on vulkan replaces pixel shader with placeholder until the
real one is ready. Causes some visual artifacts on first load but
greatly reduces load times and stutter.
This commit is contained in:
Herman S.
2025-12-31 20:23:37 +09:00
parent ccf8fb66f5
commit 5845f3437b
14 changed files with 702 additions and 99 deletions

View File

@@ -2466,6 +2466,10 @@ bool VulkanCommandProcessor::IssueDraw(xenos::PrimitiveType prim_type,
return false;
}
}
// If async mode is active, this may be a placeholder pipeline. The real
// pipeline will be swapped in by the creation thread when ready.
// We re-load the handle to pick up any swap that may have happened.
current_pipeline = pipeline->pipeline.load(std::memory_order_acquire);
// Update the textures before most other work in the submission because
// samplers depend on this (and in case of sampler overflow in a submission,