summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-20 17:02:07 -0600
committerBrian <[email protected]>2007-08-20 17:02:07 -0600
commit766fa51537dabd978eb04fb4c3f29b5dfeacd9fb (patch)
treebcbfb6090a535adb11154b1e928941a274a4d246
parentddf8ba2d1b4f85498613f7ace1ffda70bb9d9e92 (diff)
remove some of the #ifndef MESA stuff
-rw-r--r--src/mesa/pipe/draw/draw_arrays.c7
-rw-r--r--src/mesa/pipe/draw/draw_prim.c8
-rw-r--r--src/mesa/pipe/draw/draw_private.h16
-rw-r--r--src/mesa/pipe/softpipe/sp_prim_setup.c4
4 files changed, 20 insertions, 15 deletions
diff --git a/src/mesa/pipe/draw/draw_arrays.c b/src/mesa/pipe/draw/draw_arrays.c
index 8cb34e8f8ed..17ed255f85a 100644
--- a/src/mesa/pipe/draw/draw_arrays.c
+++ b/src/mesa/pipe/draw/draw_arrays.c
@@ -45,6 +45,11 @@
#include "pipe/tgsi/core/tgsi_util.h"
+/** XXX remove */
+#define VERT_RESULT_HPOS 0
+#define VERT_RESULT_MAX 24
+
+
#if defined __GNUC__
#define ALIGN16_DECL(TYPE, NAME, SIZE) TYPE NAME[SIZE] __attribute__(( aligned( 16 ) ))
#define ALIGN16_ASSIGN(P) P
@@ -348,7 +353,7 @@ do { \
if (draw->nr_attrs >= 2) \
draw->vf_attr_to_slot[VF_ATTR] = draw->nr_attrs - 2; \
draw->attrs[draw->nr_attrs].attrib = VF_ATTR; \
- draw->attrs[draw->nr_attrs].format = STYLE; \
+ /*draw->attrs[draw->nr_attrs].format = STYLE*/; \
draw->nr_attrs++; \
draw->vertex_size += SIZE; \
} while (0)
diff --git a/src/mesa/pipe/draw/draw_prim.c b/src/mesa/pipe/draw/draw_prim.c
index fbd0672875f..d296780fd75 100644
--- a/src/mesa/pipe/draw/draw_prim.c
+++ b/src/mesa/pipe/draw/draw_prim.c
@@ -167,7 +167,7 @@ static struct vertex_header *get_vertex( struct draw_context *draw,
static struct vertex_header *get_uint_elt_vertex( struct draw_context *draw,
unsigned i )
{
- const unsigned *elts = (const unsigned *)draw->elts;
+ const unsigned *elts = (const unsigned *) draw->mapped_elts;
return get_vertex( draw, elts[i] );
}
@@ -175,7 +175,7 @@ static struct vertex_header *get_uint_elt_vertex( struct draw_context *draw,
static struct vertex_header *get_ushort_elt_vertex( struct draw_context *draw,
unsigned i )
{
- const ushort *elts = (const ushort *)draw->elts;
+ const ushort *elts = (const ushort *) draw->mapped_elts;
return get_vertex( draw, elts[i] );
}
@@ -183,7 +183,7 @@ static struct vertex_header *get_ushort_elt_vertex( struct draw_context *draw,
static struct vertex_header *get_ubyte_elt_vertex( struct draw_context *draw,
unsigned i )
{
- const ubyte *elts = (const ubyte *)draw->elts;
+ const ubyte *elts = (const ubyte *) draw->mapped_elts;
return get_vertex( draw, elts[i] );
}
@@ -454,7 +454,7 @@ draw_set_mapped_element_buffer( struct draw_context *draw,
default:
assert(0);
}
- draw->elts = elements;
+ draw->mapped_elts = elements;
draw->eltSize = eltSize;
}
diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h
index 5983bc1174b..1912607b66e 100644
--- a/src/mesa/pipe/draw/draw_private.h
+++ b/src/mesa/pipe/draw/draw_private.h
@@ -43,13 +43,14 @@
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
-#ifdef MESA
-#include "vf/vf.h"
-#else
+
+
/* XXX these are temporary */
struct vf_attr_map {
unsigned attrib;
+ /*
unsigned format;
+ */
unsigned offset;
};
#define VF_ATTRIB_POS 0
@@ -65,7 +66,6 @@ struct vf_attr_map {
#define EMIT_4F 3
#define EMIT_4F_VIEWPORT 6
#define FRAG_ATTRIB_MAX 13
-#endif
/**
@@ -162,6 +162,10 @@ struct draw_context
struct pipe_vertex_element vertex_element[PIPE_ATTRIB_MAX];
struct pipe_shader_state vertex_shader;
+ /** 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];
/* Clip derived state:
@@ -179,10 +183,6 @@ struct draw_context
unsigned vertex_size; /**< in bytes */
unsigned nr_vertices;
- /** Pointer to vertex element/index buffer */
- unsigned eltSize; /**< bytes per index (0, 1, 2 or 4) */
- void *elts;
-
unsigned prim; /**< current prim type: PIPE_PRIM_x */
unsigned reduced_prim;
diff --git a/src/mesa/pipe/softpipe/sp_prim_setup.c b/src/mesa/pipe/softpipe/sp_prim_setup.c
index 43ab0e97db9..f779deac280 100644
--- a/src/mesa/pipe/softpipe/sp_prim_setup.c
+++ b/src/mesa/pipe/softpipe/sp_prim_setup.c
@@ -40,10 +40,10 @@
#include "pipe/draw/draw_private.h"
#include "pipe/p_util.h"
-#ifndef MESA
+
+/** XXX remove */
#define FRAG_ATTRIB_WPOS 0
#define FRAG_ATTRIB_MAX 13
-#endif
/**