[dx60] some d3d8 fixes

Raphaël Junqueira fenix at club-internet.fr
Wed Jun 25 17:37:11 CDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

 Changelog:
  - currently always use sloaw path as fast path have some problems
  - fix APIENTRY mismatched value used by gl func pointers (in d3dcore_gl.h) 
as seen by luchos

Regards,
Raphael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE++iQXp7NA3AmQTU4RAgBtAJ9uN9VRHsfFaIh3Aq9syb8DU0I2EQCfRidm
pjws/FMHbjLclt7jfvsI1JE=
=0OaL
-----END PGP SIGNATURE-----
-------------- next part --------------
? d3d_compat.h
Index: d3d8_main.c
===================================================================
RCS file: /home/wine/wine/dlls/d3d8/d3d8_main.c,v
retrieving revision 1.8
diff -u -r1.8 d3d8_main.c
--- d3d8_main.c	4 Jun 2003 22:45:57 -0000	1.8
+++ d3d8_main.c	25 Jun 2003 22:30:21 -0000
@@ -29,6 +29,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
 
+int num_lock = 0;
 void (*wine_tsx11_lock_ptr)(void) = NULL;
 void (*wine_tsx11_unlock_ptr)(void) = NULL;
 
Index: d3d8_private.h
===================================================================
RCS file: /home/wine/wine/dlls/d3d8/d3d8_private.h,v
retrieving revision 1.38
diff -u -r1.38 d3d8_private.h
--- d3d8_private.h	18 Jun 2003 03:17:42 -0000	1.38
+++ d3d8_private.h	25 Jun 2003 22:30:28 -0000
@@ -18,8 +18,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifndef __WINE_D3DX8_PRIVATE_H
-#define __WINE_D3DX8_PRIVATE_H
+#ifndef __WINE_D3D8_PRIVATE_H
+#define __WINE_D3D8_PRIVATE_H
 
 #ifndef __WINE_CONFIG_H
 # error You must include config.h to use this header
@@ -49,8 +49,14 @@
 extern void (*wine_tsx11_unlock_ptr)(void);
 
 /* 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 LEAVE_GL() wine_tsx11_unlock_ptr()
+#endif
 
 #include "d3d8.h"
 
@@ -185,31 +191,6 @@
 
 #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_SUPPORT(ExtName)           (TRUE == This->direct3d8->gl_info.supported[ExtName])
@@ -252,7 +233,6 @@
  * Predeclare the interface implementation structures
  */
 extern ICOM_VTABLE(IDirect3D8) Direct3D8_Vtbl;
-extern ICOM_VTABLE(IDirect3D8) mesa_d3d8vt;
 
 /*****************************************************************************
  * IDirect3D implementation structure
Index: d3dcore_gl.h
===================================================================
RCS file: /home/wine/wine/dlls/d3d8/d3dcore_gl.h,v
retrieving revision 1.3
diff -u -r1.3 d3dcore_gl.h
--- d3dcore_gl.h	13 Jun 2003 18:09:05 -0000	1.3
+++ d3dcore_gl.h	25 Jun 2003 22:30:28 -0000
@@ -33,8 +33,10 @@
 #endif
 #undef  XMD_H
 
+#undef  APIENTRY
+#define APIENTRY
 
-/*******
+/**********************************
  * OpenGL Extensions (EXT and ARB)
  *  defines and functions pointer
  */
@@ -143,14 +145,14 @@
 #endif
 
 
-/*******
+/*********************************
  * OpenGL GLX Extensions
  *  defines and functions pointer
  */
 
 
 
-/*******
+/*********************************
  * OpenGL GLX Official Version
  *  defines and functions pointer
  */
@@ -176,7 +178,7 @@
 typedef void          (APIENTRY * PGLXFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
 
 
-/*******
+/********************************************
  * OpenGL Supported Extensions (ARB and EXT)
  */
 
@@ -280,11 +282,10 @@
                     const void *idxData,
                     int   minIndex);
 
-/* Structures required to draw primitives */
-
-
-
 
+/*****************************************
+ * Structures required to draw primitives 
+ */
 
 typedef struct Direct3DStridedData {
     BYTE     *lpData;        /* Pointer to start of data               */
@@ -307,5 +308,32 @@
         Direct3DStridedData input[16];  /* Indexed by constants in D3DVSDE_REGISTER */
     } DUMMYUNIONNAME;
 } 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 */
Index: drawprim.c
===================================================================
RCS file: /home/wine/wine/dlls/d3d8/drawprim.c,v
retrieving revision 1.2
diff -u -r1.2 drawprim.c
--- drawprim.c	18 Jun 2003 03:17:42 -0000	1.2
+++ drawprim.c	25 Jun 2003 22:30:31 -0000
@@ -1295,7 +1295,7 @@
         drawStridedSoftwareVS(iface, &dataLocations, PrimitiveType, NumPrimitives, 
                         idxData, idxSize, minIndex, StartIdx);            
 
-    } else if (/*TRUE ||*/
+    } else if (TRUE ||
 	       (dataLocations.u.s.pSize.lpData        != NULL) || 
                (dataLocations.u.s.diffuse.lpData      != NULL) || 
                (dataLocations.u.s.blendWeights.lpData != NULL)) {


More information about the wine-patches mailing list