remove some of the #ifndef MESA stuff

This commit is contained in:
Brian 2007-08-20 17:02:07 -06:00
parent ddf8ba2d1b
commit 766fa51537
4 changed files with 20 additions and 15 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -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;

View File

@ -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
/**