[Mesa-dev] Stream output

Zack Rusin zackr at vmware.com
Mon Jun 7 11:43:21 PDT 2010


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.

z


More information about the mesa-dev mailing list