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

Author: Matt Coster <[email protected]>
Date:   Tue May 16 09:37:46 2023 +0100

pvr: Reorder execution in pvr_cmd_buffer_end_sub_cmd()

This allows sub_cmd->job.run_frag to be setup before calling
pvr_sub_cmd_gfx_requires_split_submit().

Signed-off-by: Matt Coster <[email protected]>
Reported-by: James Glanville <[email protected]>
Reviewed-by: Karmjit Mahil <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23125>

---

 src/imagination/vulkan/pvr_cmd_buffer.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/imagination/vulkan/pvr_cmd_buffer.c 
b/src/imagination/vulkan/pvr_cmd_buffer.c
index 4801de4fefe..37ca9e7e332 100644
--- a/src/imagination/vulkan/pvr_cmd_buffer.c
+++ b/src/imagination/vulkan/pvr_cmd_buffer.c
@@ -1786,14 +1786,6 @@ VkResult pvr_cmd_buffer_end_sub_cmd(struct 
pvr_cmd_buffer *cmd_buffer)
       if (result != VK_SUCCESS)
          return pvr_cmd_buffer_set_error_unwarned(cmd_buffer, result);
 
-      if (pvr_sub_cmd_gfx_requires_split_submit(gfx_sub_cmd)) {
-         result = pvr_sub_cmd_gfx_build_terminate_ctrl_stream(device,
-                                                              cmd_buffer,
-                                                              gfx_sub_cmd);
-         if (result != VK_SUCCESS)
-            return pvr_cmd_buffer_set_error_unwarned(cmd_buffer, result);
-      }
-
       result = pvr_cmd_buffer_emit_ppp_state(cmd_buffer,
                                              &gfx_sub_cmd->control_stream);
       if (result != VK_SUCCESS)
@@ -1809,6 +1801,14 @@ VkResult pvr_cmd_buffer_end_sub_cmd(struct 
pvr_cmd_buffer *cmd_buffer)
       if (result != VK_SUCCESS)
          return pvr_cmd_buffer_set_error_unwarned(cmd_buffer, result);
 
+      if (pvr_sub_cmd_gfx_requires_split_submit(gfx_sub_cmd)) {
+         result = pvr_sub_cmd_gfx_build_terminate_ctrl_stream(device,
+                                                              cmd_buffer,
+                                                              gfx_sub_cmd);
+         if (result != VK_SUCCESS)
+            return pvr_cmd_buffer_set_error_unwarned(cmd_buffer, result);
+      }
+
       break;
    }
 

Reply via email to