anv: disable streamout before emitting mesh shading state
authorMarcin Ślusarz <marcin.slusarz@intel.com>
Wed, 27 Apr 2022 14:05:44 +0000 (16:05 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 13 May 2022 09:43:02 +0000 (09:43 +0000)
Fixes tests which use secondary command buffers.

Fixes: ef04caea9b8 ("anv: Implement Mesh Shading pipeline")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16493>

src/intel/vulkan/genX_pipeline.c

index 97df60e..f8d3c16 100644 (file)
@@ -2807,6 +2807,12 @@ genX(graphics_pipeline_create)(
 #endif
    } else {
       assert(anv_pipeline_is_mesh(pipeline));
+
+      /* BSpec 46303 forbids both 3DSTATE_MESH_CONTROL.MeshShaderEnable
+       * and 3DSTATE_STREAMOUT.SOFunctionEnable to be 1.
+       */
+      anv_batch_emit(&pipeline->base.batch, GENX(3DSTATE_STREAMOUT), so) {}
+
 #if GFX_VERx10 >= 125
       emit_task_state(pipeline);
       emit_mesh_state(pipeline);