Mesa (main): panvk: A pipeline might not be bound when the render pass is ended

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 27 13:54:44 UTC 2021


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

Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date:   Thu Jul  8 15:48:42 2021 +0200

panvk: A pipeline might not be bound when the render pass is ended

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12019>

---

 src/panfrost/vulkan/panvk_cmd_buffer.c | 10 +++++-----
 src/panfrost/vulkan/panvk_cs.c         |  1 -
 src/panfrost/vulkan/panvk_cs.h         |  1 -
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/panfrost/vulkan/panvk_cmd_buffer.c b/src/panfrost/vulkan/panvk_cmd_buffer.c
index bbbe3c4d1fc..b04691702aa 100644
--- a/src/panfrost/vulkan/panvk_cmd_buffer.c
+++ b/src/panfrost/vulkan/panvk_cmd_buffer.c
@@ -807,10 +807,11 @@ panvk_cmd_close_batch(struct panvk_cmd_buffer *cmdbuf)
 
    list_addtail(&cmdbuf->state.batch->node, &cmdbuf->batches);
 
-   struct pan_tls_info tlsinfo = {
-      .tls.size = cmdbuf->state.pipeline->tls_size,
-      .wls.size = cmdbuf->state.pipeline->wls_size,
-   };
+   struct pan_tls_info tlsinfo = {};
+   if (cmdbuf->state.pipeline) {
+      tlsinfo.tls.size = cmdbuf->state.pipeline->tls_size;
+      tlsinfo.wls.size = cmdbuf->state.pipeline->wls_size;
+   }
 
    if (tlsinfo.tls.size) {
       tlsinfo.tls.ptr =
@@ -850,7 +851,6 @@ panvk_cmd_close_batch(struct panvk_cmd_buffer *cmdbuf)
          panvk_emit_fb(cmdbuf->device,
                        cmdbuf->state.batch,
                        cmdbuf->state.subpass,
-                       cmdbuf->state.pipeline,
                        cmdbuf->state.framebuffer,
                        cmdbuf->state.clear,
                        &tlsinfo, &cmdbuf->state.batch->tiler.ctx,
diff --git a/src/panfrost/vulkan/panvk_cs.c b/src/panfrost/vulkan/panvk_cs.c
index 5e9fe448522..b24cba8d3c8 100644
--- a/src/panfrost/vulkan/panvk_cs.c
+++ b/src/panfrost/vulkan/panvk_cs.c
@@ -788,7 +788,6 @@ unsigned
 panvk_emit_fb(const struct panvk_device *dev,
               const struct panvk_batch *batch,
               const struct panvk_subpass *subpass,
-              const struct panvk_pipeline *pipeline,
               const struct panvk_framebuffer *fb,
               const struct panvk_clear_value *clears,
               const struct pan_tls_info *tlsinfo,
diff --git a/src/panfrost/vulkan/panvk_cs.h b/src/panfrost/vulkan/panvk_cs.h
index 5bd03883b3f..79a9eac541c 100644
--- a/src/panfrost/vulkan/panvk_cs.h
+++ b/src/panfrost/vulkan/panvk_cs.h
@@ -139,7 +139,6 @@ unsigned
 panvk_emit_fb(const struct panvk_device *dev,
               const struct panvk_batch *batch,
               const struct panvk_subpass *subpass,
-              const struct panvk_pipeline *pipeline,
               const struct panvk_framebuffer *fb,
               const struct panvk_clear_value *clears,
               const struct pan_tls_info *tlsinfo,



More information about the mesa-commit mailing list