summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_render.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-10-29 09:57:01 +0800
committerChia-I Wu <[email protected]>2014-11-06 10:43:53 +0800
commita1a701877a3160f7e076c3d62565c08cbf32e920 (patch)
treec63fe505298952f870a569fa0014e09fb0edb4c5 /src/gallium/drivers/ilo/ilo_render.c
parent9dd596c99f009258b964704f53ab97458a1ef733 (diff)
ilo: add ilo_render_emit_launch_grid()
ilo_render_emit_launch_grid() emits all the hardware states needed for a launch_grid() call. Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_render.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_render.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_render.c b/src/gallium/drivers/ilo/ilo_render.c
index 945d4cdb5aa..00b57b808ad 100644
--- a/src/gallium/drivers/ilo/ilo_render.c
+++ b/src/gallium/drivers/ilo/ilo_render.c
@@ -456,3 +456,42 @@ ilo_render_emit_draw(struct ilo_render *render,
draw_session_end(render, vec, &session);
}
+
+int
+ilo_render_get_launch_grid_len(const struct ilo_render *render,
+ const struct ilo_state_vector *vec)
+{
+ ILO_DEV_ASSERT(render->dev, 7, 7.5);
+
+ return ilo_render_get_launch_grid_surface_states_len(render, vec) +
+ ilo_render_get_launch_grid_dynamic_states_len(render, vec) +
+ ilo_render_get_launch_grid_commands_len(render, vec);
+}
+
+void
+ilo_render_emit_launch_grid(struct ilo_render *render,
+ const struct ilo_state_vector *vec,
+ const unsigned thread_group_offset[3],
+ const unsigned thread_group_dim[3],
+ unsigned thread_group_size,
+ const struct pipe_constant_buffer *input,
+ uint32_t pc)
+{
+ struct ilo_render_launch_grid_session session;
+
+ ILO_DEV_ASSERT(render->dev, 7, 7.5);
+
+ assert(input->buffer);
+
+ memset(&session, 0, sizeof(session));
+
+ session.thread_group_offset = thread_group_offset;
+ session.thread_group_dim = thread_group_dim;
+ session.thread_group_size = thread_group_size;
+ session.input = input;
+ session.pc = pc;
+
+ ilo_render_emit_launch_grid_surface_states(render, vec, &session);
+ ilo_render_emit_launch_grid_dynamic_states(render, vec, &session);
+ ilo_render_emit_launch_grid_commands(render, vec, &session);
+}