[Mesa-dev] [PATCH] radv: Reset start instance/vertex when changing pipeline.
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Mon Apr 9 14:37:36 UTC 2018
Fixes: ad11fc3571 "radv: don't emit unneeded vertex state."
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105942
---
src/amd/vulkan/radv_cmd_buffer.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index d9f12a351e..dda5cae2c1 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -705,6 +705,11 @@ radv_emit_graphics_pipeline(struct radv_cmd_buffer *cmd_buffer)
if (unlikely(cmd_buffer->device->trace_bo))
radv_save_pipeline(cmd_buffer, pipeline, RING_GFX);
+ /* Reset draw start as different pipelines need the info to be put into different user SGPRs. */
+ cmd_buffer->state.last_first_instance = -1;
+ cmd_buffer->state.last_num_instances = -1;
+ cmd_buffer->state.last_vertex_offset = -1;
+
cmd_buffer->state.emitted_pipeline = pipeline;
cmd_buffer->state.dirty &= ~RADV_CMD_DIRTY_PIPELINE;
--
2.17.0
More information about the mesa-dev
mailing list