diff options
author | Zack Rusin <[email protected]> | 2014-03-06 18:43:44 -0500 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2014-03-07 12:49:33 -0500 |
commit | dfa25ea5cd19d5a050a1c94bd7370a2259b9f007 (patch) | |
tree | 8ce2db3ceab01311df710c2d7f307f5b708312c5 /src/gallium/drivers/nouveau/nv50/nv50_state.c | |
parent | 7d5903980ed7c4405e20dbc4f5ade9d202c559cb (diff) |
gallium: allow setting of the internal stream output offset
D3D10 allows setting of the internal offset of a buffer, which is
in general only incremented via actual stream output writes. By
allowing setting of the internal offset draw_auto is capable
of rendering from buffers which have not been actually streamed
out to. Our interface didn't allow. This change functionally
shouldn't make any difference to OpenGL where instead of an
append_bitmask you just get a real array where -1 means append
(like in D3D) and 0 means do not append.
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_state.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_state.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state.c b/src/gallium/drivers/nouveau/nv50/nv50_state.c index c03d72922a9..862636b9a78 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_state.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_state.c @@ -1055,7 +1055,7 @@ static void nv50_set_stream_output_targets(struct pipe_context *pipe, unsigned num_targets, struct pipe_stream_output_target **targets, - unsigned append_mask) + const unsigned *offsets) { struct nv50_context *nv50 = nv50_context(pipe); unsigned i; @@ -1066,7 +1066,8 @@ nv50_set_stream_output_targets(struct pipe_context *pipe, for (i = 0; i < num_targets; ++i) { const boolean changed = nv50->so_target[i] != targets[i]; - if (!changed && (append_mask & (1 << i))) + const boolean append = (offsets[i] == (unsigned)-1); + if (!changed && append) continue; nv50->so_targets_dirty |= 1 << i; @@ -1075,7 +1076,7 @@ nv50_set_stream_output_targets(struct pipe_context *pipe, serialize = FALSE; } - if (targets[i] && !(append_mask & (1 << i))) + if (targets[i] && !append) nv50_so_target(targets[i])->clean = TRUE; pipe_so_target_reference(&nv50->so_target[i], targets[i]); |