RESEND Prototype patch that solves bug 11897

Artur Szymiec artur.szymiec at gmail.com
Thu Mar 13 04:19:36 CDT 2008


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

Stefan Dösinger pisze:
> Am Donnerstag, 13. März 2008 01:02:47 schrieb Artur Szymiec:
>> Stefan Dösinger pisze:
>>> Hi, Note that we do not accept workaround patches into Wine,
>>> because
>> otherwise the
>>
>>> whole software would become a huge workaround collection.
>>>
>>> A potential proper fix for this is to generate an UUID, store
>>> it in a
>> constant
>>
>>> global variable and memcpy it into the deviceidentifier
>> Dear Stefan,
>>
>> ok  then. At d3d startup I'll read back UUID from wine registry
>> (or create one if none) -> copy into globar var and then memcopy.
>>
> I don't think you need to store them in the registry. Just hardcode
> it in the code, e.g. like ddraw does it:
>
> const GUID IID_D3DDEVICE_WineD3D = { 0xaef72d43, 0xb09a, 0x4b7b, {
> 0xb7,0x98,0xc6,0x8a,0x77,0x2d,0x72,0x2a } };
>
> which matches an uuidgen output of
> 0xaef72d43-0xb09a-0x4b7b-b798-6c8a773d722a (Don't use this specific
> UUID for d3d9, generate a new one using uuidgen(part of the ext2
> filesystem tools)
>
> Chatter has it that on Windows there is some schematic in DirectX
> GUIDs, additionally to the general way UIDs work. But since that's
> not documented anywhere I could find I don't think any game depends
> on that. In the worst case we'll have to adopt the UIDs ATI and
> Nvidia are using on Windows, if any game compares them.
This is a corrected patch.
The uuid is common to dx8 and dx9 since the UUID is generated
inside wined3d.

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 04af700..809809c 100644
- --- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -36,6 +36,14 @@
 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
 WINE_DECLARE_DEBUG_CHANNEL(d3d_caps);

+/* The d3d device ID */
+const GUID IID_D3DDEVICE_D3DUID = {
+  0xaeb2cdd4,
+  0x6e41,
+  0x43ea,
+  { 0x94,0x1c,0x83,0x61,0xcc,0x76,0x07,0x81 }
+};
+
 /* Extension detection */
 static const struct {
     const char *extension_string;
@@ -1595,7 +1603,9 @@ static HRESULT WINAPI
IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Ad
     *(pIdentifier->SubSysId) = 0;
     *(pIdentifier->Revision) = 0;

- -    /*FIXME: memcpy(&pIdentifier->DeviceIdentifier, ??,
sizeof(??GUID)); */
+    /* Fixes BUG 11897 */
+
memcpy(pIdentifier->DeviceIdentifier,&IID_D3DDEVICE_D3DUID,sizeof(GUID));
+
     if (Flags & WINED3DENUM_NO_WHQL_LEVEL) {
         *(pIdentifier->WHQLLevel) = 0;
     } else {


- --
- --------------------------------------------------------------------------
Registered User No 397465
Linux Debian 2.6.24.2 AMD Athlon(tm) 64 X2 Dual Core 5000+
Conquer your Desktop! http://www.kde.org/trykde/
Reclaim Your Inbox!   http://www.mozilla.org/products/thunderbird/
- --------------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH2PGnbB2ld6kq2MsRAp3fAJ0QbkQ7Ifo3ukdiu0l1KD3TAaXX+QCgsFhC
7MoBeeM2XNh7SmgHe5tppBs=
=/t0r
-----END PGP SIGNATURE-----




More information about the wine-devel mailing list