- currently always use sloaw path as fast path have some problems

- fix APIENTRY mismatched value used by gl func pointers (in
  d3dcore_gl.h)
This commit is contained in:
Raphael Junqueira 2003-06-27 22:20:44 +00:00 committed by Alexandre Julliard
parent 409374d914
commit dcddfbc140
4 changed files with 46 additions and 37 deletions

View File

@ -29,6 +29,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d); WINE_DEFAULT_DEBUG_CHANNEL(d3d);
int num_lock = 0;
void (*wine_tsx11_lock_ptr)(void) = NULL; void (*wine_tsx11_lock_ptr)(void) = NULL;
void (*wine_tsx11_unlock_ptr)(void) = NULL; void (*wine_tsx11_unlock_ptr)(void) = NULL;

View File

@ -18,8 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __WINE_D3DX8_PRIVATE_H #ifndef __WINE_D3D8_PRIVATE_H
#define __WINE_D3DX8_PRIVATE_H #define __WINE_D3D8_PRIVATE_H
#ifndef __WINE_CONFIG_H #ifndef __WINE_CONFIG_H
# error You must include config.h to use this header # error You must include config.h to use this header
@ -49,8 +49,14 @@ extern void (*wine_tsx11_lock_ptr)(void);
extern void (*wine_tsx11_unlock_ptr)(void); extern void (*wine_tsx11_unlock_ptr)(void);
/* As GLX relies on X, this is needed */ /* As GLX relies on X, this is needed */
extern int num_lock;
#if 0
#define ENTER_GL() ++num_lock; TRACE("inc lock to: %d\n", num_lock); wine_tsx11_lock_ptr()
#define LEAVE_GL() if (num_lock > 2) TRACE("fucking locks: %d\n", num_lock); --num_lock; wine_tsx11_unlock_ptr()
#else
#define ENTER_GL() wine_tsx11_lock_ptr() #define ENTER_GL() wine_tsx11_lock_ptr()
#define LEAVE_GL() wine_tsx11_unlock_ptr() #define LEAVE_GL() wine_tsx11_unlock_ptr()
#endif
#include "d3d8.h" #include "d3d8.h"
@ -185,31 +191,6 @@ typedef struct PSHADEROUTPUTDATA8 {
#include "d3dcore_gl.h" #include "d3dcore_gl.h"
#define USE_GL_FUNC(type, pfn) type pfn;
typedef struct _GL_Info {
/**
* CAPS Constants
*/
UINT max_lights;
UINT max_textures;
UINT max_clipplanes;
GL_PSVersion ps_arb_version;
GL_PSVersion ps_nv_version;
GL_VSVersion vs_arb_version;
GL_VSVersion vs_nv_version;
GL_VSVersion vs_ati_version;
BOOL supported[30];
/** OpenGL EXT and ARB functions ptr */
GL_EXT_FUNCS_GEN;
/** OpenGL GLX functions ptr */
GLX_EXT_FUNCS_GEN;
/**/
} GL_Info;
#undef USE_GL_FUNC
#define GL_LIMITS(ExtName) (This->direct3d8->gl_info.max_##ExtName) #define GL_LIMITS(ExtName) (This->direct3d8->gl_info.max_##ExtName)
#define GL_SUPPORT(ExtName) (TRUE == This->direct3d8->gl_info.supported[ExtName]) #define GL_SUPPORT(ExtName) (TRUE == This->direct3d8->gl_info.supported[ExtName])
@ -252,7 +233,6 @@ typedef struct _GL_Info {
* Predeclare the interface implementation structures * Predeclare the interface implementation structures
*/ */
extern ICOM_VTABLE(IDirect3D8) Direct3D8_Vtbl; extern ICOM_VTABLE(IDirect3D8) Direct3D8_Vtbl;
extern ICOM_VTABLE(IDirect3D8) mesa_d3d8vt;
/***************************************************************************** /*****************************************************************************
* IDirect3D implementation structure * IDirect3D implementation structure

View File

@ -33,8 +33,10 @@
#endif #endif
#undef XMD_H #undef XMD_H
#undef APIENTRY
#define APIENTRY
/******* /**********************************
* OpenGL Extensions (EXT and ARB) * OpenGL Extensions (EXT and ARB)
* defines and functions pointer * defines and functions pointer
*/ */
@ -143,14 +145,14 @@ typedef void (APIENTRY * PGLFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GL
#endif #endif
/******* /*********************************
* OpenGL GLX Extensions * OpenGL GLX Extensions
* defines and functions pointer * defines and functions pointer
*/ */
/******* /*********************************
* OpenGL GLX Official Version * OpenGL GLX Official Version
* defines and functions pointer * defines and functions pointer
*/ */
@ -176,7 +178,7 @@ typedef void (APIENTRY * PGLXFNGLXSELECTEVENTPROC) (Display *dpy, GLXDr
typedef void (APIENTRY * PGLXFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); typedef void (APIENTRY * PGLXFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
/******* /********************************************
* OpenGL Supported Extensions (ARB and EXT) * OpenGL Supported Extensions (ARB and EXT)
*/ */
@ -280,11 +282,10 @@ void drawPrimitive(LPDIRECT3DDEVICE8 iface,
const void *idxData, const void *idxData,
int minIndex); int minIndex);
/* Structures required to draw primitives */
/*****************************************
* Structures required to draw primitives
*/
typedef struct Direct3DStridedData { typedef struct Direct3DStridedData {
BYTE *lpData; /* Pointer to start of data */ BYTE *lpData; /* Pointer to start of data */
@ -308,4 +309,31 @@ typedef struct Direct3DVertexStridedData {
} DUMMYUNIONNAME; } DUMMYUNIONNAME;
} Direct3DVertexStridedData; } Direct3DVertexStridedData;
#define USE_GL_FUNC(type, pfn) type pfn;
typedef struct _GL_Info {
/**
* CAPS Constants
*/
UINT max_lights;
UINT max_textures;
UINT max_clipplanes;
GL_PSVersion ps_arb_version;
GL_PSVersion ps_nv_version;
GL_VSVersion vs_arb_version;
GL_VSVersion vs_nv_version;
GL_VSVersion vs_ati_version;
BOOL supported[30];
/** OpenGL EXT and ARB functions ptr */
GL_EXT_FUNCS_GEN;
/** OpenGL GLX functions ptr */
GLX_EXT_FUNCS_GEN;
/**/
} GL_Info;
#undef USE_GL_FUNC
#endif /* __WINE_D3DCORE_GL_H */ #endif /* __WINE_D3DCORE_GL_H */

View File

@ -1295,7 +1295,7 @@ void drawPrimitive(LPDIRECT3DDEVICE8 iface,
drawStridedSoftwareVS(iface, &dataLocations, PrimitiveType, NumPrimitives, drawStridedSoftwareVS(iface, &dataLocations, PrimitiveType, NumPrimitives,
idxData, idxSize, minIndex, StartIdx); idxData, idxSize, minIndex, StartIdx);
} else if (/*TRUE ||*/ } else if (TRUE ||
(dataLocations.u.s.pSize.lpData != NULL) || (dataLocations.u.s.pSize.lpData != NULL) ||
(dataLocations.u.s.diffuse.lpData != NULL) || (dataLocations.u.s.diffuse.lpData != NULL) ||
(dataLocations.u.s.blendWeights.lpData != NULL)) { (dataLocations.u.s.blendWeights.lpData != NULL)) {