#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
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)
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] );
}
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] );
}
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] );
}
default:
assert(0);
}
- draw->elts = elements;
+ draw->mapped_elts = elements;
draw->eltSize = eltSize;
}
#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
#define EMIT_4F 3
#define EMIT_4F_VIEWPORT 6
#define FRAG_ATTRIB_MAX 13
-#endif
/**
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:
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;
#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
/**