[Mesa-dev] draw_stream_output seems to be broken by design

Zack Rusin zackr at vmware.com
Mon Sep 20 14:37:01 PDT 2010


On Monday 20 September 2010 15:21:40 Luca Barbieri wrote:
> >> 2. How do you pass to Gallium the id parameter to DrawTransformFeedback?
> > 
> > You bind the buffer with the given id before issuing draw_stream_output.
> 
> Bind to what?

As the vbo.

> Note that the id parameter to DrawTransformFeedback is _not_ the place
> to write to stream output to, but the place to take the count of
> primitives to draw from.

Which is size of the buffer / pipe_stream_output_state::num_outputs.

> >> 3. How do you handle pause/resume in ARB_transform_feedback2? (it must
> >> _not_ reset the count)
> > 
> > You just append to the buffer.
> > You do not append to the buffer =)
> 
> OK, but how do you tell the GPU to start writing from 0 and reset the
> count in some cases, and to append and not reset the count in the
> others?

SO will always append and if the state tracker wants a reset it should simply 
create a new pipe_resource and use that.

> > The question is "how much data is in this pipe_buffer" so you hold that
> > in the pipe_buffer itself.
> 
> No, the question is "how many primitives were streamed out when that
> transform feedback object was bound to GL and not paused between the
> last Begin and End GL calls?".

No, that's a question that's asked by a query and it should stay in the query.
 
> Anyway, trying to implement ARB_transform_feedback2 (or, better,
> ARB_transform_feedback3) will quickly show the requirements for the
> Gallium interface.

Cool, then lets worry about it when we'll be crossing that bridge.

z


More information about the mesa-dev mailing list