diff options
author | Marek Olšák <[email protected]> | 2016-07-29 16:33:50 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-08-06 13:56:14 +0200 |
commit | c56ecb68e75dedf0ca97dddf80fd1c318ab0986b (patch) | |
tree | 1e28cf2b5bd96b6b7e765077f6acb5d5fc21177a /src/gallium | |
parent | ed2254d1573aa0d2b42455b7d3477f7edee563af (diff) |
radeonsi: take scratch buffer and draw indirect memory usage into account
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_draw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 30b644ee42b..e4af4c7bd70 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -989,6 +989,12 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) if (sctx->b.flags) si_mark_atom_dirty(sctx, sctx->atoms.s.cache_flush); + /* Add buffer sizes for memory checking in need_cs_space. */ + if (sctx->emit_scratch_reloc && sctx->scratch_buffer) + r600_context_add_resource_size(ctx, &sctx->scratch_buffer->b.b); + if (info->indirect) + r600_context_add_resource_size(ctx, info->indirect); + si_need_cs_space(sctx); /* Emit states. */ |