summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/draw/draw_private.h
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-23 13:27:18 -0600
committerBrian <[email protected]>2007-08-23 13:27:18 -0600
commitd3eb25c575464bed7dbfc8be4717d85cb2928ec1 (patch)
tree9d0a18cc6c7c7e5c3939066dc6868a867d651fa0 /src/mesa/pipe/draw/draw_private.h
parent690a9de40b20092ae9027dc52d7b26a48995bbff (diff)
Checkpoint commit: i915 texture works, use new vertex_info struct
Basic i915 2D texturing seems to work now. The vertex format is determined from the current fragment shader.
Diffstat (limited to 'src/mesa/pipe/draw/draw_private.h')
-rw-r--r--src/mesa/pipe/draw/draw_private.h34
1 files changed, 4 insertions, 30 deletions
diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h
index 75f7c5d84e6..531bb2e2542 100644
--- a/src/mesa/pipe/draw/draw_private.h
+++ b/src/mesa/pipe/draw/draw_private.h
@@ -44,28 +44,7 @@
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
-
-/* XXX these are temporary */
-struct vf_attr_map {
- unsigned attrib;
- /*
- unsigned format;
- */
- unsigned offset;
-};
-#define VF_ATTRIB_POS 0
-#define VF_ATTRIB_COLOR0 3
-#define VF_ATTRIB_COLOR1 4
-#define VF_ATTRIB_BFC0 25
-#define VF_ATTRIB_BFC1 26
-
-#define VF_ATTRIB_CLIP_POS 27
-#define VF_ATTRIB_VERTEX_HEADER 28
-#define VF_ATTRIB_MAX 29
-#define EMIT_1F 0
-#define EMIT_4F 3
-#define EMIT_4F_VIEWPORT 6
-#define FRAG_ATTRIB_MAX 13
+#include "draw_vertex.h"
/**
@@ -175,14 +154,9 @@ struct draw_context
float plane[12][4];
unsigned nr_planes;
- /*
- * Vertex attribute info
- */
- unsigned vf_attr_to_slot[PIPE_ATTRIB_MAX];
- struct vf_attr_map attrs[VF_ATTRIB_MAX];
- unsigned nr_attrs;
+ /** Describes the layout of post-transformation vertices */
+ struct vertex_info vertex_info;
- unsigned vertex_size; /**< in bytes */
unsigned nr_vertices;
unsigned prim; /**< current prim type: PIPE_PRIM_x */
@@ -250,7 +224,7 @@ dup_vert( struct draw_stage *stage,
unsigned idx )
{
struct vertex_header *tmp = stage->tmp[idx];
- memcpy(tmp, vert, stage->draw->vertex_size );
+ memcpy(tmp, vert, stage->draw->vertex_info.size * sizeof(float) );
return tmp;
}