mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Vulkan: Set USES_DEPTH_STENCIL/USES_BLEND_CONSTANT before creating the pipeline
They were OR-ed into pipelineFlags just after the CreateGraphicsPipeline call that consumes them, so the render manager's "don't compile a pipeline that requires depth for a non-depth renderpass type" check could never fire for game pipelines. thin3d_vulkan.cpp sets the flag before its call, which is the intended order. Note this can now legitimately skip some variants when loading the shader cache - those were invalid combinations that the check was written to reject. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01SGz54K3ZXa2Qzyc3aMEYyY
This commit is contained in:
1 parent
38d5ab657e
commit
41d69e61e1
1 file changed
+6
-3
@@ -329,15 +329,18 @@ static VulkanPipeline *CreateVulkanPipeline(VulkanRenderManager *renderManager,
|
||||
tag = fs->GetID().Description() + " VS " + vs->GetID().Description();
|
||||
#endif
|
||||
|
||||
VKRGraphicsPipeline *pipeline = renderManager->CreateGraphicsPipeline(desc, pipelineFlags, variantBitmask, sampleCount, cacheLoad, tag.c_str());
|
||||
|
||||
vulkanPipeline->pipeline = pipeline;
|
||||
// These need to be set before creating the pipeline - the render manager checks the flags against
|
||||
// the render pass type of the pipeline's variants.
|
||||
if (useBlendConstant) {
|
||||
pipelineFlags |= PipelineFlags::USES_BLEND_CONSTANT;
|
||||
}
|
||||
if (dss.depthTestEnable || dss.stencilTestEnable) {
|
||||
pipelineFlags |= PipelineFlags::USES_DEPTH_STENCIL;
|
||||
}
|
||||
|
||||
VKRGraphicsPipeline *pipeline = renderManager->CreateGraphicsPipeline(desc, pipelineFlags, variantBitmask, sampleCount, cacheLoad, tag.c_str());
|
||||
|
||||
vulkanPipeline->pipeline = pipeline;
|
||||
vulkanPipeline->pipelineFlags = pipelineFlags;
|
||||
return vulkanPipeline;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user