Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/ddraw/tests/ddraw1.c | 99 +++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw2.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw4.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw7.c | 99 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 410 insertions(+)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 449f0c6ec87..9bba97eb455 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -12890,9 +12890,44 @@ static void test_clipper_refcount(void)
static void test_caps(void) { + DWORD caps_never, caps_always, caps_hal; DDCAPS hal_caps, hel_caps; IDirectDraw *ddraw; HRESULT hr; + BOOL no3d; + + caps_never = DDSCAPS_RESERVED1 + | DDSCAPS_ALPHA + | DDSCAPS_PRIMARYSURFACELEFT + | DDSCAPS_SYSTEMMEMORY + | DDSCAPS_VISIBLE + | DDSCAPS_WRITEONLY + | DDSCAPS_LIVEVIDEO + | DDSCAPS_HWCODEC + | DDSCAPS_MODEX + | DDSCAPS_RESERVED2 + | 0x01000000u + | 0x02000000u + | DDSCAPS_ALLOCONLOAD + | DDSCAPS_VIDEOPORT + | DDSCAPS_STANDARDVGAMODE + | DDSCAPS_OPTIMIZED; + + caps_always = DDSCAPS_FLIP + | DDSCAPS_OFFSCREENPLAIN + | DDSCAPS_PRIMARYSURFACE + | DDSCAPS_TEXTURE + | DDSCAPS_ZBUFFER + | DDSCAPS_MIPMAP; + + caps_hal = DDSCAPS_BACKBUFFER + | DDSCAPS_COMPLEX + | DDSCAPS_FRONTBUFFER + | DDSCAPS_3DDEVICE + | DDSCAPS_VIDEOMEMORY + | DDSCAPS_OWNDC + | DDSCAPS_LOCALVIDMEM + | DDSCAPS_NONLOCALVIDMEM;
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); @@ -12910,6 +12945,70 @@ static void test_caps(void) "Got unexpected caps %#x, expected %#x.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
+ no3d = !(hal_caps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE); + if (hal_caps.ddsCaps.dwCaps) + { + todo_wine ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + } + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + + IDirectDraw_Release(ddraw); + + if (hal_caps.ddsCaps.dwCaps) + { + hr = DirectDrawCreate((GUID *)DDCREATE_HARDWAREONLY, &ddraw, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + + memset(&hal_caps, 0, sizeof(hal_caps)); + memset(&hel_caps, 0, sizeof(hel_caps)); + hal_caps.dwSize = sizeof(hal_caps); + hel_caps.dwSize = sizeof(hel_caps); + hr = IDirectDraw_GetCaps(ddraw, &hal_caps, &hel_caps); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); + ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps); + + todo_wine ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + + IDirectDraw_Release(ddraw); + } + + hr = DirectDrawCreate((GUID *)DDCREATE_EMULATIONONLY, &ddraw, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + + memset(&hal_caps, 0, sizeof(hal_caps)); + memset(&hel_caps, 0, sizeof(hel_caps)); + hal_caps.dwSize = sizeof(hal_caps); + hel_caps.dwSize = sizeof(hel_caps); + hr = IDirectDraw_GetCaps(ddraw, &hal_caps, &hel_caps); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); + ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps); + + todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + IDirectDraw_Release(ddraw); }
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index df99938e430..6ceec6f92c3 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -13766,9 +13766,45 @@ static void test_clipper_refcount(void)
static void test_caps(void) { + DWORD caps_never, caps_always, caps_hal; DDCAPS hal_caps, hel_caps; IDirectDraw2 *ddraw; + IDirectDraw *ddraw1; HRESULT hr; + BOOL no3d; + + caps_never = DDSCAPS_RESERVED1 + | DDSCAPS_ALPHA + | DDSCAPS_PRIMARYSURFACELEFT + | DDSCAPS_SYSTEMMEMORY + | DDSCAPS_VISIBLE + | DDSCAPS_WRITEONLY + | DDSCAPS_LIVEVIDEO + | DDSCAPS_HWCODEC + | DDSCAPS_MODEX + | DDSCAPS_RESERVED2 + | 0x01000000u + | 0x02000000u + | DDSCAPS_ALLOCONLOAD + | DDSCAPS_VIDEOPORT + | DDSCAPS_STANDARDVGAMODE + | DDSCAPS_OPTIMIZED; + + caps_always = DDSCAPS_FLIP + | DDSCAPS_OFFSCREENPLAIN + | DDSCAPS_PRIMARYSURFACE + | DDSCAPS_TEXTURE + | DDSCAPS_ZBUFFER + | DDSCAPS_MIPMAP; + + caps_hal = DDSCAPS_BACKBUFFER + | DDSCAPS_COMPLEX + | DDSCAPS_FRONTBUFFER + | DDSCAPS_3DDEVICE + | DDSCAPS_VIDEOMEMORY + | DDSCAPS_OWNDC + | DDSCAPS_LOCALVIDMEM + | DDSCAPS_NONLOCALVIDMEM;
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); @@ -13786,6 +13822,76 @@ static void test_caps(void) "Got unexpected caps %#x, expected %#x.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
+ no3d = !(hal_caps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE); + if (hal_caps.ddsCaps.dwCaps) + { + todo_wine ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + } + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + + IDirectDraw2_Release(ddraw); + + if (hal_caps.ddsCaps.dwCaps) + { + hr = DirectDrawCreate((GUID *)DDCREATE_HARDWAREONLY, &ddraw1, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (void **)&ddraw); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + IDirectDraw_Release(ddraw1); + + memset(&hal_caps, 0, sizeof(hal_caps)); + memset(&hel_caps, 0, sizeof(hel_caps)); + hal_caps.dwSize = sizeof(hal_caps); + hel_caps.dwSize = sizeof(hel_caps); + hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, &hel_caps); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); + ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps); + + todo_wine ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + + IDirectDraw2_Release(ddraw); + } + + hr = DirectDrawCreate((GUID *)DDCREATE_EMULATIONONLY, &ddraw1, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (void **)&ddraw); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + IDirectDraw_Release(ddraw1); + + memset(&hal_caps, 0, sizeof(hal_caps)); + memset(&hel_caps, 0, sizeof(hel_caps)); + hal_caps.dwSize = sizeof(hal_caps); + hel_caps.dwSize = sizeof(hel_caps); + hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, &hel_caps); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); + ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps); + + todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + IDirectDraw2_Release(ddraw); }
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 75784443a47..d04d09ac783 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -16327,9 +16327,45 @@ static void test_clipper_refcount(void)
static void test_caps(void) { + DWORD caps_never, caps_always, caps_hal; DDCAPS hal_caps, hel_caps; IDirectDraw4 *ddraw; + IDirectDraw *ddraw1; HRESULT hr; + BOOL no3d; + + caps_never = DDSCAPS_RESERVED1 + | DDSCAPS_ALPHA + | DDSCAPS_PRIMARYSURFACELEFT + | DDSCAPS_SYSTEMMEMORY + | DDSCAPS_VISIBLE + | DDSCAPS_WRITEONLY + | DDSCAPS_LIVEVIDEO + | DDSCAPS_HWCODEC + | DDSCAPS_MODEX + | DDSCAPS_RESERVED2 + | 0x01000000u + | 0x02000000u + | DDSCAPS_ALLOCONLOAD + | DDSCAPS_VIDEOPORT + | DDSCAPS_STANDARDVGAMODE + | DDSCAPS_OPTIMIZED; + + caps_always = DDSCAPS_FLIP + | DDSCAPS_OFFSCREENPLAIN + | DDSCAPS_PRIMARYSURFACE + | DDSCAPS_TEXTURE + | DDSCAPS_ZBUFFER + | DDSCAPS_MIPMAP; + + caps_hal = DDSCAPS_BACKBUFFER + | DDSCAPS_COMPLEX + | DDSCAPS_FRONTBUFFER + | DDSCAPS_3DDEVICE + | DDSCAPS_VIDEOMEMORY + | DDSCAPS_OWNDC + | DDSCAPS_LOCALVIDMEM + | DDSCAPS_NONLOCALVIDMEM;
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); @@ -16347,6 +16383,76 @@ static void test_caps(void) "Got unexpected caps %#x, expected %#x.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
+ no3d = !(hal_caps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE); + if (hal_caps.ddsCaps.dwCaps) + { + todo_wine ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + } + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + + IDirectDraw4_Release(ddraw); + + if (hal_caps.ddsCaps.dwCaps) + { + hr = DirectDrawCreate((GUID *)DDCREATE_HARDWAREONLY, &ddraw1, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw4, (void **)&ddraw); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + IDirectDraw_Release(ddraw1); + + memset(&hal_caps, 0, sizeof(hal_caps)); + memset(&hel_caps, 0, sizeof(hel_caps)); + hal_caps.dwSize = sizeof(hal_caps); + hel_caps.dwSize = sizeof(hel_caps); + hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, &hel_caps); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); + ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps); + + todo_wine ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + + IDirectDraw4_Release(ddraw); + } + + hr = DirectDrawCreate((GUID *)DDCREATE_EMULATIONONLY, &ddraw1, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw4, (void **)&ddraw); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + IDirectDraw_Release(ddraw1); + + memset(&hal_caps, 0, sizeof(hal_caps)); + memset(&hel_caps, 0, sizeof(hel_caps)); + hal_caps.dwSize = sizeof(hal_caps); + hel_caps.dwSize = sizeof(hel_caps); + hr = IDirectDraw4_GetCaps(ddraw, &hal_caps, &hel_caps); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); + ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps); + + todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + IDirectDraw4_Release(ddraw); }
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 99bd9c82f6b..5f7c9d43eb8 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -16300,9 +16300,44 @@ static void test_begin_end_state_block(void)
static void test_caps(void) { + DWORD caps_never, caps_always, caps_hal; DDCAPS hal_caps, hel_caps; IDirectDraw7 *ddraw; HRESULT hr; + BOOL no3d; + + caps_never = DDSCAPS_RESERVED1 + | DDSCAPS_ALPHA + | DDSCAPS_PRIMARYSURFACELEFT + | DDSCAPS_SYSTEMMEMORY + | DDSCAPS_VISIBLE + | DDSCAPS_WRITEONLY + | DDSCAPS_LIVEVIDEO + | DDSCAPS_HWCODEC + | DDSCAPS_MODEX + | DDSCAPS_RESERVED2 + | 0x01000000u + | 0x02000000u + | DDSCAPS_ALLOCONLOAD + | DDSCAPS_VIDEOPORT + | DDSCAPS_STANDARDVGAMODE + | DDSCAPS_OPTIMIZED; + + caps_always = DDSCAPS_FLIP + | DDSCAPS_OFFSCREENPLAIN + | DDSCAPS_PRIMARYSURFACE + | DDSCAPS_TEXTURE + | DDSCAPS_ZBUFFER + | DDSCAPS_MIPMAP; + + caps_hal = DDSCAPS_BACKBUFFER + | DDSCAPS_COMPLEX + | DDSCAPS_FRONTBUFFER + | DDSCAPS_3DDEVICE + | DDSCAPS_VIDEOMEMORY + | DDSCAPS_OWNDC + | DDSCAPS_LOCALVIDMEM + | DDSCAPS_NONLOCALVIDMEM;
ddraw = create_ddraw(); ok(!!ddraw, "Failed to create a ddraw object.\n"); @@ -16320,6 +16355,70 @@ static void test_caps(void) "Got unexpected caps %#x, expected %#x.\n", hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
+ no3d = !(hal_caps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE); + if (hal_caps.ddsCaps.dwCaps) + { + todo_wine ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + } + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + + IDirectDraw7_Release(ddraw); + + if (hal_caps.ddsCaps.dwCaps) + { + hr = pDirectDrawCreateEx((GUID *)DDCREATE_HARDWAREONLY, (void **)&ddraw, &IID_IDirectDraw7, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + + memset(&hal_caps, 0, sizeof(hal_caps)); + memset(&hel_caps, 0, sizeof(hel_caps)); + hal_caps.dwSize = sizeof(hal_caps); + hel_caps.dwSize = sizeof(hel_caps); + hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, &hel_caps); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); + ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps); + + todo_wine ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + + IDirectDraw7_Release(ddraw); + } + + hr = pDirectDrawCreateEx((GUID *)DDCREATE_EMULATIONONLY, (void **)&ddraw, &IID_IDirectDraw7, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + + memset(&hal_caps, 0, sizeof(hal_caps)); + memset(&hel_caps, 0, sizeof(hel_caps)); + hal_caps.dwSize = sizeof(hal_caps); + hel_caps.dwSize = sizeof(hel_caps); + hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, &hel_caps); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); + ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps); + + todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine_if(no3d) ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + todo_wine ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); + IDirectDraw7_Release(ddraw); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=55355
Your paranoid android.
=== w864 (64 bit report) ===
ddraw: ddraw1.c:12985: Test failed: Got unexpected caps 0x421350. ddraw1.c:12991: Test failed: Got unexpected hr 0x80004005. 0758:ddraw1: unhandled exception c0000005 at 0000000000416F97
=== w1064v1507 (64 bit report) ===
ddraw: ddraw1.c:12985: Test failed: Got unexpected caps 0x421350. ddraw1.c:12991: Test failed: Got unexpected hr 0x80004005. 0530:ddraw1: unhandled exception c0000005 at 0000000000416F97
=== w1064v1809 (64 bit report) ===
ddraw: ddraw1.c:12985: Test failed: Got unexpected caps 0x421350. ddraw1.c:12991: Test failed: Got unexpected hr 0x80004005. 1544:ddraw1: unhandled exception c0000005 at 0000000000416F97
=== w864 (64 bit report) ===
ddraw: ddraw2.c:13865: Test failed: Got unexpected caps 0x421350. ddraw2.c:13871: Test failed: Got unexpected hr 0x80004005. 0da0:ddraw2: unhandled exception c0000005 at 000000000044C4C0
=== w1064v1507 (64 bit report) ===
ddraw: ddraw2.c:13865: Test failed: Got unexpected caps 0x421350. ddraw2.c:13871: Test failed: Got unexpected hr 0x80004005. 02b4:ddraw2: unhandled exception c0000005 at 000000000044C4C0
=== w1064v1809 (64 bit report) ===
ddraw: ddraw2.c:13865: Test failed: Got unexpected caps 0x421350. ddraw2.c:13871: Test failed: Got unexpected hr 0x80004005. 1504:ddraw2: unhandled exception c0000005 at 000000000044C4C0
=== wvistau64_zh_CN (32 bit report) ===
ddraw: ddraw7.c:2740: Test failed: Expected message 0x46, but didn't receive it. ddraw7.c:2742: Test failed: Expected screen size 1024x768, got 0x0. ddraw7.c:2748: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:2778: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:2785: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:2811: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:2834: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:2856: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:2882: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:2902: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:2938: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:2948: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:2974: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:2997: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:3019: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:3045: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:3065: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745). ddraw7.c:3102: Test failed: Expected (0,0)-(1024,768), got (-8,-8)-(1032,745).
=== wvistau64_he (32 bit report) ===
ddraw: ddraw7: Timeout
=== w1064v1809 (32 bit report) ===
ddraw: 0238:ddraw7: unhandled exception c0000005 at 733C40F8
=== debian10 (32 bit report) ===
ddraw: ddraw1: Timeout ddraw2: Timeout ddraw4: Timeout ddraw7: Timeout
=== debian10 (build log) ===
Task: WineTest did not produce the win32_fr_FR report
=== debian10 (32 bit WoW report) ===
ddraw: ddraw1: Timeout ddraw2: Timeout ddraw4: Timeout ddraw7: Timeout
=== debian10 (build log) ===
Task: WineTest did not produce the wow64 report