[Mesa-dev] [PATCH 03/15] radv: add radv_cmd_buffer_after_draw() helper function
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue Sep 12 10:35:40 UTC 2017
To share common code after every draw/compute calls.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_cmd_buffer.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 9b6c8c6106..22d8adc5c8 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -364,6 +364,12 @@ void radv_cmd_buffer_trace_emit(struct radv_cmd_buffer *cmd_buffer)
radeon_emit(cs, AC_ENCODE_TRACE_POINT(cmd_buffer->state.trace_id));
}
+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)
@@ -2774,7 +2780,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);
}
@@ -2840,7 +2846,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
@@ -2925,7 +2931,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
@@ -3077,7 +3083,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(
@@ -3130,7 +3136,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(
@@ -3187,7 +3193,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(
--
2.14.1
More information about the mesa-dev
mailing list