Module: Mesa Branch: staging/22.0 Commit: 9825f35a5b697055041eb562a3b1631c731e9164 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9825f35a5b697055041eb562a3b1631c731e9164
Author: Marcin Ĺšlusarz <[email protected]> Date: Wed Apr 27 16:05:44 2022 +0200 anv: disable streamout before emitting mesh shading state Fixes tests which use secondary command buffers. Fixes: ef04caea9b8 ("anv: Implement Mesh Shading pipeline") Reviewed-by: Caio Oliveira <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16493> (cherry picked from commit aa1c128b54b31580367d97107660c11cb94e0b98) --- .pick_status.json | 2 +- src/intel/vulkan/genX_pipeline.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 8aa0fba276c..91f03ed2711 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -172,7 +172,7 @@ "description": "anv: disable streamout before emitting mesh shading state", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "because_sha": "ef04caea9b8b98187340fd0ec6550aed06424b60" }, { diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index b8c8a4c0fae..d8d5ca6ee84 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -2876,6 +2876,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);
