[Mesa-dev] [PATCH 3/4] radv: be smarter with the primitive restart when executing secondary buffers
Samuel Pitoiset
samuel.pitoiset at gmail.com
Wed Oct 11 14:25:59 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_cmd_buffer.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index f6f9847a14..366789decb 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2678,7 +2678,12 @@ void radv_CmdExecuteCommands(
secondary->state.emitted_compute_pipeline;
}
- primary->state.last_primitive_reset_en = secondary->state.last_primitive_reset_en;
+ /* Only re-emit the primitive restart packets when needed. */
+ if (secondary->state.last_primitive_reset_en != -1) {
+ primary->state.last_primitive_reset_en =
+ secondary->state.last_primitive_reset_en;
+ }
+
primary->state.last_primitive_reset_index = secondary->state.last_primitive_reset_index;
primary->state.last_ia_multi_vgt_param = secondary->state.last_ia_multi_vgt_param;
}
--
2.14.2
More information about the mesa-dev
mailing list