summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Ĺšlusarz <marcin.slusarz@intel.com>2022-06-01 15:48:45 +0200
committerMarge Bot <emma+marge@anholt.net>2022-06-01 14:13:54 +0000
commitfd132f25bafedd9c59f62add848186ff40a3fa2d (patch)
tree7df03c2bad0238099458f2572de7e03fa47507e6
parent60c82453a1a32e7fad2a3f3bd3231e5752a2bbe6 (diff)
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>
-rw-r--r--src/intel/vulkan/anv_pipeline.c13
1 files changed, 13 insertions, 0 deletions
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;
}