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

Zack Rusin zackr at vmware.com
Mon Sep 20 11:28:58 PDT 2010

On Monday 20 September 2010 13:50:43 Luca Barbieri wrote:
> > No, you don't store it at all. Storing it in the client side data
> > structures implies fetching.
> Well, of course you don't store it in the client data structure.
> In the driver-specific part of the data structures, you store some
> kind of reference to the GPU-side object where you instruct the GPU to
> put the count.
> In softpipe instead you indeed store the value itself, obviously.
> The problem is:
> 1. In which data structure do you store that handle? pipe_context is
> good enough for D3D10, but not for ARB_transform_feedback2, where the
> stream output CSO is the natural place

The question is "how much data is in this pipe_buffer" so you hold that in the 
pipe_buffer itself.

> 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.

> 3. How do you handle pause/resume in ARB_transform_feedback2? (it must
> _not_ reset the count)

You just append to the buffer.

> 4. How do you handle begin/end in ARB_transform_feedback2? (it must
> reset the count)

You do not append to the buffer =)

> 5. How do you handle multiple transform feedback objects pointing to
> the same buffer(s)? (i.e. don't associate the count to the vertex
> buffer)

You hold the size of the buffer in the buffer and different so objects do 
whatever they want (append, rewrite,...)


More information about the mesa-dev mailing list