From f01594be0ee34758fc62274b9e967a2a4c3595df Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 14 Jun 2012 22:25:50 +0200 Subject: r600g: compute CS space for streamout correctly, add comments SET_CONTEXT_REG was not counted in. Reviewed-by: Alex Deucher --- src/gallium/drivers/r600/r600_hw_context.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index 0fed95c576c..1b1c6f4af65 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -1324,15 +1324,16 @@ void r600_context_streamout_begin(struct r600_context *ctx) ctx->num_cs_dw_streamout_end = 12 + /* flush_vgt_streamout */ - util_bitcount(buffer_en) * 8 + - 3; + util_bitcount(buffer_en) * 8 + /* STRMOUT_BUFFER_UPDATE */ + 3 /* set_streamout_enable(0) */; r600_need_cs_space(ctx, 12 + /* flush_vgt_streamout */ - 6 + /* enables */ - util_bitcount(buffer_en & ctx->streamout_append_bitmask) * 8 + - util_bitcount(buffer_en & ~ctx->streamout_append_bitmask) * 6 + - (ctx->family > CHIP_R600 && ctx->family < CHIP_RV770 ? 2 : 0) + + 6 + /* set_streamout_enable */ + util_bitcount(buffer_en) * 7 + /* SET_CONTEXT_REG */ + util_bitcount(buffer_en & ctx->streamout_append_bitmask) * 8 + /* STRMOUT_BUFFER_UPDATE */ + util_bitcount(buffer_en & ~ctx->streamout_append_bitmask) * 6 + /* STRMOUT_BUFFER_UPDATE */ + (ctx->family > CHIP_R600 && ctx->family < CHIP_RV770 ? 2 : 0) + /* SURFACE_BASE_UPDATE */ ctx->num_cs_dw_streamout_end, TRUE); if (ctx->chip_class >= EVERGREEN) { -- cgit v1.2.3