Module: Mesa
Branch: master
Commit: 5ef3c2bcef1a9d82a915615ec21c56abbef47fef
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ef3c2bcef1a9d82a915615ec21c56abbef47fef

Author: Bas Nieuwenhuizen <[email protected]>
Date:   Wed Sep 13 00:12:48 2017 +0200

radv: Don't redundantly emit pipelines after secondary cmd buffer.

Reviewed-by: Dave Airlie <[email protected]>

---

 src/amd/vulkan/radv_cmd_buffer.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 5f22733a7d..4ba552ebcb 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2653,16 +2653,17 @@ void radv_CmdExecuteCommands(
                                assert(secondary->ring_offsets_idx == 
primary->ring_offsets_idx);
                }
                primary->device->ws->cs_execute_secondary(primary->cs, 
secondary->cs);
+
+               primary->state.emitted_pipeline = 
secondary->state.emitted_pipeline;
+               primary->state.emitted_compute_pipeline = 
secondary->state.emitted_compute_pipeline;
+               primary->state.last_primitive_reset_en = 
secondary->state.last_primitive_reset_en;
+               primary->state.last_primitive_reset_index = 
secondary->state.last_primitive_reset_index;
        }
 
-       /* if we execute secondary we need to re-emit out pipelines */
+       /* if we execute secondary we need to mark some stuff to reset dirty */
        if (commandBufferCount) {
-               primary->state.emitted_pipeline = NULL;
-               primary->state.emitted_compute_pipeline = NULL;
                primary->state.dirty |= RADV_CMD_DIRTY_PIPELINE;
                primary->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_ALL;
-               primary->state.last_primitive_reset_en = -1;
-               primary->state.last_primitive_reset_index = 0;
                radv_mark_descriptor_sets_dirty(primary);
        }
 }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to