revert 7571a36993
All checks were successful
eden-license / license-header (pull_request) Successful in 21s
All checks were successful
eden-license / license-header (pull_request) Successful in 21s
revert [vk] Fix dynamic vertex input state handling Previously, UpdateVertexInput() was always called when has_dynamic_vertex_input was true, even if the current graphics pipeline was not created with VK_DYNAMIC_STATE_VERTEX_INPUT_EXT. This could lead to unnecessary or invalid state updates. This change: - Adds GraphicsPipeline::HasDynamicVertexInput() to check whether the pipeline was created with dynamic vertex input enabled. - Calls UpdateVertexInput() only when the current pipeline supports VK_DYNAMIC_STATE_VERTEX_INPUT_EXT. This ensures vertex input state updates are applied only when valid, improving correctness and preventing redundant updates.
This commit is contained in:
parent
bc893d361d
commit
194031096e
2 changed files with 2 additions and 6 deletions
|
@ -80,8 +80,7 @@ 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,10 +1002,7 @@ void RasterizerVulkan::UpdateDynamicStates() {
|
|||
}
|
||||
}
|
||||
if (features.has_dynamic_vertex_input) {
|
||||
if (auto* gp = pipeline_cache.CurrentGraphicsPipeline();
|
||||
gp && gp->HasDynamicVertexInput()) {
|
||||
UpdateVertexInput(regs);
|
||||
}
|
||||
UpdateVertexInput(regs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue