[Mesa-dev] Stream output

Zack Rusin zackr at vmware.com
Tue Jun 8 02:09:12 PDT 2010


First of all top posting for make benefit glorious nation of Poland, also won't have access to my email client for the next two weeks.

Correct, this is for stream output/transform feedback as devised on DX10 level hardware. Anything that supports DX10 will support this (there's a CAP for it of course). In general while the state itself is independent from geometry shaders one could make the case that stream output needs it (which is what DX10 api does) or at least makes it a lot simpler (e.g. register_mask which specifies the writemask for the given output can be trivially done in a geometry shader).
I doubt emulation of all of this is very feasible, of course it really depends what the hardware can actually do - if it can write post-vertex-shader any number of output to buffers with writemasks then it might be possible. Otherwise drivers are left with either using draw or just not advertising support for it (PIPE_CAP_STREAM_OUTPUT == 0).

z

________________________________________
From: Corbin Simpson [mostawesomedude at gmail.com]
Sent: Monday, June 07, 2010 2:53 PM
To: Zack Rusin
Cc: mesa-dev at lists.freedesktop.org
Subject: Re: [Mesa-dev] Stream output

On Mon, Jun 7, 2010 at 11:43 AM, Zack Rusin <zackr at vmware.com> wrote:
> Dear friends,
>
> I'm a long lost prince of Nigeria and I'm writing to you with an incredible business offer. I have this gallium-stream-output branch which is worth $10000000 and I'm going to send it your mesa/master account for free! All you have to do is review it (and send me $20 to cover my transaction costs).
>
> In case of a successful completion of this transaction you'll be able to indulge all your senses with a plethora of amazing new words_combined_with_underscores. Some of my personal favorites include:
>
> struct pipe_stream_output_state
> {
>   /**< number of the output buffer to insert each element into */
>   int output_buffer[PIPE_MAX_SHADER_OUTPUTS];
>   /**< which register to grab each output from */
>   int register_index[PIPE_MAX_SHADER_OUTPUTS];
>   /**< TGSI_WRITEMASK signifying which components to output */
>   ubyte register_mask[PIPE_MAX_SHADER_OUTPUTS];
>   /**< number of outputs */
>   int num_outputs;
>
>   /**< stride for an entire vertex, only used if all output_buffers
>    * are 0 */
>   unsigned stride;
> };
>
> which is the main stream output object and
>
> struct p_context {
> ...
>   void * (*create_stream_output_state)(struct pipe_context *,
>                                        const struct pipe_stream_output_state *);
>   void   (*bind_stream_output_state)(struct pipe_context *, void *);
>   void   (*delete_stream_output_state)(struct pipe_context*, void*);
>   void (*set_stream_output_buffers)(struct pipe_context *,
>                                     struct pipe_resource **buffers,
>                                     int *offsets, /*array of offsets
>                                                     from the start of each
>                                                     of the buffers */
>                                     int num_buffers);
> };
>
> There's also a short blurb about the whole thing in the official gallium docs, you can preview it at http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/docs/source/context.rst?h=gallium-stream-out .
> If you have any concerns please let me know.

Ah, hello. I am going to university and working on a project. The
project is in C# and Java but I think that your project is like mine.
I would appreciate very much if you could email me the codes for your
project. My name is Corbin and I am in university. I do have several
questions though.

This is for vert feedback, not render-to-VBO, correct? Do we have a
list of HW that can do it? Is there a trivial way to emulate this on
older HW, or should those chipsets just use Draw?

Thank you very much for the docs. Looks good.

~ C.

--
When the facts change, I change my mind. What do you do, sir? ~ Keynes

Corbin Simpson
<MostAwesomeDude at gmail.com>


More information about the mesa-dev mailing list