forked from eden-emu/eden
[vk] Fix dynamic vertex input state handling (#295)
only applies vertex input state if the pipeline was created with it Reviewed-on: eden-emu/eden#295 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: Shinmegumi <shinmegumi@eden-emu.dev> Co-committed-by: Shinmegumi <shinmegumi@eden-emu.dev>
This commit is contained in:
parent
4eb6d10d62
commit
eb72a358e3
2 changed files with 6 additions and 2 deletions
|
@ -80,7 +80,8 @@ public:
|
|||
PipelineStatistics* pipeline_statistics, RenderPassCache& render_pass_cache,
|
||||
const GraphicsPipelineCacheKey& key, std::array<vk::ShaderModule, NUM_STAGES> stages,
|
||||
const std::array<const Shader::Info*, NUM_STAGES>& infos);
|
||||
|
||||
// True if this pipeline was created with VK_DYNAMIC_STATE_VERTEX_INPUT_EXT
|
||||
bool HasDynamicVertexInput() const noexcept { return key.state.dynamic_vertex_input; }
|
||||
GraphicsPipeline& operator=(GraphicsPipeline&&) noexcept = delete;
|
||||
GraphicsPipeline(GraphicsPipeline&&) noexcept = delete;
|
||||
|
||||
|
|
|
@ -1002,7 +1002,10 @@ void RasterizerVulkan::UpdateDynamicStates() {
|
|||
}
|
||||
}
|
||||
if (features.has_dynamic_vertex_input) {
|
||||
UpdateVertexInput(regs);
|
||||
if (auto* gp = pipeline_cache.CurrentGraphicsPipeline();
|
||||
gp && gp->HasDynamicVertexInput()) {
|
||||
UpdateVertexInput(regs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue