anv: mask out not applicable state flags when setting up mesh pipeline

Fixes tests matching:
dEQP-VK.pipeline.extended_dynamic_state.cmd_buffer_start.*unused_ms
These tests bind mesh pipeline, immediately after that bind non-mesh
pipeline and expect that binding mesh pipeline was a no-op.

v2: do it in one place & add comment (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16811>
This commit is contained in:
Marcin Ślusarz 2022-06-01 15:48:45 +02:00 committed by Marge Bot
parent 60c82453a1
commit fd132f25ba

View file

@ -2366,6 +2366,19 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline,
}
}
/* When binding a mesh pipeline into a command buffer, it should not affect the
* pre-rasterization bits of legacy graphics pipelines. So remove all the
* pre-rasterization flags from the non-dynamic bits from the mesh pipelines
* here so we don't copy any of that stuff when binding those into a command
* buffer.
*/
if (pipeline->active_stages & VK_SHADER_STAGE_MESH_BIT_NV) {
states &= ~(ANV_CMD_DIRTY_DYNAMIC_VERTEX_INPUT_BINDING_STRIDE |
ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_RESTART_ENABLE |
ANV_CMD_DIRTY_DYNAMIC_PRIMITIVE_TOPOLOGY);
}
pipeline->dynamic_state_mask = states;
}