aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-09-11 14:50:12 +0200
committerSamuel Pitoiset <[email protected]>2017-09-14 10:37:57 +0200
commit061f5b7d73a975b82e22acfb99883c8f6e954472 (patch)
treea1f54acae3fae17bf8f5cec2138a553466e775c1 /src/amd/vulkan
parentbcf76982113fe24e46d218fc630d70156ecea911 (diff)
radv: add radv_cmd_buffer_after_draw() helper function
To share common code after every draw/compute calls. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 2f030a2d8b5..bf6d157bf9a 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -366,6 +366,12 @@ void radv_cmd_buffer_trace_emit(struct radv_cmd_buffer *cmd_buffer)
}
static void
+radv_cmd_buffer_after_draw(struct radv_cmd_buffer *cmd_buffer)
+{
+ radv_cmd_buffer_trace_emit(cmd_buffer);
+}
+
+static void
radv_save_pipeline(struct radv_cmd_buffer *cmd_buffer,
struct radv_pipeline *pipeline, enum ring_type ring)
{
@@ -2812,7 +2818,7 @@ void radv_CmdDraw(
assert(cmd_buffer->cs->cdw <= cdw_max);
- radv_cmd_buffer_trace_emit(cmd_buffer);
+ radv_cmd_buffer_after_draw(cmd_buffer);
}
@@ -2878,7 +2884,7 @@ void radv_CmdDrawIndexed(
}
assert(cmd_buffer->cs->cdw <= cdw_max);
- radv_cmd_buffer_trace_emit(cmd_buffer);
+ radv_cmd_buffer_after_draw(cmd_buffer);
}
static void
@@ -2963,7 +2969,7 @@ radv_emit_indirect_draw(struct radv_cmd_buffer *cmd_buffer,
radv_cs_emit_indirect_draw_packet(cmd_buffer, indexed, draw_count, count_va, stride);
}
}
- radv_cmd_buffer_trace_emit(cmd_buffer);
+ radv_cmd_buffer_after_draw(cmd_buffer);
}
static void
@@ -3115,7 +3121,7 @@ void radv_CmdDispatch(
radeon_emit(cmd_buffer->cs, 1);
assert(cmd_buffer->cs->cdw <= cdw_max);
- radv_cmd_buffer_trace_emit(cmd_buffer);
+ radv_cmd_buffer_after_draw(cmd_buffer);
}
void radv_CmdDispatchIndirect(
@@ -3168,7 +3174,7 @@ void radv_CmdDispatchIndirect(
}
assert(cmd_buffer->cs->cdw <= cdw_max);
- radv_cmd_buffer_trace_emit(cmd_buffer);
+ radv_cmd_buffer_after_draw(cmd_buffer);
}
void radv_unaligned_dispatch(
@@ -3225,7 +3231,7 @@ void radv_unaligned_dispatch(
S_00B800_PARTIAL_TG_EN(1));
assert(cmd_buffer->cs->cdw <= cdw_max);
- radv_cmd_buffer_trace_emit(cmd_buffer);
+ radv_cmd_buffer_after_draw(cmd_buffer);
}
void radv_CmdEndRenderPass(