diff options
author | Marek Olšák <[email protected]> | 2012-07-18 18:33:37 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-07-18 22:42:58 +0200 |
commit | c3c83af380d703cdc24475bd39baa1722c333b44 (patch) | |
tree | cea9b2bdf08f2e7ed8219f97a34d2aa4482b03e6 /src | |
parent | a40c1f95229915214be061fbbf9a02e5225fbf01 (diff) |
r600g: setup streamout before calling last r600_need_cs_space before drawing
This fixes CS checker errors due to registers not being initialized, because
the flush occured after dirty state was emitted but before drawing.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 2c95878ef25..f91f2654f58 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -1069,6 +1069,12 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo) r600_context_pipe_state_set(rctx, &rctx->vgt); + /* Enable stream out if needed. */ + if (rctx->streamout_start) { + r600_context_streamout_begin(rctx); + rctx->streamout_start = FALSE; + } + /* Emit states (the function expects that we emit at most 17 dwords here). */ r600_need_cs_space(rctx, 0, TRUE); @@ -1080,12 +1086,6 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo) } rctx->pm4_dirty_cdwords = 0; - /* Enable stream out if needed. */ - if (rctx->streamout_start) { - r600_context_streamout_begin(rctx); - rctx->streamout_start = FALSE; - } - /* draw packet */ cs->buf[cs->cdw++] = PKT3(PKT3_NUM_INSTANCES, 0, rctx->predicate_drawing); cs->buf[cs->cdw++] = info.instance_count; |