diff options
author | Marek Olšák <[email protected]> | 2013-02-26 17:20:25 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-03-01 13:46:32 +0100 |
commit | 6f25de6711491bbcfc906cd8804f30acc6534b2d (patch) | |
tree | 134c428c9c15525f01187ebdffb5ee51d572587d /src/gallium/drivers/r600/r600_buffer.c | |
parent | 9dd18f43a4db73be73dfbf2e9950ae4dfaf6322e (diff) |
r600g: atomize streamout enabling
This doesn't fix any issue we know of, but there indeed is a week spot
in draw_vbo where streamout can fail. After streamout is enabled,
the need_cs_space call can flush the context, which causes the streamout
to be disabled right after it was enabled and bad things happen.
One way to fix it is to atomize the beginning part, so that no context flush
can happen between streamout enabling and the first drawing.
Tested-by: Andreas Boll <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_buffer.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_buffer.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c index 89740359be0..3267c37cc6d 100644 --- a/src/gallium/drivers/r600/r600_buffer.c +++ b/src/gallium/drivers/r600/r600_buffer.c @@ -126,11 +126,13 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx, } } /* Streamout buffers. */ - for (i = 0; i < rctx->num_so_targets; i++) { - if (rctx->so_targets[i]->b.buffer == &rbuffer->b.b) { - r600_context_streamout_end(rctx); - rctx->streamout_start = TRUE; - rctx->streamout_append_bitmask = ~0; + for (i = 0; i < rctx->streamout.num_targets; i++) { + if (rctx->streamout.targets[i]->b.buffer == &rbuffer->b.b) { + if (rctx->streamout.begin_emitted) { + r600_emit_streamout_end(rctx); + } + rctx->streamout.append_bitmask = rctx->streamout.enabled_mask; + r600_streamout_buffers_dirty(rctx); } } /* Constant buffers. */ |