zink: fix-ish depth clipping without VK_EXT_depth_clip_enable
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 24 Jun 2022 16:01:06 +0000 (12:01 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 24 Jun 2022 19:54:44 +0000 (19:54 +0000)
if this extension is unsupported, use the previous behavior and hope for the best

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17237>

src/gallium/drivers/zink/zink_pipeline.c

index a4f78b4..6c561a0 100644 (file)
@@ -191,6 +191,7 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
    } else {
       static bool warned = false;
       warn_missing_feature(warned, "VK_EXT_depth_clip_enable");
+      rast_state.depthClampEnable = !hw_rast_state->depth_clip;
    }
 
    VkPipelineRasterizationProvokingVertexStateCreateInfoEXT pv_state;