Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51485 Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/d3d11/tests/d3d11.c | 9 +++++++++ dlls/wined3d/cs.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index f85646050e7..0bea5973aa4 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -33104,6 +33104,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); diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 13c0fce5bb1..51e5055c4ab 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -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;
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=94545
Your paranoid android.
=== w1064v1809 (32 bit report) ===
d3d11: d3d11.c:5916: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5917: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5918: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5921: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5922: Test failed: Got unexpected CPrimitives count: 0.
=== w1064 (32 bit report) ===
d3d11: d3d11.c:5916: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5917: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5918: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5921: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5922: Test failed: Got unexpected CPrimitives count: 0.
=== w10pro64 (32 bit report) ===
d3d11: d3d11.c:5916: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5917: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5918: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5921: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5922: Test failed: Got unexpected CPrimitives count: 0. d3d11.c:5763: Test failed: Got unexpected query result 0x0000000000000000.
=== debiant2 (32 bit German report) ===
d3d11: d3d11.c:9766: Test failed: d3d11.c:15218: Test marked todo: d3d11.c:15149: Test marked todo: Got hr 0 for WRITE_DISCARD. d3d11.c:9766: Test failed: d3d11.c:15127: Test marked todo: Got hr 0 for WRITE.
=== debiant2 (32 bit Japanese:Japan report) ===
d3d11: d3d11.c:9766: Test failed: d3d11.c:15246: Test marked todo: Got hr 0 for WRITE_DISCARD. d3d11.c:9766: Test failed: d3d11.c:15218: Test marked todo: Got hr 0 for WRITE.
=== debiant2 (64 bit WoW report) ===
d3d11: d3d11.c:9766: Test failed: d3d11.c:15127: Test marked todo: d3d11.c:15149: Test marked todo: Got hr 0 for WRITE_DISCARD.