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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
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.
Is this schema looks ok for you ?
Best regards Artur
- -- - -------------------------------------------------------------------------- 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/ - --------------------------------------------------------------------------
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.
-----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/ - --------------------------------------------------------------------------
Am Donnerstag, 13. März 2008 10:19:36 schrieb Artur Szymiec:
This is a corrected patch. The uuid is common to dx8 and dx9 since the UUID is generated inside wined3d.
Yes, that looks reasonable. Only two small issues:
+/* Fixes BUG 11897 */
That's not really needed, specifying a GUID is correct even if it wouldn't fix a bug report.
Also, please attach the patch as an extra file to the mail, if you inline it like you did in your last mails it most likely suffers from line wrapping and can't be applied
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Stefan Dösinger pisze:
Am Donnerstag, 13. März 2008 10:19:36 schrieb Artur Szymiec:
This is a corrected patch. The uuid is common to dx8 and dx9 since the UUID is generated inside wined3d.
Yes, that looks reasonable. Only two small issues:
+/* Fixes BUG 11897 */
That's not really needed, specifying a GUID is correct even if it wouldn't fix a bug report.
Also, please attach the patch as an extra file to the mail, if you inline it like you did in your last mails it most likely suffers from line wrapping and can't be applied
Thank you very much for help Stefan !
Best regards Artur
- -- - -------------------------------------------------------------------------- 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/ - --------------------------------------------------------------------------
Am Donnerstag, 13. März 2008 13:04:28 schrieb Artur Szymiec:
Thank you very much for help Stefan !
You're welcome. Thanks for your help to make Wine better.
Just send the patch to wine-patches, if they're on wine-devel they won't be applied. Also I recommend not to sign mails to wine-patches because the archives can't handle more than one attachment, and if there's a signature the patch isn't accessible from the archives
Artur Szymiec wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Stefan Dösinger pisze:
Am Donnerstag, 13. März 2008 10:19:36 schrieb Artur Szymiec:
This is a corrected patch. The uuid is common to dx8 and dx9 since the UUID is generated inside wined3d.
Yes, that looks reasonable. Only two small issues:
+/* Fixes BUG 11897 */
That's not really needed, specifying a GUID is correct even if it wouldn't fix a bug report.
Also, please attach the patch as an extra file to the mail, if you inline it like you did in your last mails it most likely suffers from line wrapping and can't be applied
Thank you very much for help Stefan !
Few more problems with your patch:
+const GUID IID_D3DDEVICE_D3DUID = {
- 0xaeb2cdd4,
- 0x6e41,
1. Use 4 spaces indentation as the rest of the file not 2.
- memcpy(pIdentifier->DeviceIdentifier,&IID_D3DDEVICE_D3DUID,sizeof(GUID));
2. Don't use memcpy. They are both structs and you you can assign sctruct to struct in c: *pIdentifier->DeviceIdentifier = IID_D3DDEVICE_D3DUID;
Vitaliy.