Module: Mesa
Branch: main
Commit: 9689433eee8c1ce397ec49c53d8f7fbafa7940e8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9689433eee8c1ce397ec49c53d8f7fbafa7940e8

Author: Connor Abbott <[email protected]>
Date:   Tue Jun 28 17:18:06 2022 +0200

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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>

---

 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;

Reply via email to