Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/ddraw/tests/ddraw1.c | 8 ++++++-- dlls/ddraw/tests/ddraw2.c | 8 ++++++-- dlls/ddraw/tests/ddraw4.c | 8 ++++++-- dlls/ddraw/tests/ddraw7.c | 8 ++++++-- dlls/wined3d/adapter_gl.c | 4 +++- dlls/wined3d/adapter_vk.c | 4 +++- dlls/wined3d/directx.c | 4 +--- 7 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 9efb60a86bb..e7bd9e13acd 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -12894,6 +12894,7 @@ static void test_caps(void) DDCAPS hal_caps, hel_caps; IDirectDraw *ddraw; HRESULT hr; + BOOL no3d;
caps_never = DDSCAPS_RESERVED1 | DDSCAPS_ALPHA @@ -12944,6 +12945,7 @@ 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) { ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); @@ -12952,7 +12954,8 @@ static void test_caps(void) } ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); 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); + todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw_Release(ddraw);
@@ -13001,7 +13004,8 @@ static void test_caps(void) todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); 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); + todo_wine_if(!no3d) 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 aa32b02cd99..db0a39df87c 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -13771,6 +13771,7 @@ static void test_caps(void) IDirectDraw2 *ddraw; IDirectDraw *ddraw1; HRESULT hr; + BOOL no3d;
caps_never = DDSCAPS_RESERVED1 | DDSCAPS_ALPHA @@ -13821,6 +13822,7 @@ 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) { ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); @@ -13829,7 +13831,8 @@ static void test_caps(void) } ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); 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); + todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw2_Release(ddraw);
@@ -13884,7 +13887,8 @@ static void test_caps(void) todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); 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); + todo_wine_if(!no3d) 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 f08a6df548f..c182abf3a3f 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -16332,6 +16332,7 @@ static void test_caps(void) IDirectDraw4 *ddraw; IDirectDraw *ddraw1; HRESULT hr; + BOOL no3d;
caps_never = DDSCAPS_RESERVED1 | DDSCAPS_ALPHA @@ -16382,6 +16383,7 @@ 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) { ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); @@ -16390,7 +16392,8 @@ static void test_caps(void) } ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); 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); + todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw4_Release(ddraw);
@@ -16445,7 +16448,8 @@ static void test_caps(void) todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); 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); + todo_wine_if(!no3d) 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 f6c5022d6a3..48121b6563e 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -16304,6 +16304,7 @@ static void test_caps(void) DDCAPS hal_caps, hel_caps; IDirectDraw7 *ddraw; HRESULT hr; + BOOL no3d;
caps_never = DDSCAPS_RESERVED1 | DDSCAPS_ALPHA @@ -16354,6 +16355,7 @@ 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) { ok(!(hal_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); @@ -16362,7 +16364,8 @@ static void test_caps(void) } ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); 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); + todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw7_Release(ddraw);
@@ -16411,7 +16414,8 @@ static void test_caps(void) todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps); 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); + todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal), + "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
IDirectDraw7_Release(ddraw); } diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index c8187e09915..12879232613 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -4371,7 +4371,9 @@ static void adapter_gl_get_wined3d_caps(const struct wined3d_adapter *adapter, s const struct wined3d_d3d_info *d3d_info = &adapter->d3d_info; const struct wined3d_gl_info *gl_info = &adapter->gl_info;
- caps->ddraw_caps.dds_caps |= WINEDDSCAPS_3DDEVICE + caps->ddraw_caps.dds_caps |= WINEDDSCAPS_BACKBUFFER + | WINEDDSCAPS_FRONTBUFFER + | WINEDDSCAPS_3DDEVICE | WINEDDSCAPS_VIDEOMEMORY; caps->ddraw_caps.caps |= WINEDDCAPS_3D;
diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index 3a1e817cecf..f869318637e 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -297,7 +297,9 @@ static void adapter_vk_get_wined3d_caps(const struct wined3d_adapter *adapter, s const VkPhysicalDeviceLimits *limits = &adapter_vk->device_limits; BOOL sampler_anisotropy = limits->maxSamplerAnisotropy > 1.0f;
- caps->ddraw_caps.dds_caps |= WINEDDSCAPS_3DDEVICE + caps->ddraw_caps.dds_caps |= WINEDDSCAPS_BACKBUFFER + | WINEDDSCAPS_FRONTBUFFER + | WINEDDSCAPS_3DDEVICE | WINEDDSCAPS_VIDEOMEMORY; caps->ddraw_caps.caps |= WINEDDCAPS_3D;
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 83f90a79c86..201a5cf7a09 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2192,9 +2192,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, unsigned in caps->ddraw_caps.ssb_color_key_caps = ckey_caps; caps->ddraw_caps.ssb_fx_caps = fx_caps;
- caps->ddraw_caps.dds_caps = WINEDDSCAPS_BACKBUFFER - | WINEDDSCAPS_FLIP - | WINEDDSCAPS_FRONTBUFFER + caps->ddraw_caps.dds_caps = WINEDDSCAPS_FLIP | WINEDDSCAPS_OFFSCREENPLAIN | WINEDDSCAPS_PALETTE | WINEDDSCAPS_PRIMARYSURFACE