vk_pipeline_cache: Allow using viewport range when it's more restrictive then depth clamp

This commit is contained in:
IndecisiveTurtle 2025-07-14 13:37:57 +03:00
parent 2a38b7e799
commit 4375fad6d1

View File

@ -525,7 +525,7 @@ void PipelineCache::RefreshDepthClampRange() {
zmax = vp_d.zmax; zmax = vp_d.zmax;
} }
depth_clamp_is_same_on_all_viewports &= (zmin == vp_d.zmin && zmax == vp_d.zmax); depth_clamp_is_same_on_all_viewports &= (zmin == vp_d.zmin && zmax == vp_d.zmax);
depth_clamp_can_use_viewport_range &= (min_depth == vp_d.zmin && max_depth == vp_d.zmax); depth_clamp_can_use_viewport_range &= (min_depth >= vp_d.zmin && max_depth <= vp_d.zmax);
} }
if (zmin == std::numeric_limits<float>::max()) { if (zmin == std::numeric_limits<float>::max()) {