Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/d3d11/tests/d3d11.c | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 2850d59757e5..b1148cd9494d 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -2185,6 +2185,57 @@ static void test_get_immediate_context(void) ok(!refcount, "Device has %u references left.\n", refcount); }
+static void test_create_deferred_context(void) +{ + ULONG refcount, expected_refcount; + struct device_desc device_desc; + ID3D11DeviceContext *context; + ID3D11Device *device; + HRESULT hr; + + device_desc.feature_level = NULL; + device_desc.flags = D3D11_CREATE_DEVICE_SINGLETHREADED; + if (!(device = create_device(&device_desc))) + { + skip("Failed to create single-threaded device.\n"); + return; + } + + hr = ID3D11Device_CreateDeferredContext(device, 0, &context); + todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Failed to create deferred context, hr %#x.\n", hr); + + refcount = ID3D11Device_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + + if (!(device = create_device(NULL))) + { + skip("Failed to create device.\n"); + return; + } + + expected_refcount = get_refcount(device) + 1; + hr = ID3D11Device_CreateDeferredContext(device, 0, &context); + todo_wine ok(hr == S_OK, "Failed to create deferred context, hr %#x.\n", hr); + if (FAILED(hr)) + goto done; + refcount = get_refcount(device); + ok(refcount == expected_refcount, "Got refcount %u, expected %u.\n", refcount, expected_refcount); + refcount = get_refcount(context); + ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + + check_interface(context, &IID_IUnknown, TRUE, FALSE); + check_interface(context, &IID_ID3D11DeviceChild, TRUE, FALSE); + check_interface(context, &IID_ID3D11DeviceContext, TRUE, FALSE); + check_interface(context, &IID_ID3D11Multithread, FALSE, FALSE); + + refcount = ID3D11DeviceContext_Release(context); + ok(!refcount, "Got unexpected refcount %u.\n", refcount); + +done: + refcount = ID3D11Device_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +} + static void test_create_texture1d(void) { ULONG refcount, expected_refcount; @@ -29205,6 +29256,7 @@ START_TEST(d3d11) queue_test(test_create_device); queue_for_each_feature_level(test_device_interfaces); queue_test(test_get_immediate_context); + queue_test(test_create_deferred_context); queue_test(test_create_texture1d); queue_test(test_texture1d_interfaces); queue_test(test_create_texture2d);
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=51872
Your paranoid android.
=== debian9 (32 bit report) ===
d3d11: d3d11.c:6073: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
=== debian9 (32 bit French report) ===
d3d11: d3d11.c:16821: Test failed: Got {-1.00787401e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001}, expected {-1.00000000e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001} at (0, 0), sub-resource 0.
=== debian9 (32 bit Japanese:Japan report) ===
d3d11: d3d11.c:6073: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
Report errors: d3d11:d3d11 has no test summary line (early exit of the main process?) d3d11:d3d11 has unaccounted for failure messages d3d11:d3d11 has unaccounted for todo messages d3d11:d3d11 has unaccounted for skip messages d3d11:d3d11 returned success despite having failures
=== debian9 (build log) ===
X Error of failed request: GLXBadFBConfig Major opcode of failed request: 154 (GLX) Minor opcode of failed request: 34 ()
=== debian9 (32 bit WoW report) ===
d3d11: d3d11.c:16821: Test failed: Got {-1.00787401e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001}, expected {-1.00000000e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001} at (0, 0), sub-resource 0.
=== debian9 (64 bit WoW report) ===
d3d11: d3d11.c:6083: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xff0000ff at (0, 0). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xff00ffff at (1, 0). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xff00ff00 at (2, 0). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xffffff00 at (3, 0). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xffff0000 at (0, 1). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xffff00ff at (1, 1). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xff000000 at (2, 1). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xff7f7f7f at (3, 1). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xffffffff at (0, 2). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xffffffff at (1, 2). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xffffffff at (2, 2). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xff000000 at (3, 2). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xffffffff at (0, 3). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xff000000 at (2, 3). d3d11.c:8280: Test failed: Test 60: Got unexpected color 0xff000000 at (3, 3). d3d11.c:16821: Test failed: Got {-1.00003052e+000, 0.00000000e+000, 1.00000000e+000, 0.00000000e+000}, expected {-1.00000000e+000, 0.00000000e+000, 1.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 0. d3d11.c:17905: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000000, 0xffffffff, 0x00000000, 0x00000000} at (0, 0), sub-resource 0. d3d11.c:17905: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0xffffffff, 0x00000000, 0x00000000, 0x00000000} at (0, 0), sub-resource 0. d3d11.c:17905: Test failed: Got {0xffffffff, 0x00000001, 0x00000000, 0x00000000}, expected {0x00000000, 0x00000001, 0x00000000, 0x00000000} at (0, 0), sub-resource 0. d3d11.c:16821: Test failed: Got {-1.00787401e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001}, expected {-1.00000000e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001} at (0, 0), sub-resource 0. d3d11.c:17905: Test failed: Got {0x00000001, 0xffffffff, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000000, 0x00000000, 0x00000000} at (0, 0), sub-resource 0. d3d11.c:27518: Test failed: Resource type 1, test 7: pixel (200, 200) has color 00000000, expected ffff0000. d3d11.c:27518: Test failed: Resource type 1, test 7: pixel (280, 200) has color 00000000, expected ffff0000. d3d11.c:27518: Test failed: Resource type 1, test 7: pixel (360, 200) has color 00000000, expected ff00ff00. d3d11.c:27518: Test failed: Resource type 1, test 7: pixel (440, 200) has color 00000000, expected ff00ff00. d3d11.c:27518: Test failed: Resource type 1, test 7: pixel (200, 270) has color 00000000, expected ff0000ff. d3d11.c:27518: Test failed: Resource type 1, test 7: pixel (280, 270) has color 00000000, expected ff0000ff. d3d11.c:27518: Test failed: Resource type 1, test 7: pixel (360, 270) has color 00000000, expected ff000000. d3d11.c:27518: Test failed: Resource type 1, test 7: pixel (440, 270) has color 00000000, expected ff000000. d3d11.c:27518: Test failed: Resource type 1, test 8: pixel (200, 200) has color 00000000, expected ffff0000. d3d11.c:27518: Test failed: Resource type 1, test 8: pixel (280, 200) has color 00000000, expected ffff0000. d3d11.c:27518: Test failed: Resource type 1, test 8: pixel (360, 200) has color 00000000, expected ff00ff00. d3d11.c:27518: Test failed: Resource type 1, test 8: pixel (440, 200) has color 00000000, expected ff00ff00. d3d11.c:27518: Test failed: Resource type 1, test 8: pixel (200, 270) has color 00000000, expected ff0000ff. d3d11.c:27518: Test failed: Resource type 1, test 8: pixel (280, 270) has color 00000000, expected ff0000ff. d3d11.c:27518: Test failed: Resource type 1, test 8: pixel (360, 270) has color 00000000, expected ff000000. d3d11.c:27518: Test failed: Resource type 1, test 8: pixel (440, 270) has color 00000000, expected ff000000. d3d11.c:27518: Test failed: Resource type 2, test 7: pixel (200, 200) has color 00000000, expected ffff0000. d3d11.c:27518: Test failed: Resource type 2, test 7: pixel (280, 200) has color 00000000, expected ffff0000. d3d11.c:27518: Test failed: Resource type 2, test 7: pixel (360, 200) has color 00000000, expected ff00ff00. d3d11.c:27518: Test failed: Resource type 2, test 7: pixel (440, 200) has color 00000000, expected ff00ff00. d3d11.c:27518: Test failed: Resource type 2, test 7: pixel (200, 270) has color 00000000, expected ff0000ff. d3d11.c:27518: Test failed: Resource type 2, test 7: pixel (280, 270) has color 00000000, expected ff0000ff. d3d11.c:27518: Test failed: Resource type 2, test 7: pixel (360, 270) has color 00000000, expected ff000000. d3d11.c:27518: Test failed: Resource type 2, test 7: pixel (440, 270) has color 00000000, expected ff000000. d3d11.c:27518: Test failed: Resource type 2, test 8: pixel (200, 200) has color 00000000, expected ffff0000. d3d11.c:27518: Test failed: Resource type 2, test 8: pixel (280, 200) has color 00000000, expected ffff0000. d3d11.c:27518: Test failed: Resource type 2, test 8: pixel (360, 200) has color 00000000, expected ff00ff00. d3d11.c:27518: Test failed: Resource type 2, test 8: pixel (440, 200) has color 00000000, expected ff00ff00. d3d11.c:27518: Test failed: Resource type 2, test 8: pixel (200, 270) has color 00000000, expected ff0000ff. d3d11.c:27518: Test failed: Resource type 2, test 8: pixel (280, 270) has color 00000000, expected ff0000ff. d3d11.c:27518: Test failed: Resource type 2, test 8: pixel (360, 270) has color 00000000, expected ff000000. d3d11.c:27518: Test failed: Resource type 2, test 8: pixel (440, 270) has color 00000000, expected ff000000. d3d11.c:27518: Test failed: Resource type 3, test 7: pixel (200, 200) has color 00000000, expected ffff0000. d3d11.c:27518: Test failed: Resource type 3, test 7: pixel (280, 200) has color 00000000, expected ffff0000. d3d11.c:27518: Test failed: Resource type 3, test 7: pixel (360, 200) has color 00000000, expected ff00ff00. d3d11.c:27518: Test failed: Resource type 3, test 7: pixel (440, 200) has color 00000000, expected ff00ff00. d3d11.c:27518: Test failed: Resource type 3, test 7: pixel (200, 270) has color 00000000, expected ff0000ff. d3d11.c:27518: Test failed: Resource type 3, test 7: pixel (280, 270) has color 00000000, expected ff0000ff. d3d11.c:27518: Test failed: Resource type 3, test 7: pixel (360, 270) has color 00000000, expected ff000000. d3d11.c:27518: Test failed: Resource type 3, test 7: pixel (440, 270) has color 00000000, expected ff000000. d3d11.c:27518: Test failed: Resource type 3, test 8: pixel (200, 200) has color 00000000, expected ffff0000. d3d11.c:27518: Test failed: Resource type 3, test 8: pixel (280, 200) has color 00000000, expected ffff0000. d3d11.c:27518: Test failed: Resource type 3, test 8: pixel (360, 200) has color 00000000, expected ff00ff00. d3d11.c:27518: Test failed: Resource type 3, test 8: pixel (440, 200) has color 00000000, expected ff00ff00. d3d11.c:27518: Test failed: Resource type 3, test 8: pixel (200, 270) has color 00000000, expected ff0000ff. d3d11.c:27518: Test failed: Resource type 3, test 8: pixel (280, 270) has color 00000000, expected ff0000ff. d3d11.c:27518: Test failed: Resource type 3, test 8: pixel (360, 270) has color 00000000, expected ff000000. d3d11.c:27518: Test failed: Resource type 3, test 8: pixel (440, 270) has color 00000000, expected ff000000. d3d11.c:25754: Test failed: Got depth 2.51951814e-003, expected 2.51948950e-003. d3d11.c:25754: Test failed: Got depth 2.51951814e-003, expected 2.51948950e-003. d3d11.c:25754: Test failed: Got depth 1.27950311e-003, expected 1.27948953e-003. d3d11.c:25754: Test failed: Got depth 1.27950311e-003, expected 1.27948953e-003. d3d11.c:25754: Test failed: Got depth 1.27950311e-003, expected 1.27948953e-003. d3d11.c:25754: Test failed: Got depth 1.27950311e-003, expected 1.27948953e-003. d3d11.c:25754: Test failed: Got depth 1.27950311e-003, expected 1.27948953e-003. d3d11.c:25754: Test failed: Got depth 1.27950311e-003, expected 1.27948953e-003. d3d11.c:25754: Test failed: Got depth 5.03277779e-003, expected 5.03897900e-003. d3d11.c:25754: Test failed: Got depth 5.03277779e-003, expected 5.03897900e-003. d3d11.c:25754: Test failed: Got depth 2.54905224e-003, expected 2.54897905e-003. d3d11.c:25754: Test failed: Got depth 7.52645731e-003, expected 7.53897894e-003. d3d11.c:25754: Test failed: Got depth 7.52645731e-003, expected 7.53897894e-003. d3d11.c:25754: Test failed: Got depth 2.54905224e-003, expected 2.54897905e-003. d3d11.c:25754: Test failed: Got depth 1.25139356e-002, expected 1.25389788e-002. d3d11.c:25754: Test failed: Got depth 1.25139356e-002, expected 1.25389788e-002. d3d11.c:25754: Test failed: Got depth 2.54905224e-003, expected 2.54897905e-003. d3d11.c:25754: Test failed: Got depth 6.40938997e-001, expected 6.42538965e-001. d3d11.c:25754: Test failed: Got depth 6.40938997e-001, expected 6.42538965e-001. d3d11.c:25754: Test failed: Got depth 2.54905224e-003, expected 2.54897905e-003. d3d11.c:25754: Test failed: Got depth 2.54905224e-003, expected 2.54897905e-003. d3d11.c:25754: Test failed: Got depth 2.54905224e-003, expected 2.54897905e-003. d3d11.c:25762: Test failed: Got value 0x149d4 (5.03277809e-003), expected 0x14a3c (5.03897697e-003). d3d11.c:25762: Test failed: Got value 0x149d4 (5.03277809e-003), expected 0x14a3c (5.03897697e-003). d3d11.c:25762: Test failed: Got value 0x5c5c2 (2.25487961e-002), expected 0x5c5c6 (2.25490345e-002). d3d11.c:25762: Test failed: Got value 0x1ed41 (7.52645776e-003), expected 0x1ee13 (7.53897473e-003). d3d11.c:25762: Test failed: Got value 0x1ed41 (7.52645776e-003), expected 0x1ee13 (7.53897473e-003). d3d11.c:25762: Test failed: Got value 0x5c5c2 (2.25487961e-002), expected 0x5c5c6 (2.25490345e-002). d3d11.c:25762: Test failed: Got value 0x3341d (1.25139363e-002), expected 0x335c1 (1.25389703e-002). d3d11.c:25762: Test failed: Got value 0x3341d (1.25139363e-002), expected 0x335c1 (1.25389703e-002). d3d11.c:25762: Test failed: Got value 0x5c5c2 (2.25487961e-002), expected 0x5c5c6 (2.25490345e-002). d3d11.c:25762: Test failed: Got value 0xa41493 (6.40938976e-001), expected 0xa47d6e (6.42538943e-001). d3d11.c:25762: Test failed: Got value 0xa41493 (6.40938976e-001), expected 0xa47d6e (6.42538943e-001). d3d11.c:25762: Test failed: Got value 0x5c5c2 (2.25487961e-002), expected 0x5c5c6 (2.25490345e-002). d3d11.c:25762: Test failed: Got value 0x5c5c2 (2.25487961e-002), expected 0x5c5c6 (2.25490345e-002). d3d11.c:25762: Test failed: Got value 0x5c5c2 (2.25487961e-002), expected 0x5c5c6 (2.25490345e-002). d3d11.c:25771: Test failed: Got value 0x3d8 (1.50148775e-002), expected 0x3da (1.50453956e-002). d3d11.c:25771: Test failed: Got value 0x3d8 (1.50148775e-002), expected 0x3da (1.50453956e-002). d3d11.c:25771: Test failed: Got value 0x333 (1.24971389e-002), expected 0x336 (1.25429160e-002). d3d11.c:25771: Test failed: Got value 0x333 (1.24971389e-002), expected 0x336 (1.25429160e-002). d3d11.c:25771: Test failed: Got value 0x479 (1.74715801e-002), expected 0x47d (1.75326162e-002). d3d11.c:25771: Test failed: Got value 0x479 (1.74715801e-002), expected 0x47d (1.75326162e-002). d3d11.c:25771: Test failed: Got value 0xa414 (6.40939956e-001), expected 0xa47c (6.42526894e-001). d3d11.c:25771: Test failed: Got value 0xa414 (6.40939956e-001), expected 0xa47c (6.42526894e-001).
Report errors: d3d11:d3d11 prints too much data (35206 bytes)