on pipeline bind with dynamic state, depth_clip_near needs to either be set by
* applying the dynamic state
* using the pipeline state
the previous code always used the pipeline state
fixes:
dEQP-VK.pipeline.*.extended_dynamic_state.between_pipelines.depth_clamp_enable
Fixes:
650880105e6 ("vulkan,lavapipe: Use a tri-state enum for depth clip enable")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21814>
dEQP-VK.conditional_rendering.conditional_ignore.clear_condition_host_memory_secondary_buffer_inherited_expect_noop_inverted,Fail
dEQP-VK.conditional_rendering.conditional_ignore.clear_condition_local_memory_expect_noop,Fail
dEQP-VK.conditional_rendering.conditional_ignore.clear_condition_local_memory_secondary_buffer_inherited_expect_noop_inverted,Fail
-dEQP-VK.pipeline.fast_linked_library.extended_dynamic_state.cmd_buffer_start.depth_clamp_enable,Fail
-dEQP-VK.pipeline.pipeline_library.extended_dynamic_state.cmd_buffer_start.depth_clamp_enable,Fail
if (BITSET_TEST(ps->dynamic, MESA_VK_DYNAMIC_RS_DEPTH_CLIP_ENABLE)) {
state->depth_clamp_sets_clip = false;
} else {
- state->rs_state.depth_clip_near = state->rs_state.depth_clip_far =
- vk_rasterization_state_depth_clip_enable(ps->rs);
state->depth_clamp_sets_clip =
ps->rs->depth_clip_enable == VK_MESA_DEPTH_CLIP_ENABLE_NOT_CLAMP;
+ if (state->depth_clamp_sets_clip)
+ state->rs_state.depth_clip_near = state->rs_state.depth_clip_far = !state->rs_state.depth_clamp;
+ else
+ state->rs_state.depth_clip_near = state->rs_state.depth_clip_far =
+ vk_rasterization_state_depth_clip_enable(ps->rs);
}
if (!BITSET_TEST(ps->dynamic, MESA_VK_DYNAMIC_RS_RASTERIZER_DISCARD_ENABLE))