WineD3D device 'fix'

Roderick Colenbrander thunderbird2k at gmx.net
Tue Feb 14 14:14:58 CST 2006


Hi,

My previous patch moved parts of d3d8's surface code over to wined3d. Some 
programs have issues because the maximum texture size isn't set for d3d8 yet. 
In the future when d3d8 will use a full wined3d device this info will be 
available but right now add a workaround to retrieve the texture size.

Regards,
Roderick Colenbrander
-------------- next part --------------
Index: dlls/wined3d/device.c
===================================================================
RCS file: /home/wine/wine/dlls/wined3d/device.c,v
retrieving revision 1.129
diff -u -r1.129 device.c
--- dlls/wined3d/device.c	13 Feb 2006 13:10:32 -0000	1.129
+++ dlls/wined3d/device.c	14 Feb 2006 20:05:22 -0000
@@ -696,6 +696,13 @@
         }
     }
 
+    /* D3D8 doesn't use the opengl capability code from WineD3D and because of this the maximum texture size isn't set. */
+    if (((IWineD3DImpl *)This->wineD3D)->dxVersion == 8 && GL_LIMITS(texture_size) == 0) {
+        int gl_max;
+        glGetIntegerv(GL_MAX_TEXTURE_SIZE, &gl_max);
+        GL_LIMITS(texture_size) = gl_max;
+    }
+
     /** Check against the maximum texture sizes supported by the video card **/
     if (pow2Width > GL_LIMITS(texture_size) || pow2Height > GL_LIMITS(texture_size)) {
         /* one of three options


More information about the wine-patches mailing list