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=51485 Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
eb6fcd3cb9
commit
e4502cff81
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue