From d82a2683b197697c49fe3bf28dddafe36991d39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Tue, 7 Jan 2020 12:40:06 +0100 Subject: [PATCH] ddraw/tests: Mark a Geforce 9600 misbehavior broken(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Dösinger Signed-off-by: Alexandre Julliard --- 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 80c96fccc4c..c10be66236a 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 390184e80dc..8d4d44863a1 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);