On 09/19/2017 02:14 PM, Henri Verbeet wrote:
On 19 September 2017 at 08:00, Nikolay Sivov nsivov@codeweavers.com wrote:
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
dlls/d3d9/tests/device.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+)
I think this would apply to d3d8 as well.
Ok, I'll duplicate it there.
- hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &surface);
- ok(SUCCEEDED(hr), "Failed to get backbuffer, hr %#x.\n", hr);
- hr = IDirect3DSurface9_LockRect(surface, &lockrect, NULL, D3DLOCK_DISCARD);
+todo_wine
- ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
...
- hr = IDirect3DDevice9_Reset(device, &present_parameters);
- ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr);
It's interesting that that works, actually. Since the LockRect() succeeds on Wine, the surface is mapped when the reset happen. That seems like the kind of thing that shouldn't be allowed.
It looks like there is an error message in such cases:
--- err:d3d:resource_unload Resource 0x197180 is being unloaded while mapped. ---
And I see some of those earlier in test log, some tests already trigger apparently.