diff options
author | Marek Olšák <[email protected]> | 2014-03-09 22:10:27 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-03-11 18:51:20 +0100 |
commit | 958ef47a6dea652d79a676625b69b3dec6042395 (patch) | |
tree | 41396a0b23b482a74cba71f585ac0d88e04feca7 /src/gallium | |
parent | 4f1f32306a5238507af44dde0e3a53820b896930 (diff) |
r600g,radeonsi: don't add streamout.num_dw_for_end twice
It's already added in need_cs_space.
Also don't calculate anything if there are no buffers.
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeon/r600_streamout.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/r600_streamout.c b/src/gallium/drivers/radeon/r600_streamout.c index a556e3ae0e0..d9b1d1c8e5e 100644 --- a/src/gallium/drivers/radeon/r600_streamout.c +++ b/src/gallium/drivers/radeon/r600_streamout.c @@ -79,6 +79,9 @@ void r600_streamout_buffers_dirty(struct r600_common_context *rctx) unsigned num_bufs_appended = util_bitcount(rctx->streamout.enabled_mask & rctx->streamout.append_bitmask); + if (!num_bufs) + return; + rctx->streamout.num_dw_for_end = 12 + /* flush_vgt_streamout */ num_bufs * 8 + /* STRMOUT_BUFFER_UPDATE */ @@ -99,8 +102,7 @@ void r600_streamout_buffers_dirty(struct r600_common_context *rctx) begin->num_dw += num_bufs_appended * 8 + /* STRMOUT_BUFFER_UPDATE */ (num_bufs - num_bufs_appended) * 6 + /* STRMOUT_BUFFER_UPDATE */ - (rctx->family > CHIP_R600 && rctx->family < CHIP_RS780 ? 2 : 0) + /* SURFACE_BASE_UPDATE */ - rctx->streamout.num_dw_for_end; + (rctx->family > CHIP_R600 && rctx->family < CHIP_RS780 ? 2 : 0); /* SURFACE_BASE_UPDATE */ begin->dirty = true; } |