summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/draw/draw_private.h
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-08 17:07:12 -0700
committerBrian <[email protected]>2007-11-08 17:07:12 -0700
commit64469863212dcc41995c473032856096c4af12b3 (patch)
tree9b8ff1218b90fbeb3f056cf1713537dddb731c94 /src/mesa/pipe/draw/draw_private.h
parent990fe4c0bf735206c3cc7346d84adc782595bc3a (diff)
Reorganize user-space vertex fields in draw_context into 'user' group.
This sub-struct collects the incoming user-provided data/pointers in one place. Ex: draw->mapped_vbuffer becomes draw->user.vbuffer, etc.
Diffstat (limited to 'src/mesa/pipe/draw/draw_private.h')
-rw-r--r--src/mesa/pipe/draw/draw_private.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h
index 89d292901e9..03b48aa93ce 100644
--- a/src/mesa/pipe/draw/draw_private.h
+++ b/src/mesa/pipe/draw/draw_private.h
@@ -178,17 +178,23 @@ struct draw_context
struct pipe_vertex_buffer feedback_buffer[PIPE_ATTRIB_MAX];
struct pipe_vertex_element feedback_element[PIPE_ATTRIB_MAX];
- /** The mapped vertex element/index buffer */
- const void *mapped_elts;
- unsigned eltSize; /**< bytes per index (0, 1, 2 or 4) */
- /** The mapped vertex arrays */
- const void *mapped_vbuffer[PIPE_ATTRIB_MAX];
- /** The mapped constant buffers (for vertex shader) */
- const void *mapped_constants;
-
- /** The mapped vertex element/index buffer */
- void *mapped_feedback_buffer[PIPE_MAX_FEEDBACK_ATTRIBS];
- uint mapped_feedback_buffer_size[PIPE_MAX_FEEDBACK_ATTRIBS]; /* in bytes */
+ /* user-space vertex data, buffers */
+ struct {
+ /** vertex element/index buffer (ex: glDrawElements) */
+ const void *elts;
+ /** bytes per index (0, 1, 2 or 4) */
+ unsigned eltSize;
+
+ /** vertex arrays */
+ const void *vbuffer[PIPE_ATTRIB_MAX];
+
+ /** constant buffer (for vertex shader) */
+ const void *constants;
+
+ /** The vertex feedback buffer */
+ void *feedback_buffer[PIPE_MAX_FEEDBACK_ATTRIBS];
+ uint feedback_buffer_size[PIPE_MAX_FEEDBACK_ATTRIBS]; /* in bytes */
+ } user;
/* Clip derived state:
*/
@@ -216,6 +222,7 @@ struct draw_context
struct vertex_header *vertex[VCACHE_SIZE + VCACHE_OVERFLOW];
unsigned overflow;
+ /** To find space in the vertex cache: */
struct vertex_header *(*get_vertex)( struct draw_context *draw,
unsigned i );
} vcache;
@@ -233,7 +240,6 @@ struct draw_context
/* Prim pipeline queue:
*/
struct {
-
/* Need to queue up primitives until their vertices have been
* transformed by a vs queue flush.
*/