Module: wine Branch: master Commit: d82a2683b197697c49fe3bf28dddafe36991d39a URL: https://source.winehq.org/git/wine.git/?a=commit;h=d82a2683b197697c49fe3bf28...
Author: Stefan Dösinger stefan@codeweavers.com Date: Tue Jan 7 12:40:06 2020 +0100
ddraw/tests: Mark a Geforce 9600 misbehavior broken().
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ddraw/tests/ddraw1.c | 9 +++++++-- dlls/ddraw/tests/ddraw2.c | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 80c96fccc4..c10be66236 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -10043,8 +10043,12 @@ static void test_getdc(void) ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + /* Geforce 9600, Windows 7 returns E_FAIL. The unlock still seems to work as intended, after- + * wards the surface can be locked again. ReleaseDC() does not unlock the surface, trying to + * Lock it after ReleaseDC returns DDERR_SURFACEBUSY. ddraw4 and 7 are unaffected. */ hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr) || broken(ddraw_is_nvidia(ddraw) && hr == E_FAIL), + "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_GetDC(surface, &dc); ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); @@ -10080,7 +10084,8 @@ static void test_getdc(void) hr = IDirectDrawSurface_ReleaseDC(surface, dc); ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr) || broken(ddraw_is_nvidia(ddraw) && hr == E_FAIL), + "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr); diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 390184e80d..8d4d44863a 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -10745,8 +10745,12 @@ static void test_getdc(void) ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); hr = IDirectDrawSurface_ReleaseDC(surface, dc); ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); + /* Geforce 9600, Windows 7 returns E_FAIL. The unlock still seems to work as intended, after- + * wards the surface can be locked again. ReleaseDC() does not unlock the surface, trying to + * Lock it after ReleaseDC returns DDERR_SURFACEBUSY. ddraw4 and 7 are unaffected. */ hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr) || broken(ddraw_is_nvidia(ddraw) && hr == E_FAIL), + "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_GetDC(surface, &dc); ok(SUCCEEDED(hr), "Failed to get DC for format %s, hr %#x.\n", test_data[i].name, hr); @@ -10782,7 +10786,8 @@ static void test_getdc(void) hr = IDirectDrawSurface_ReleaseDC(surface, dc); ok(SUCCEEDED(hr), "Failed to release DC for format %s, hr %#x.\n", test_data[i].name, hr); hr = IDirectDrawSurface_Unlock(surface, NULL); - ok(SUCCEEDED(hr), "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr); + ok(SUCCEEDED(hr) || broken(ddraw_is_nvidia(ddraw) && hr == E_FAIL), + "Failed to unmap surface for format %s, hr %#x.\n", test_data[i].name, hr);
hr = IDirectDrawSurface_Lock(surface2, NULL, &map_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL); ok(SUCCEEDED(hr), "Failed to map surface for format %s, hr %#x.\n", test_data[i].name, hr);