radv: inline radv_flush_compute_state() into radv_dispatch()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 14 Sep 2017 12:13:30 +0000 (14:13 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 20 Sep 2017 08:27:32 +0000 (10:27 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c

index 7c34af8f3c6d9baaab350fc7e3123dcb0a532ee1..07c16cb4fbd6ba4de41c8dddffe1df4c86210311 100644 (file)
@@ -3126,16 +3126,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.
@@ -3274,7 +3264,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);