mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-26 17:12:03 +00:00
[vk] Fix dynamic vertex input state handling (#295)
only applies vertex input state if the pipeline was created with it Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user