From: Brian Date: Wed, 15 Aug 2007 17:43:14 +0000 (-0600) Subject: comments X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e02b4c7c3c6efc05ead2ffd46b0928f7c9316bf;p=mesa.git comments --- diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h index 5051ebbfc05..4878cb41bdf 100644 --- a/src/mesa/pipe/p_state.h +++ b/src/mesa/pipe/p_state.h @@ -320,23 +320,35 @@ struct pipe_mipmap_tree }; - +/** + * A vertex buffer. Typically, all the vertex data/attributes for + * drawing something will be in one buffer. But it's also possible, for + * example, to put colors in one buffer and texcoords in another. + */ struct pipe_vertex_buffer { - unsigned pitch:11; - unsigned max_index; - struct pipe_buffer_handle *buffer; - unsigned buffer_offset; + unsigned pitch:11; /**< stride to same attrib in next vertex, in bytes */ + unsigned max_index; /**< number of vertices in this buffer */ + unsigned buffer_offset; /**< offset to start of data in buffer, in bytes */ + struct pipe_buffer_handle *buffer; /**< the actual buffer */ }; - +/** + * Information to describe a vertex attribute (position, color, etc) + */ struct pipe_vertex_element { - unsigned src_offset:11; - unsigned vertex_buffer_index:5; + /** Offset of this attribute, in bytes, from the start of the vertex */ + unsigned src_offset:11; + + /** Which vertex_buffer (as given to pipe->set_vertex_buffer()) does + * this attribute live in? + */ + unsigned vertex_buffer_index:5; + unsigned dst_offset:8; - unsigned src_format:8; /* PIPE_FORMAT_* */ + unsigned src_format:8; /**< PIPE_FORMAT_* */ };