Mesa (staging/19.3): anv: Re-emit all compute state on pipeline switch

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Dec 10 17:54:30 UTC 2019


Module: Mesa
Branch: staging/19.3
Commit: c5e203ff501511af27ee301249ec93729b4cce63
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5e203ff501511af27ee301249ec93729b4cce63

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Dec  6 18:26:59 2019 -0600

anv: Re-emit all compute state on pipeline switch

It's a very odd case to hit in the real world.  However, there are some
CTS tests which switch back and forth between dispatch and clear without
changing the pipeline.

Fixes: bc612536eb2f "anv: Emit a dummy MEDIA_VFE_STATE before switching..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
(cherry picked from commit 0f60aa4037dfb6aa86d5b9524fe649f13b2b8825)

---

 src/intel/vulkan/genX_cmd_buffer.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index cfffe30aa9b..8e696cbd651 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -3893,6 +3893,13 @@ genX(flush_pipeline_select)(struct anv_cmd_buffer *cmd_buffer,
          vfe.NumberofURBEntries     = 2;
          vfe.URBEntryAllocationSize = 2;
       }
+
+      /* We just emitted a dummy MEDIA_VFE_STATE so now that packet is
+       * invalid. Set the compute pipeline to dirty to force a re-emit of the
+       * pipeline in case we get back-to-back dispatch calls with the same
+       * pipeline and a PIPELINE_SELECT in between.
+       */
+      cmd_buffer->state.compute.pipeline_dirty = true;
    }
 #endif
 




More information about the mesa-commit mailing list