Commit e4502cff authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Check for failure from wined3d_device_context_require_space() in…

wined3d: Check for failure from wined3d_device_context_require_space() in wined3d_device_context_emit_unmap(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51485Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent eb6fcd3c
......@@ -33091,6 +33091,15 @@ static void test_deferred_context_map(void)
ID3D11CommandList_Release(list);
/* Dead Rising unmaps a resource on the wrong context. */
hr = ID3D11DeviceContext_Map(immediate, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)buffer, 0);
ID3D11DeviceContext_Unmap(immediate, (ID3D11Resource *)buffer, 0);
/* Test WRITE_NO_OVERWRITE. */
hr = ID3D11DeviceContext_Map(immediate, (ID3D11Resource *)buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
......@@ -2520,7 +2520,8 @@ HRESULT wined3d_device_context_emit_unmap(struct wined3d_device_context *context
wined3d_not_from_cs(context->device->cs);
op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_MAP);
if (!(op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_MAP)))
return E_OUTOFMEMORY;
op->opcode = WINED3D_CS_OP_UNMAP;
op->resource = resource;
op->sub_resource_idx = sub_resource_idx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment