summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_cmd_buffer.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-09-14 14:13:30 +0200
committerSamuel Pitoiset <[email protected]>2017-09-20 10:27:32 +0200
commite5b6cdbf451e175e9408cd1fc5f27578a05bf9fb (patch)
tree4d3bce02ce0fc251ff1c24c1b837a217d457a740 /src/amd/vulkan/radv_cmd_buffer.c
parent8c1ccb5394b981e6fbe396ffec427638f391388e (diff)
radv: inline radv_flush_compute_state() into radv_dispatch()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_cmd_buffer.c')
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 7c34af8f3c6..07c16cb4fbd 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -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);