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 <zackr@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Zack Rusin
2014-03-06 18:43:44 -05:00
parent 7d5903980e
commit dfa25ea5cd
29 changed files with 88 additions and 64 deletions

View File

@@ -182,10 +182,11 @@ discussed above.
use pipe_so_target_reference instead.
* ``set_stream_output_targets`` binds stream output targets. The parameter
append_bitmask is a bitmask, where the i-th bit specifies whether new
primitives should be appended to the i-th buffer (writing starts at
the internal offset), or whether writing should start at the beginning
(the internal offset is effectively set to 0).
offset is an array which specifies the internal offset of the buffer. The
internal offset is, besides writing, used for reading the data during the
draw_auto stage, i.e. it specifies how much data there is in the buffer
for the purposes of the draw_auto stage. -1 means the buffer should
be appended to, and everything else sets the internal offset.
NOTE: The currently-bound vertex or geometry shader must be compiled with
the properly-filled-in structure pipe_stream_output_info describing which