diff options
author | Marek Olšák <[email protected]> | 2015-02-01 13:47:01 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-02-04 14:34:13 +0100 |
commit | 658f1d4cfeeea84268715c07f871721df8f1b729 (patch) | |
tree | 27e7471b67267b2c073d3dfb322ea86a35d80d83 /src/gallium | |
parent | b616429ca8ed99f3f891b7b5b362d757856bc5a7 (diff) |
r600g,radeonsi: don't append to streamout buffers that haven't been used yet
The FILLED_SIZE counter is uninitialized at the beginning, so we can't use it.
Instead, use offset = 0, which is what we always do when not appending.
This unexpectedly fixes spec/ARB_texture_multisample/sample-position/*.
Yes, the test does use transform feedback.
Cc: 10.3 10.4 <[email protected]>
Reviewed-by: Glenn Kennard <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_streamout.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index 6224668ea6e..46a6bf30779 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -294,6 +294,7 @@ struct r600_so_target { /* The buffer where BUFFER_FILLED_SIZE is stored. */ struct r600_resource *buf_filled_size; unsigned buf_filled_size_offset; + bool buf_filled_size_valid; unsigned stride_in_dw; }; diff --git a/src/gallium/drivers/radeon/r600_streamout.c b/src/gallium/drivers/radeon/r600_streamout.c index c44f0f2171d..bc8bf97ef89 100644 --- a/src/gallium/drivers/radeon/r600_streamout.c +++ b/src/gallium/drivers/radeon/r600_streamout.c @@ -237,7 +237,7 @@ static void r600_emit_streamout_begin(struct r600_common_context *rctx, struct r } } - if (rctx->streamout.append_bitmask & (1 << i)) { + if (rctx->streamout.append_bitmask & (1 << i) && t[i]->buf_filled_size_valid) { uint64_t va = t[i]->buf_filled_size->gpu_address + t[i]->buf_filled_size_offset; @@ -302,6 +302,8 @@ void r600_emit_streamout_end(struct r600_common_context *rctx) * buffer bound. This ensures that the primitives-emitted query * won't increment. */ r600_write_context_reg(cs, R_028AD0_VGT_STRMOUT_BUFFER_SIZE_0 + 16*i, 0); + + t[i]->buf_filled_size_valid = true; } rctx->streamout.begin_emitted = false; |