summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Crossman <bencrossman@freedesktop.org>2005-04-14 16:58:25 +0000
committerBen Crossman <bencrossman@freedesktop.org>2005-04-14 16:58:25 +0000
commitb2b01a60dbba4ebd130898509c14ca80a847a679 (patch)
tree2e82d913496c2d9568fc15813deed2a532500158 /src
parent60e2810ae45b358699e6db0ddc95e0a4c1f45338 (diff)
Some initial compile fixes. Still some left and warnings that need fixing. No where near runnable yet.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/windows/gldirect/dglpf.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c7
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_ext_dx7.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_pipeline_dx7.c6
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c10
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_texture_dx7.c6
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c18
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_vb_mesa_render_dx7.c24
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c7
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_ext_dx8.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_pipeline_dx8.c6
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c12
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_texture_dx8.c6
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c18
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_vb_mesa_render_dx8.c24
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c7
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_ext_dx9.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_pipeline_dx9.c6
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c10
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_texture_dx9.c6
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c18
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_vb_mesa_render_dx9.c24
-rw-r--r--src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c2
23 files changed, 114 insertions, 111 deletions
diff --git a/src/mesa/drivers/windows/gldirect/dglpf.c b/src/mesa/drivers/windows/gldirect/dglpf.c
index 65e389d7a7..4cd4d0334a 100644
--- a/src/mesa/drivers/windows/gldirect/dglpf.c
+++ b/src/mesa/drivers/windows/gldirect/dglpf.c
@@ -270,12 +270,12 @@ void dglBuildPixelFormatList()
int i;
char buf[128];
char cat[8];
- HRESULT hRes;
DGL_pixelFormat *lpPF;
#ifdef _USE_GLD3_WGL
_gldDriver.BuildPixelformatList();
#else
+ HRESULT hRes;
IDirectDraw *lpDD1 = NULL;
IDirectDraw4 *lpDD4 = NULL;
IDirect3D3 *lpD3D3 = NULL;
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c
index 5ce14c50bc..cad299540d 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c
@@ -47,9 +47,10 @@
#include "macros.h"
#include "matrix.h"
// #include "mem.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
+#include "teximage.h"
#include "texstore.h"
#include "array_cache/acache.h"
#include "swrast_setup/swrast_setup.h"
@@ -1131,7 +1132,7 @@ void gldSetupDriverPointers_DX7(
// Texture object functions
ctx->Driver.BindTexture = NULL;
- ctx->Driver.CreateTexture = NULL; // Not yet implemented by Mesa!;
+ ctx->Driver.NewTextureObject = NULL; // Not yet implemented by Mesa!;
ctx->Driver.DeleteTexture = gld_DeleteTexture_DX7;
ctx->Driver.PrioritizeTexture = NULL;
@@ -1143,7 +1144,7 @@ void gldSetupDriverPointers_DX7(
// State changing functions
ctx->Driver.AlphaFunc = NULL; //gld_AlphaFunc;
- ctx->Driver.BlendFunc = NULL; //gld_BlendFunc;
+ ctx->Driver.BlendFuncSeparate = NULL; //gld_BlendFunc;
ctx->Driver.ClearColor = NULL; //gld_ClearColor;
ctx->Driver.ClearDepth = NULL; //gld_ClearDepth;
ctx->Driver.ClearStencil = NULL; //gld_ClearStencil;
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_ext_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_ext_dx7.c
index ac99211089..6be41a80dd 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_ext_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_ext_dx7.c
@@ -54,7 +54,7 @@
#include "macros.h"
#include "matrix.h"
// #include "mem.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
#include "texstore.h"
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_pipeline_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_pipeline_dx7.c
index 885fe7abba..9ccec69b98 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_pipeline_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_pipeline_dx7.c
@@ -46,10 +46,10 @@
//---------------------------------------------------------------------------
-extern struct gl_pipeline_stage _gld_d3d_render_stage;
-extern struct gl_pipeline_stage _gld_mesa_render_stage;
+extern struct tnl_pipeline_stage _gld_d3d_render_stage;
+extern struct tnl_pipeline_stage _gld_mesa_render_stage;
-static const struct gl_pipeline_stage *gld_pipeline[] = {
+static const struct tnl_pipeline_stage *gld_pipeline[] = {
&_gld_d3d_render_stage, // Direct3D TnL
&_tnl_vertex_transform_stage,
&_tnl_normal_transform_stage,
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
index a0642b4bd1..5da25003c0 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
@@ -50,7 +50,7 @@
#include "macros.h"
#include "matrix.h"
// #include "mem.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
#include "texstore.h"
@@ -189,9 +189,9 @@
GLfloat ex,ey,fx,fy,cc; \
/* Get vars for later */ \
VB = &TNL_CONTEXT(ctx)->vb; \
- vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->Ptr; \
+ vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->data; \
if (VB->SecondaryColorPtr[1]) { \
- vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->Ptr; \
+ vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->data; \
} else { \
vbspec = NULL; \
} \
@@ -247,12 +247,12 @@
pV->Position.z = p4f[##v][2];
#define GLD_SETUP_SMOOTH_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->Ptr; \
+ p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
pV->Diffuse = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_GET_FLAT_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->Ptr; \
+ p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
dwColor = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_USE_FLAT_COLOUR_3D \
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_texture_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_texture_dx7.c
index a55a52244b..6e9de16b8f 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_texture_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_texture_dx7.c
@@ -1070,7 +1070,7 @@ void gld_ReadPixels_DX7(
// We need to flip the data. Yuck.
// Perhaps Mesa has a span packer we can use in future...
for (i=0; i<height; i++) {
- BYTE *pDestRow = (BYTE*)_mesa_image_address(pack, dest, width, height, format, type, 0, i, 0);
+ BYTE *pDestRow = (BYTE*)_mesa_image_address2d(pack, dest, width, height, format, type, 0, i, 0);
BYTE *pSrcRow = (BYTE*)d3dLockedRect.pBits + (d3dLockedRect.Pitch * (height-i-1));
_mesa_transfer_teximage(
ctx,
@@ -1295,8 +1295,8 @@ void gld_Bitmap_DX7(
for (i=0; i<height; i++) {
GLubyte byte;
pBits = (D3DCOLOR*)((BYTE*)ddsd.lpSurface + (i*ddsd.lPitch));
- src = (const GLubyte *) _mesa_image_address(
- &_mesa_native_packing, pTempBitmap, width, height, GL_COLOR_INDEX, GL_BITMAP,
+ src = (const GLubyte *) _mesa_image_address2d(
+ &ctx->DefaultPacking, pTempBitmap, width, height, GL_COLOR_INDEX, GL_BITMAP,
0, i, 0);
for (j=0; j<(width>>3); j++) {
byte = *src++;
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c
index 21b5628579..b2d7a853f4 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c
@@ -51,7 +51,7 @@
#include "macros.h"
// #include "mem.h"
#include "mtypes.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "math/m_matrix.h"
#include "math/m_xform.h"
@@ -117,7 +117,7 @@ __inline void _gldSetVertexShaderConstants(
static GLboolean gld_d3d_render_stage_run(
GLcontext *ctx,
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
@@ -203,11 +203,11 @@ static GLboolean gld_d3d_render_stage_run(
do {
GLuint i, length, flags = 0;
- for (i = 0 ; !(flags & PRIM_LAST) ; i += length)
+ for (i = 0 ; !(flags & PRIM_END) ; i += length)
{
- flags = VB->Primitive[i];
- length= VB->PrimitiveLength[i];
- ASSERT(length || (flags & PRIM_LAST));
+ flags = VB->Primitive[i].mode;
+ length= VB->Primitive[i].count;
+ ASSERT(length || (flags & PRIM_END));
ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
if (length)
tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags );
@@ -247,7 +247,7 @@ static GLboolean gld_d3d_render_stage_run(
static void gld_d3d_render_stage_check(
GLcontext *ctx,
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
@@ -258,13 +258,13 @@ static void gld_d3d_render_stage_check(
//---------------------------------------------------------------------------
-static void gld_d3d_render_stage_dtr( struct gl_pipeline_stage *stage )
+static void gld_d3d_render_stage_dtr( struct tnl_pipeline_stage *stage )
{
}
//---------------------------------------------------------------------------
-const struct gl_pipeline_stage _gld_d3d_render_stage =
+const struct tnl_pipeline_stage _gld_d3d_render_stage =
{
"gld_d3d_render_stage",
(_NEW_BUFFERS |
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_vb_mesa_render_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_vb_mesa_render_dx7.c
index 7ee625d04b..fe342498dd 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_vb_mesa_render_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_vb_mesa_render_dx7.c
@@ -1,4 +1,4 @@
-/* $Id: gld_vb_mesa_render_dx7.c,v 1.2 2004/07/01 13:14:06 keithw Exp $ */
+/* $Id: gld_vb_mesa_render_dx7.c,v 1.3 2005/04/14 16:58:25 bencrossman Exp $ */
/*
* Mesa 3-D graphics library
@@ -57,7 +57,7 @@
#include "macros.h"
// #include "mem.h"
#include "mtypes.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "math/m_matrix.h"
#include "math/m_xform.h"
@@ -71,10 +71,10 @@
#if defined(USE_IEEE)
#define NEGATIVE(x) (GET_FLOAT_BITS(x) & (1<<31))
-#define DIFFERENT_SIGNS(x,y) ((GET_FLOAT_BITS(x) ^ GET_FLOAT_BITS(y)) & (1<<31))
+//#define DIFFERENT_SIGNS(x,y) ((GET_FLOAT_BITS(x) ^ GET_FLOAT_BITS(y)) & (1<<31))
#else
#define NEGATIVE(x) (x < 0)
-#define DIFFERENT_SIGNS(x,y) (x * y <= 0 && x - y != 0)
+//#define DIFFERENT_SIGNS(x,y) (x * y <= 0 && x - y != 0)
/* Could just use (x*y<0) except for the flatshading requirements.
* Maybe there's a better way?
*/
@@ -310,7 +310,7 @@ tnl_quad_func _gldSetupQuad[4] = {
static GLboolean _gld_mesa_render_stage_run(
GLcontext *ctx,
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
@@ -372,10 +372,10 @@ static GLboolean _gld_mesa_render_stage_run(
do {
GLuint i, length, flags = 0;
- for (i = 0 ; !(flags & PRIM_LAST) ; i += length) {
- flags = VB->Primitive[i];
- length= VB->PrimitiveLength[i];
- ASSERT(length || (flags & PRIM_LAST));
+ for (i = 0 ; !(flags & PRIM_END) ; i += length) {
+ flags = VB->Primitive[i].mode;
+ length= VB->Primitive[i].count;
+ ASSERT(length || (flags & PRIM_END));
ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
if (length)
tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags );
@@ -418,7 +418,7 @@ static GLboolean _gld_mesa_render_stage_run(
*/
static void _gld_mesa_render_stage_check(
GLcontext *ctx,
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
GLuint inputs = VERT_BIT_CLIP;
GLuint i;
@@ -460,13 +460,13 @@ static void _gld_mesa_render_stage_check(
// Destructor
static void _gld_mesa_render_stage_dtr(
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
}
//---------------------------------------------------------------------------
-const struct gl_pipeline_stage _gld_mesa_render_stage =
+const struct tnl_pipeline_stage _gld_mesa_render_stage =
{
"gld_mesa_render_stage",
(_NEW_BUFFERS |
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c
index 892a22eb8f..0a6d9f8555 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c
@@ -47,9 +47,10 @@
#include "macros.h"
#include "matrix.h"
// #include "mem.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
+#include "teximage.h"
#include "texstore.h"
#include "array_cache/acache.h"
#include "swrast_setup/swrast_setup.h"
@@ -1111,7 +1112,7 @@ void gldSetupDriverPointers_DX8(
// Texture object functions
ctx->Driver.BindTexture = NULL;
- ctx->Driver.CreateTexture = NULL; // Not yet implemented by Mesa!;
+ ctx->Driver.NewTextureObject = NULL; // Not yet implemented by Mesa!;
ctx->Driver.DeleteTexture = gld_DeleteTexture_DX8;
ctx->Driver.PrioritizeTexture = NULL;
@@ -1123,7 +1124,7 @@ void gldSetupDriverPointers_DX8(
// State changing functions
ctx->Driver.AlphaFunc = NULL; //gld_AlphaFunc;
- ctx->Driver.BlendFunc = NULL; //gld_BlendFunc;
+ ctx->Driver.BlendFuncSeparate = NULL; //gld_BlendFunc;
ctx->Driver.ClearColor = NULL; //gld_ClearColor;
ctx->Driver.ClearDepth = NULL; //gld_ClearDepth;
ctx->Driver.ClearStencil = NULL; //gld_ClearStencil;
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_ext_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_ext_dx8.c
index 36265fc4e9..108f12a9d1 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_ext_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_ext_dx8.c
@@ -54,7 +54,7 @@
#include "macros.h"
#include "matrix.h"
// #include "mem.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
#include "texstore.h"
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_pipeline_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_pipeline_dx8.c
index ed7aac1e63..2baea57443 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_pipeline_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_pipeline_dx8.c
@@ -46,10 +46,10 @@
//---------------------------------------------------------------------------
-extern struct gl_pipeline_stage _gld_d3d_render_stage;
-extern struct gl_pipeline_stage _gld_mesa_render_stage;
+extern struct tnl_pipeline_stage _gld_d3d_render_stage;
+extern struct tnl_pipeline_stage _gld_mesa_render_stage;
-static const struct gl_pipeline_stage *gld_pipeline[] = {
+static const struct tnl_pipeline_stage *gld_pipeline[] = {
&_gld_d3d_render_stage, // Direct3D TnL
&_tnl_vertex_transform_stage,
&_tnl_normal_transform_stage,
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
index aa647a5948..700b520086 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
@@ -50,7 +50,7 @@
#include "macros.h"
#include "matrix.h"
// #include "mem.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
#include "texstore.h"
@@ -189,9 +189,9 @@
GLfloat ex,ey,fx,fy,cc; \
/* Get vars for later */ \
VB = &TNL_CONTEXT(ctx)->vb; \
- vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->Ptr; \
+ vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->data; \
if (VB->SecondaryColorPtr[1]) { \
- vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->Ptr; \
+ vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->data; \
} else { \
vbspec = NULL; \
} \
@@ -247,12 +247,12 @@
pV->Position.z = p4f[##v][2];
#define GLD_SETUP_SMOOTH_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->Ptr; \
+ p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
pV->Diffuse = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_GET_FLAT_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->Ptr; \
+ p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
dwColor = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_USE_FLAT_COLOUR_3D \
@@ -286,7 +286,7 @@ __inline DWORD _gldComputeFog(
GLchan rFog, gFog, bFog;
GLchan fR, fG, fB;
const GLfloat f = swv->fog;
- const GLfloat g = 1.0 - f;
+ const GLfloat g = 1.0f - f;
UNCLAMPED_FLOAT_TO_CHAN(rFog, ctx->Fog.Color[RCOMP]);
UNCLAMPED_FLOAT_TO_CHAN(gFog, ctx->Fog.Color[GCOMP]);
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_texture_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_texture_dx8.c
index 282d6a130e..53935b2630 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_texture_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_texture_dx8.c
@@ -1031,7 +1031,7 @@ void gld_ReadPixels_DX8(
// We need to flip the data. Yuck.
// Perhaps Mesa has a span packer we can use in future...
for (i=0; i<height; i++) {
- BYTE *pDestRow = (BYTE*)_mesa_image_address(pack, dest, width, height, format, type, 0, i, 0);
+ BYTE *pDestRow = (BYTE*)_mesa_image_address2d(pack, dest, width, height, format, type, 0, i, 0);
BYTE *pSrcRow = (BYTE*)d3dLockedRect.pBits + (d3dLockedRect.Pitch * (height-i-1));
_mesa_transfer_teximage(
ctx,
@@ -1203,8 +1203,8 @@ void gld_Bitmap_DX8(
for (i=0; i<height; i++) {
GLubyte byte;
pBits = (D3DCOLOR*)((BYTE*)d3dLockedRect.pBits + (i*d3dLockedRect.Pitch));
- src = (const GLubyte *) _mesa_image_address(
- &_mesa_native_packing, pTempBitmap, width, height, GL_COLOR_INDEX, GL_BITMAP,
+ src = (const GLubyte *) _mesa_image_address2d(
+ &ctx->DefaultPacking, pTempBitmap, width, height, GL_COLOR_INDEX, GL_BITMAP,
0, i, 0);
for (j=0; j<(width>>3); j++) {
byte = *src++;
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c
index e6e020fc7c..0ae9d6c7e5 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c
@@ -51,7 +51,7 @@
#include "macros.h"
// #include "mem.h"
#include "mtypes.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "math/m_matrix.h"
#include "math/m_xform.h"
@@ -117,7 +117,7 @@ __inline void _gldSetVertexShaderConstants(
static GLboolean gld_d3d_render_stage_run(
GLcontext *ctx,
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -199,11 +199,11 @@ static GLboolean gld_d3d_render_stage_run(
do {
GLuint i, length, flags = 0;
- for (i = 0 ; !(flags & PRIM_LAST) ; i += length)
+ for (i = 0 ; !(flags & PRIM_END) ; i += length)
{
- flags = VB->Primitive[i];
- length= VB->PrimitiveLength[i];
- ASSERT(length || (flags & PRIM_LAST));
+ flags = VB->Primitive[i].mode;
+ length= VB->Primitive[i].count;
+ ASSERT(length || (flags & PRIM_END));
ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
if (length)
tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags );
@@ -240,7 +240,7 @@ static GLboolean gld_d3d_render_stage_run(
static void gld_d3d_render_stage_check(
GLcontext *ctx,
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -251,13 +251,13 @@ static void gld_d3d_render_stage_check(
//---------------------------------------------------------------------------
-static void gld_d3d_render_stage_dtr( struct gl_pipeline_stage *stage )
+static void gld_d3d_render_stage_dtr( struct tnl_pipeline_stage *stage )
{
}
//---------------------------------------------------------------------------
-const struct gl_pipeline_stage _gld_d3d_render_stage =
+const struct tnl_pipeline_stage _gld_d3d_render_stage =
{
"gld_d3d_render_stage",
(_NEW_BUFFERS |
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_vb_mesa_render_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_vb_mesa_render_dx8.c
index 98adc6769a..43fe35d6e9 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_vb_mesa_render_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_vb_mesa_render_dx8.c
@@ -1,4 +1,4 @@
-/* $Id: gld_vb_mesa_render_dx8.c,v 1.2 2004/07/01 13:14:07 keithw Exp $ */
+/* $Id: gld_vb_mesa_render_dx8.c,v 1.3 2005/04/14 16:58:25 bencrossman Exp $ */
/*
* Mesa 3-D graphics library
@@ -57,7 +57,7 @@
#include "macros.h"
// #include "mem.h"
#include "mtypes.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "math/m_matrix.h"
#include "math/m_xform.h"
@@ -71,10 +71,10 @@
#if defined(USE_IEEE)
#define NEGATIVE(x) (GET_FLOAT_BITS(x) & (1<<31))
-#define DIFFERENT_SIGNS(x,y) ((GET_FLOAT_BITS(x) ^ GET_FLOAT_BITS(y)) & (1<<31))
+//#define DIFFERENT_SIGNS(x,y) ((GET_FLOAT_BITS(x) ^ GET_FLOAT_BITS(y)) & (1<<31))
#else
#define NEGATIVE(x) (x < 0)
-#define DIFFERENT_SIGNS(x,y) (x * y <= 0 && x - y != 0)
+//#define DIFFERENT_SIGNS(x,y) (x * y <= 0 && x - y != 0)
/* Could just use (x*y<0) except for the flatshading requirements.
* Maybe there's a better way?
*/
@@ -310,7 +310,7 @@ tnl_quad_func _gldSetupQuad[4] = {
static GLboolean _gld_mesa_render_stage_run(
GLcontext *ctx,
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -393,10 +393,10 @@ static GLboolean _gld_mesa_render_stage_run(
do {
GLuint i, length, flags = 0;
- for (i = 0 ; !(flags & PRIM_LAST) ; i += length) {
- flags = VB->Primitive[i];
- length= VB->PrimitiveLength[i];
- ASSERT(length || (flags & PRIM_LAST));
+ for (i = 0 ; !(flags & PRIM_END) ; i += length) {
+ flags = VB->Primitive[i].mode;
+ length= VB->Primitive[i].count;
+ ASSERT(length || (flags & PRIM_END));
ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
if (length)
tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags );
@@ -441,7 +441,7 @@ static GLboolean _gld_mesa_render_stage_run(
*/
static void _gld_mesa_render_stage_check(
GLcontext *ctx,
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
GLuint inputs = VERT_BIT_CLIP;
GLuint i;
@@ -483,13 +483,13 @@ static void _gld_mesa_render_stage_check(
// Destructor
static void _gld_mesa_render_stage_dtr(
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
}
//---------------------------------------------------------------------------
-const struct gl_pipeline_stage _gld_mesa_render_stage =
+const struct tnl_pipeline_stage _gld_mesa_render_stage =
{
"gld_mesa_render_stage",
(_NEW_BUFFERS |
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c
index 96ad213f17..1b01cb1f7f 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c
@@ -47,9 +47,10 @@
#include "macros.h"
#include "matrix.h"
// #include "mem.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
+#include "teximage.h"
#include "texstore.h"
#include "array_cache/acache.h"
#include "swrast_setup/swrast_setup.h"
@@ -1141,7 +1142,7 @@ void gldSetupDriverPointers_DX9(
// Texture object functions
ctx->Driver.BindTexture = NULL;
- ctx->Driver.CreateTexture = NULL; // Not yet implemented by Mesa!;
+ ctx->Driver.NewTextureObject = NULL; // Not yet implemented by Mesa!;
ctx->Driver.DeleteTexture = gld_DeleteTexture_DX9;
ctx->Driver.PrioritizeTexture = NULL;
@@ -1153,7 +1154,7 @@ void gldSetupDriverPointers_DX9(
// State changing functions
ctx->Driver.AlphaFunc = NULL; //gld_AlphaFunc;
- ctx->Driver.BlendFunc = NULL; //gld_BlendFunc;
+ ctx->Driver.BlendFuncSeparate = NULL; //gld_BlendFunc;
ctx->Driver.ClearColor = NULL; //gld_ClearColor;
ctx->Driver.ClearDepth = NULL; //gld_ClearDepth;
ctx->Driver.ClearStencil = NULL; //gld_ClearStencil;
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_ext_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_ext_dx9.c
index a542806d2f..745c987602 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_ext_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_ext_dx9.c
@@ -54,7 +54,7 @@
#include "macros.h"
#include "matrix.h"
// #include "mem.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
#include "texstore.h"
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_pipeline_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_pipeline_dx9.c
index c69ad26dfe..2b272aa628 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_pipeline_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_pipeline_dx9.c
@@ -46,10 +46,10 @@
//---------------------------------------------------------------------------
-extern struct gl_pipeline_stage _gld_d3d_render_stage;
-extern struct gl_pipeline_stage _gld_mesa_render_stage;
+extern struct tnl_pipeline_stage _gld_d3d_render_stage;
+extern struct tnl_pipeline_stage _gld_mesa_render_stage;
-static const struct gl_pipeline_stage *gld_pipeline[] = {
+static const struct tnl_pipeline_stage *gld_pipeline[] = {
&_gld_d3d_render_stage, // Direct3D TnL
&_tnl_vertex_transform_stage,
&_tnl_normal_transform_stage,
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
index 6edbe702a7..65fd821276 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
@@ -50,7 +50,7 @@
#include "macros.h"
#include "matrix.h"
// #include "mem.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
#include "texstore.h"
@@ -189,9 +189,9 @@
GLfloat ex,ey,fx,fy,cc; \
/* Get vars for later */ \
VB = &TNL_CONTEXT(ctx)->vb; \
- vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->Ptr; \
+ vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->data; \
if (VB->SecondaryColorPtr[1]) { \
- vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->Ptr; \
+ vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->data; \
} else { \
vbspec = NULL; \
} \
@@ -247,12 +247,12 @@
pV->Position.z = p4f[##v][2];
#define GLD_SETUP_SMOOTH_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->Ptr; \
+ p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
pV->Diffuse = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_GET_FLAT_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->Ptr; \
+ p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
dwColor = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_USE_FLAT_COLOUR_3D \
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_texture_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_texture_dx9.c
index ad2f4aab6f..91aa5a5d7b 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_texture_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_texture_dx9.c
@@ -1063,7 +1063,7 @@ void gld_ReadPixels_DX9(
// We need to flip the data. Yuck.
// Perhaps Mesa has a span packer we can use in future...
for (i=0; i<height; i++) {
- BYTE *pDestRow = (BYTE*)_mesa_image_address(pack, dest, width, height, format, type, 0, i, 0);
+ BYTE *pDestRow = (BYTE*)_mesa_image_address2d(pack, dest, width, height, format, type, 0, i, 0);
BYTE *pSrcRow = (BYTE*)d3dLockedRect.pBits + (d3dLockedRect.Pitch * (height-i-1));
_mesa_transfer_teximage(
ctx,
@@ -1254,8 +1254,8 @@ void gld_Bitmap_DX9(
for (i=0; i<height; i++) {
GLubyte byte;
pBits = (D3DCOLOR*)((BYTE*)d3dLockedRect.pBits + (i*d3dLockedRect.Pitch));
- src = (const GLubyte *) _mesa_image_address(
- &_mesa_native_packing, pTempBitmap, width, height, GL_COLOR_INDEX, GL_BITMAP,
+ src = (const GLubyte *) _mesa_image_address2d(
+ &ctx->DefaultPacking, pTempBitmap, width, height, GL_COLOR_INDEX, GL_BITMAP,
0, i, 0);
for (j=0; j<(width>>3); j++) {
byte = *src++;
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c
index f19f2a5eaa..9a55d352b2 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c
@@ -51,7 +51,7 @@
#include "macros.h"
// #include "mem.h"
#include "mtypes.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "math/m_matrix.h"
#include "math/m_xform.h"
@@ -117,7 +117,7 @@ __inline void _gldSetVertexShaderConstants(
static GLboolean gld_d3d_render_stage_run(
GLcontext *ctx,
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -199,11 +199,11 @@ static GLboolean gld_d3d_render_stage_run(
do {
GLuint i, length, flags = 0;
- for (i = 0 ; !(flags & PRIM_LAST) ; i += length)
+ for (i = 0 ; !(flags & PRIM_END) ; i += length)
{
- flags = VB->Primitive[i];
- length= VB->PrimitiveLength[i];
- ASSERT(length || (flags & PRIM_LAST));
+ flags = VB->Primitive[i].mode;
+ length= VB->Primitive[i].count;
+ ASSERT(length || (flags & PRIM_END));
ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
if (length)
tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags );
@@ -240,7 +240,7 @@ static GLboolean gld_d3d_render_stage_run(
static void gld_d3d_render_stage_check(
GLcontext *ctx,
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -251,13 +251,13 @@ static void gld_d3d_render_stage_check(
//---------------------------------------------------------------------------
-static void gld_d3d_render_stage_dtr( struct gl_pipeline_stage *stage )
+static void gld_d3d_render_stage_dtr( struct tnl_pipeline_stage *stage )
{
}
//---------------------------------------------------------------------------
-const struct gl_pipeline_stage _gld_d3d_render_stage =
+const struct tnl_pipeline_stage _gld_d3d_render_stage =
{
"gld_d3d_render_stage",
(_NEW_BUFFERS |
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_vb_mesa_render_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_vb_mesa_render_dx9.c
index b55a417d7b..ac7d2ccefd 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_vb_mesa_render_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_vb_mesa_render_dx9.c
@@ -1,4 +1,4 @@
-/* $Id: gld_vb_mesa_render_dx9.c,v 1.2 2004/07/01 13:14:07 keithw Exp $ */
+/* $Id: gld_vb_mesa_render_dx9.c,v 1.3 2005/04/14 16:58:25 bencrossman Exp $ */
/*
* Mesa 3-D graphics library
@@ -52,7 +52,7 @@
#include "context.h"
#include "macros.h"
#include "mtypes.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "math/m_matrix.h"
#include "math/m_xform.h"
@@ -66,10 +66,10 @@
#if defined(USE_IEEE)
#define NEGATIVE(x) (GET_FLOAT_BITS(x) & (1<<31))
-#define DIFFERENT_SIGNS(x,y) ((GET_FLOAT_BITS(x) ^ GET_FLOAT_BITS(y)) & (1<<31))
+//#define DIFFERENT_SIGNS(x,y) ((GET_FLOAT_BITS(x) ^ GET_FLOAT_BITS(y)) & (1<<31))
#else
#define NEGATIVE(x) (x < 0)
-#define DIFFERENT_SIGNS(x,y) (x * y <= 0 && x - y != 0)
+//#define DIFFERENT_SIGNS(x,y) (x * y <= 0 && x - y != 0)
/* Could just use (x*y<0) except for the flatshading requirements.
* Maybe there's a better way?
*/
@@ -305,7 +305,7 @@ tnl_quad_func _gldSetupQuad[4] = {
static GLboolean _gld_mesa_render_stage_run(
GLcontext *ctx,
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -390,10 +390,10 @@ static GLboolean _gld_mesa_render_stage_run(
do {
GLuint i, length, flags = 0;
- for (i = 0 ; !(flags & PRIM_LAST) ; i += length) {
- flags = VB->Primitive[i];
- length= VB->PrimitiveLength[i];
- ASSERT(length || (flags & PRIM_LAST));
+ for (i = 0 ; !(flags & PRIM_END) ; i += length) {
+ flags = VB->Primitive[i].mode;
+ length= VB->Primitive[i].count;
+ ASSERT(length || (flags & PRIM_END));
ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
if (length)
tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags );
@@ -438,7 +438,7 @@ static GLboolean _gld_mesa_render_stage_run(
*/
static void _gld_mesa_render_stage_check(
GLcontext *ctx,
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
GLuint inputs = VERT_BIT_CLIP;
GLuint i;
@@ -480,13 +480,13 @@ static void _gld_mesa_render_stage_check(
// Destructor
static void _gld_mesa_render_stage_dtr(
- struct gl_pipeline_stage *stage)
+ struct tnl_pipeline_stage *stage)
{
}
//---------------------------------------------------------------------------
-const struct gl_pipeline_stage _gld_mesa_render_stage =
+const struct tnl_pipeline_stage _gld_mesa_render_stage =
{
"gld_mesa_render_stage",
(_NEW_BUFFERS |
diff --git a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
index 0a5957b5a4..b4e4029b23 100644
--- a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
+++ b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
@@ -49,7 +49,7 @@
#include "macros.h"
#include "matrix.h"
// #include "mem.h"
-#include "mmath.h"
+//#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
#include "texstore.h"