summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_draw.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2015-10-23 00:45:49 +0800
committerChia-I Wu <[email protected]>2015-10-23 17:29:58 +0800
commit582ecb3b9132ff3690900e5426c982187d640c87 (patch)
tree43ebd68037c0d8dc479945e5d499d4084abff911 /src/gallium/drivers/ilo/ilo_draw.c
parent4a7d18296a9e80d2c5458bf77f8eb88913433c90 (diff)
ilo: add support for scratch spaces
When a kernel reports a non-zero per-thread scratch space size, make sure the hardware state is correctly set up, and a scratch bo is allocated.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_draw.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_draw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_draw.c b/src/gallium/drivers/ilo/ilo_draw.c
index 433348d9326..69f36ae5df6 100644
--- a/src/gallium/drivers/ilo/ilo_draw.c
+++ b/src/gallium/drivers/ilo/ilo_draw.c
@@ -547,6 +547,7 @@ static void
ilo_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
{
struct ilo_context *ilo = ilo_context(pipe);
+ int vs_scratch_size, gs_scratch_size, fs_scratch_size;
if (ilo_debug & ILO_DEBUG_DRAW) {
if (info->indexed) {
@@ -574,8 +575,15 @@ ilo_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
ilo_finalize_3d_states(ilo, info);
+ /* upload kernels */
ilo_shader_cache_upload(ilo->shader_cache, &ilo->cp->builder);
+ /* prepare scratch spaces */
+ ilo_shader_cache_get_max_scratch_sizes(ilo->shader_cache,
+ &vs_scratch_size, &gs_scratch_size, &fs_scratch_size);
+ ilo_render_prepare_scratch_spaces(ilo->render,
+ vs_scratch_size, gs_scratch_size, fs_scratch_size);
+
ilo_blit_resolve_framebuffer(ilo);
/* If draw_vbo ever fails, return immediately. */