<div dir="auto">R-b</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 26, 2019, 9:20 AM Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com" target="_blank" rel="noreferrer">samuel.pitoiset@gmail.com</a>><br>
---<br>
src/amd/vulkan/radv_cmd_buffer.c | 34 +++++++++++++++++++++++---------<br>
1 file changed, 25 insertions(+), 9 deletions(-)<br>
<br>
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c<br>
index 61ef19bcaf2..7b3c39217fa 100644<br>
--- a/src/amd/vulkan/radv_cmd_buffer.c<br>
+++ b/src/amd/vulkan/radv_cmd_buffer.c<br>
@@ -2489,21 +2489,21 @@ struct radv_draw_info {<br>
};<br>
<br>
static void<br>
-radv_emit_draw_registers(struct radv_cmd_buffer *cmd_buffer,<br>
- const struct radv_draw_info *draw_info)<br>
+si_emit_ia_multi_vgt_param(struct radv_cmd_buffer *cmd_buffer,<br>
+ bool instanced_draw, bool indirect_draw,<br>
+ bool count_from_stream_output,<br>
+ uint32_t draw_vertex_count)<br>
{<br>
struct radeon_info *info = &cmd_buffer->device->physical_device->rad_info;<br>
struct radv_cmd_state *state = &cmd_buffer->state;<br>
struct radeon_cmdbuf *cs = cmd_buffer->cs;<br>
- uint32_t ia_multi_vgt_param;<br>
- int32_t primitive_reset_en;<br>
+ unsigned ia_multi_vgt_param;<br>
<br>
- /* Draw state. */<br>
ia_multi_vgt_param =<br>
- si_get_ia_multi_vgt_param(cmd_buffer, draw_info->instance_count > 1,<br>
- draw_info->indirect,<br>
- !!draw_info->strmout_buffer,<br>
- draw_info->indirect ? 0 : draw_info->count);<br>
+ si_get_ia_multi_vgt_param(cmd_buffer, instanced_draw,<br>
+ indirect_draw,<br>
+ count_from_stream_output,<br>
+ draw_vertex_count);<br>
<br>
if (state->last_ia_multi_vgt_param != ia_multi_vgt_param) {<br>
if (info->chip_class >= GFX9) {<br>
@@ -2520,6 +2520,22 @@ radv_emit_draw_registers(struct radv_cmd_buffer *cmd_buffer,<br>
}<br>
state->last_ia_multi_vgt_param = ia_multi_vgt_param;<br>
}<br>
+}<br>
+<br>
+static void<br>
+radv_emit_draw_registers(struct radv_cmd_buffer *cmd_buffer,<br>
+ const struct radv_draw_info *draw_info)<br>
+{<br>
+ struct radeon_info *info = &cmd_buffer->device->physical_device->rad_info;<br>
+ struct radv_cmd_state *state = &cmd_buffer->state;<br>
+ struct radeon_cmdbuf *cs = cmd_buffer->cs;<br>
+ int32_t primitive_reset_en;<br>
+<br>
+ /* Draw state. */<br>
+ si_emit_ia_multi_vgt_param(cmd_buffer, draw_info->instance_count > 1,<br>
+ draw_info->indirect,<br>
+ !!draw_info->strmout_buffer,<br>
+ draw_info->indirect ? 0 : draw_info->count);<br>
<br>
/* Primitive restart. */<br>
primitive_reset_en =<br>
-- <br>
2.22.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank" rel="noreferrer">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a></blockquote></div>