2010/8/9 Roderick Colenbrander <[email protected]>:
> 2010/8/8 Oldřich Jedlička <[email protected]>:
>> Hi W,
>>
>> On Sunday 08 August 2010 11:21:35 [email protected] wrote:
>>> Hi,
>>>
>>> i
>> just noticed some new and subtle failure in ddraw:dsurface
>>> tests. I don't
>> know how closely you watch and study tests
>>> results, so i thought it might
>> be a good idea bring it the
>>> the light. Sorry if not ;-)
>>>
>>> Compared
>> WinXP 277040d92454 vs 8b2a403a7dc3 (latest vs last
>>> Friday).
>>>
>>>
>> Interestingly does not happen on Intel and nVidia 64bit. So
>>> the only
>> affected is nVidia 32bit.
>>
>> Do you mean this problem?
>>
>> ddraw:dsurface start -
>> -
>> dsurface.c:419: Tests skipped: Failed to create surface
>> dsurface.c:801:
>> Test failed: IDirectDraw7_QueryInterface returned 80004002
>> dsurface.c:808:
>> this is the last test seen before the exception
>> dsurface: unhandled
>> exception c0000005 at 00413A29
>> ddraw:dsurface done (4294967295)
>>
>> I've seen
>> this also during my first tests. From my understanding the problem of
>> unhandled exception is caused by query interface failure. For me it looks
>> like that DirectDraw7 isn't supported on the system
>> (E_NOINTERFACE).
>>
>> Oldřich.
>>
>
> I'm not sure how usable 64-bit DirectDraw is. At the time XP64 came
> out, DirectDraw was already deprecated and Direct3D9 was the standard.
> I'm not sure how much effort Microsoft put in 64-bit DirectDraw (it
> wouldn't make sense to use it). Perhaps some IE plugins (or IE itself)
> use DirectDraw and that could be why there is some support.
>
> More investigation is needed on what is supported in 64-bit
> DirectDraw. The DirectDraw 3D tests seem to fail correctly, so at
> least 3D is not around. There is likely some limited 2D support
> though. It shouldn't be that hard to fix the tests.

Something like this -- I haven't tested this on affected Win64 systems.

- Reece
diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c
index 76bfc7e..6e1efe4 100644
--- a/dlls/ddraw/tests/dsurface.c
+++ b/dlls/ddraw/tests/dsurface.c
@@ -797,7 +797,7 @@ static void GetDDInterface_1(void)
     ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw4, (void **) &dd4);
     ok(ret == DD_OK, "IDirectDraw7_QueryInterface returned %08x\n", ret);
     ret = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7);
-    ok(ret == DD_OK, "IDirectDraw7_QueryInterface returned %08x\n", ret);
+    ok(ret == DD_OK || broken(ret == E_NOINTERFACE) /* some Win64 platforms */, "IDirectDraw7_QueryInterface returned %08x\n", ret);
 
     ref1 = getref((IUnknown *) lpDD);
     ok(ref1 == 1, "IDirectDraw refcount is %d\n", ref1);
@@ -805,8 +805,16 @@ static void GetDDInterface_1(void)
     ok(ref2 == 1, "IDirectDraw2 refcount is %d\n", ref2);
     ref4 = getref((IUnknown *) dd4);
     ok(ref4 == 1, "IDirectDraw4 refcount is %d\n", ref4);
-    ref7 = getref((IUnknown *) dd7);
-    ok(ref7 == 1, "IDirectDraw7 refcount is %d\n", ref7);
+    if (dd7) /* maybe NULL on Win64 platforms */
+    {
+        ref7 = getref((IUnknown *) dd7);
+        ok(ref7 == 1, "IDirectDraw7 refcount is %d\n", ref7);
+    }
+    else
+    {
+        ref7 = 0;
+        win_skip("IDirectDraw7 not supported.");
+    }
 
 
     ret = IDirectDrawSurface2_GetDDInterface(dsurface2, &dd);
@@ -814,7 +822,8 @@ static void GetDDInterface_1(void)
     ok(getref((IUnknown *) lpDD) == ref1 + 1, "IDirectDraw refcount was increased by %d\n", getref((IUnknown *) lpDD) - ref1);
     ok(getref((IUnknown *) dd2) == ref2 + 0, "IDirectDraw2 refcount was increased by %d\n", getref((IUnknown *) dd2) - ref2);
     ok(getref((IUnknown *) dd4) == ref4 + 0, "IDirectDraw4 refcount was increased by %d\n", getref((IUnknown *) dd4) - ref4);
-    ok(getref((IUnknown *) dd7) == ref7 + 0, "IDirectDraw7 refcount was increased by %d\n", getref((IUnknown *) dd7) - ref7);
+    if (dd7) /* maybe NULL on Win64 platforms */
+        ok(getref((IUnknown *) dd7) == ref7 + 0, "IDirectDraw7 refcount was increased by %d\n", getref((IUnknown *) dd7) - ref7);
 
     ok(dd == lpDD, "Returned interface pointer is not equal to the creation interface\n");
     IUnknown_Release((IUnknown *) dd);
@@ -825,7 +834,7 @@ static void GetDDInterface_1(void)
 
     IDirectDraw_Release(dd2);
     IDirectDraw_Release(dd4);
-    IDirectDraw_Release(dd7);
+    if (dd7) IDirectDraw_Release(dd7);
     IDirectDrawSurface2_Release(dsurface2);
     IDirectDrawSurface_Release(dsurface);
 }


Reply via email to