From 9689433eee8c1ce397ec49c53d8f7fbafa7940e8 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 28 Jun 2022 17:18:06 +0200 Subject: [PATCH] tu: Update more state with secondaries Some of these are actually bugfixes, some like the drawcall information are just for autotune so they are just performance fixes. However this came from an audit into what state is used in CmdEndRenderPass(). Part-of: --- src/freedreno/vulkan/tu_cmd_buffer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index b4c615680a4..3b45a7a72bb 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -3375,6 +3375,14 @@ tu_CmdExecuteCommands(VkCommandBuffer commandBuffer, } if (secondary->state.disable_gmem) cmd->state.disable_gmem = true; + if (secondary->state.xfb_used) + cmd->state.xfb_used = true; + if (secondary->state.has_prim_generated_query_in_rp) + cmd->state.has_prim_generated_query_in_rp = true; + + cmd->state.drawcall_count += secondary->state.drawcall_count; + cmd->state.drawcall_bandwidth_per_sample_sum += + secondary->state.drawcall_bandwidth_per_sample_sum; cmd->state.draw_cs_writes_to_cond_pred |= secondary->state.draw_cs_writes_to_cond_pred;