Mesa (main): anv: mask out not applicable state flags when setting up mesh pipeline
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 1 14:35:58 UTC 2022
Module: Mesa
Branch: main
Commit: fd132f25bafedd9c59f62add848186ff40a3fa2d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fd132f25bafedd9c59f62add848186ff40a3fa2d
Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date: Wed Jun 1 15:48:45 2022 +0200
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 at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16811>
---
src/intel/vulkan/anv_pipeline.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index cd59946a1ba..1c7f8b05804 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -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;
}
More information about the mesa-commit
mailing list