Module: Mesa Branch: main Commit: cb9f94f84c4cbd372587d2d61cf84f38aa0081a5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cb9f94f84c4cbd372587d2d61cf84f38aa0081a5
Author: Samuel Pitoiset <[email protected]> Date: Fri Mar 24 12:35:36 2023 +0100 radv: stop checking dynamic states when emitting the guardband state If the primitive topology is part of the PSO, it's copied at pipeline bind time to the dynamic state, so this checks is unnecessary. Signed-off-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22105> --- src/amd/vulkan/radv_cmd_buffer.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 671e110eae2..b54c6b7de41 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -3497,11 +3497,10 @@ radv_emit_guardband_state(struct radv_cmd_buffer *cmd_buffer) const struct radv_dynamic_state *d = &cmd_buffer->state.dynamic; unsigned rast_prim; - if (!(pipeline->dynamic_states & RADV_DYNAMIC_PRIMITIVE_TOPOLOGY) || - (pipeline->active_stages & (VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT | - VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT | - VK_SHADER_STAGE_GEOMETRY_BIT | - VK_SHADER_STAGE_MESH_BIT_EXT))) { + if (pipeline->active_stages & (VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT | + VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT | + VK_SHADER_STAGE_GEOMETRY_BIT | + VK_SHADER_STAGE_MESH_BIT_EXT)) { /* Ignore dynamic primitive topology for TES/GS/MS stages. */ rast_prim = pipeline->rast_prim; } else {
