summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_private.h
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2008-04-12 21:52:46 -0400
committerKeith Whitwell <[email protected]>2008-04-14 11:00:35 +0100
commit3f7a3dd58c0ce2719af83ff1d89a26185d08c04c (patch)
treeefc128ea3e61e6e8ec6d18786590a89761775ffa /src/gallium/auxiliary/draw/draw_private.h
parent808f968f3ad0cb32e86f517753d5715d00e9ec2c (diff)
Make shaders operate on a block of memory instead of arrays of vertex_header's
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_private.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_private.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index 5c710667fc6..1115166192e 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -152,7 +152,7 @@ struct draw_vertex_shader {
struct draw_context *draw,
const unsigned *elts,
unsigned count,
- struct vertex_header *vOut[] );
+ void *out );
void (*delete)( struct draw_vertex_shader * );
@@ -321,10 +321,8 @@ struct draw_context
/* Vertex shader queue:
*/
struct {
- struct {
- unsigned elt; /**< index into the user's vertex arrays */
- struct vertex_header *vertex;
- } queue[VS_QUEUE_LENGTH];
+ unsigned elts[VS_QUEUE_LENGTH]; /**< index into the user's vertex arrays */
+ char *vertex_cache;
unsigned queue_nr;
unsigned post_nr;
} vs;
@@ -450,4 +448,11 @@ dot4(const float *a, const float *b)
return result;
}
+static INLINE struct vertex_header *
+draw_header_from_block(char *block, int num)
+{
+ static const unsigned size = (MAX_VERTEX_SIZE + 0x0f) & ~0x0f;
+ return (struct vertex_header*)(block + num * size);
+}
+
#endif /* DRAW_PRIVATE_H */