summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/trident/trident_vb.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@freedesktop.org>2004-12-24 03:04:14 +0000
committerAdam Jackson <ajax@freedesktop.org>2004-12-24 03:04:14 +0000
commit46a35b2284211e2c068c4c37f8bd3aced240e47a (patch)
tree45a723fcfb6a7557ff61a0adde675d8c82c79f16 /src/mesa/drivers/dri/trident/trident_vb.c
parent1c86c7ad9c38b5ef1baa19677b78076889b60e7f (diff)
Get trident building and -Werror clean.
- Added Makefile - Deleted references to old headers - Added prototypes all over the place - Lots of type updates (drmHandle -> drm_handle_t etc.) - Added __driCreateNewScreen(), deleted __driCreateScreen() - Fixed context creation to match other drivers - Fixed various bitfield names - Bumped driver date Still nowhere close to usable, the DDX isn't DRI-aware and there's no DRM.
Diffstat (limited to 'src/mesa/drivers/dri/trident/trident_vb.c')
-rw-r--r--src/mesa/drivers/dri/trident/trident_vb.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/trident/trident_vb.c b/src/mesa/drivers/dri/trident/trident_vb.c
index 4c6e088da4..77e4d9b76e 100644
--- a/src/mesa/drivers/dri/trident/trident_vb.c
+++ b/src/mesa/drivers/dri/trident/trident_vb.c
@@ -26,10 +26,8 @@
*/
#include "glheader.h"
#include "mtypes.h"
-#include "mem.h"
#include "macros.h"
#include "colormac.h"
-#include "mmath.h"
#include "swrast_setup/swrast_setup.h"
#include "swrast/swrast.h"
@@ -49,8 +47,8 @@
static struct {
void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint );
- interp_func interp;
- copy_pv_func copy_pv;
+ tnl_interp_func interp;
+ tnl_copy_pv_func copy_pv;
GLboolean (*check_tex_sizes)( GLcontext *ctx );
GLuint vertex_size;
GLuint vertex_stride_shift;
@@ -77,10 +75,12 @@ static struct {
#define DO_PTEX (IND & TRIDENT_PTEX_BIT)
#define VERTEX tridentVertex
+#define VERTEX_COLOR trident_color_t
#define LOCALVARS tridentContextPtr tmesa = TRIDENT_CONTEXT(ctx);
#define GET_VIEWPORT_MAT() tmesa->hw_viewport
#define GET_TEXSOURCE(n) tmesa->tmu_source[n]
#define GET_VERTEX_FORMAT() tmesa->vertex_format
+#define GET_VERTEX_SIZE() tmesa->vertex_size
#define GET_VERTEX_STORE() tmesa->verts
#define GET_VERTEX_STRIDE_SHIFT() tmesa->vertex_stride_shift
#define GET_UBYTE_COLOR_STORE() &tmesa->UbyteColor
@@ -310,24 +310,24 @@ void tridentBuildVertices( GLcontext *ctx,
if (!newinputs)
return;
- if (newinputs & VERT_CLIP) {
+ if (newinputs & VERT_BIT_POS) {
setup_tab[tmesa->SetupIndex].emit( ctx, start, count, v, stride );
} else {
GLuint ind = 0;
- if (newinputs & VERT_RGBA)
+ if (newinputs & VERT_BIT_COLOR0)
ind |= TRIDENT_RGBA_BIT;
- if (newinputs & VERT_SPEC_RGB)
+ if (newinputs & VERT_BIT_COLOR1)
ind |= TRIDENT_SPEC_BIT;
- if (newinputs & VERT_TEX0)
+ if (newinputs & VERT_BIT_TEX0)
ind |= TRIDENT_TEX0_BIT;
- if (newinputs & VERT_TEX1)
+ if (newinputs & VERT_BIT_TEX1)
ind |= TRIDENT_TEX1_BIT;
- if (newinputs & VERT_FOG_COORD)
+ if (newinputs & VERT_BIT_FOG)
ind |= TRIDENT_FOG_BIT;
if (tmesa->SetupIndex & TRIDENT_PTEX_BIT)
@@ -373,10 +373,9 @@ void tridentChooseVertexState( GLcontext *ctx )
if (ctx->Fog.Enabled)
ind |= TRIDENT_FOG_BIT;
- if (ctx->Texture._ReallyEnabled) {
+ if (ctx->Texture.Unit[0]._ReallyEnabled) {
ind |= TRIDENT_TEX0_BIT;
- if (ctx->Texture.Unit[0]._ReallyEnabled &&
- ctx->Texture.Unit[1]._ReallyEnabled) {
+ if (ctx->Texture.Unit[1]._ReallyEnabled) {
ind |= TRIDENT_TEX1_BIT;
}
}
@@ -424,12 +423,12 @@ void tridentFreeVB( GLcontext *ctx )
}
if (tmesa->UbyteSecondaryColor.Ptr) {
- ALIGN_FREE(tmesa->UbyteSecondaryColor.Ptr);
+ ALIGN_FREE((void *)tmesa->UbyteSecondaryColor.Ptr);
tmesa->UbyteSecondaryColor.Ptr = 0;
}
if (tmesa->UbyteColor.Ptr) {
- ALIGN_FREE(tmesa->UbyteColor.Ptr);
+ ALIGN_FREE((void *)tmesa->UbyteColor.Ptr);
tmesa->UbyteColor.Ptr = 0;
}
}