Module: Mesa
Branch: main
Commit: 17e79b044e47656ae82c87e6f1e336d10833c326
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=17e79b044e47656ae82c87e6f1e336d10833c326

Author: Jason Ekstrand <[email protected]>
Date:   Fri Mar 11 14:38:08 2022 -0600

panvk: Skip ZS setup if there is no depth/stencil attachment

Reviewed-by: Boris Brezillon <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15382>

---

 src/panfrost/vulkan/panvk_vX_pipeline.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/panfrost/vulkan/panvk_vX_pipeline.c 
b/src/panfrost/vulkan/panvk_vX_pipeline.c
index de8e7787be3..3c8cd0fe9d6 100644
--- a/src/panfrost/vulkan/panvk_vX_pipeline.c
+++ b/src/panfrost/vulkan/panvk_vX_pipeline.c
@@ -685,6 +685,9 @@ static void
 panvk_pipeline_builder_parse_zs(struct panvk_pipeline_builder *builder,
                                 struct panvk_pipeline *pipeline)
 {
+   if (!builder->use_depth_stencil_attachment)
+      return;
+
    pipeline->zs.z_test = 
builder->create_info.gfx->pDepthStencilState->depthTestEnable;
    pipeline->zs.z_write = 
builder->create_info.gfx->pDepthStencilState->depthWriteEnable;
    pipeline->zs.z_compare_func =

Reply via email to