[Mesa-dev] [PATCH 3/4] radv: inline radv_flush_compute_state() into radv_dispatch()

Samuel Pitoiset samuel.pitoiset at gmail.com
Thu Sep 14 16:50:06 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/vulkan/radv_cmd_buffer.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 143acf1719..10a071c3d6 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -3124,16 +3124,6 @@ void radv_CmdDrawIndexedIndirectCountAMD(
 	                                     maxDrawCount, stride);
 }
 
-static void
-radv_flush_compute_state(struct radv_cmd_buffer *cmd_buffer)
-{
-	radv_emit_compute_pipeline(cmd_buffer);
-	radv_flush_descriptors(cmd_buffer, VK_SHADER_STAGE_COMPUTE_BIT);
-	radv_flush_constants(cmd_buffer, cmd_buffer->state.compute_pipeline,
-			     VK_SHADER_STAGE_COMPUTE_BIT);
-	si_emit_cache_flush(cmd_buffer);
-}
-
 struct radv_dispatch_info {
 	/**
 	 * Determine the layout of the grid (in block units) to be used.
@@ -3272,7 +3262,13 @@ static void
 radv_dispatch(struct radv_cmd_buffer *cmd_buffer,
 	      const struct radv_dispatch_info *info)
 {
-	radv_flush_compute_state(cmd_buffer);
+	radv_emit_compute_pipeline(cmd_buffer);
+
+	radv_flush_descriptors(cmd_buffer, VK_SHADER_STAGE_COMPUTE_BIT);
+	radv_flush_constants(cmd_buffer, cmd_buffer->state.compute_pipeline,
+			     VK_SHADER_STAGE_COMPUTE_BIT);
+
+	si_emit_cache_flush(cmd_buffer);
 
 	radv_emit_dispatch_packets(cmd_buffer, info);
 
-- 
2.14.1



More information about the mesa-dev mailing list