summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-10-16 14:15:54 +0200
committerSamuel Pitoiset <[email protected]>2017-10-16 14:50:27 +0200
commit47d7d1861399563900d1f0ca31b06690f33049a1 (patch)
treed8f4fcd838c69cc8efa63aed925c208c85035e22 /src
parentb253f3189ac6440103ae70784030a577f36100a5 (diff)
radv: be smarter with the draw packets when executing secondary buffers
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 64e7e2637b9..2252d80e11e 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2669,8 +2669,16 @@ void radv_CmdExecuteCommands(
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;
+ /* Only re-emit the draw packets when needed. */
+ if (secondary->state.last_primitive_reset_en != -1) {
+ primary->state.last_primitive_reset_en =
+ secondary->state.last_primitive_reset_en;
+ }
+
+ if (secondary->state.last_primitive_reset_index) {
+ primary->state.last_primitive_reset_index =
+ secondary->state.last_primitive_reset_index;
+ }
}
/* After executing commands from secondary buffers we have to dirty