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

d3d11/tests: Do not test deferred contexts in test_dynamic_map_synchronization().

DISCARD maps on deferred contexts do not seem to offer the same synchronization guarantees as do DISCARD maps on the immediate context, at least not with respect to subsequent NOOVERWRITE maps on the immediate context. This is not particularly surprising, seeing as it is probably far more usual to only map a resource on one kind of context or the other. The test currently fails on Windows 11 on NVidia drivers, but it also fails on Mesa, for what I think are the same reasons. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52563 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54023
parent d059dd1c
......@@ -34355,11 +34355,10 @@ static void test_dynamic_map_synchronization(void)
{
static const struct vec4 green = {0.0f, 1.0f, 0.0f, 1.0f};
static const struct vec4 red = {1.0f, 0.0f, 0.0f, 1.0f};
ID3D11DeviceContext *immediate, *deferred;
struct d3d11_test_context test_context;
D3D11_BUFFER_DESC buffer_desc = {0};
D3D11_MAPPED_SUBRESOURCE map_desc;
ID3D11CommandList *list;
ID3D11DeviceContext *immediate;
ID3D11Device *device;
unsigned int x, y;
HRESULT hr;
......@@ -34369,9 +34368,6 @@ static void test_dynamic_map_synchronization(void)
device = test_context.device;
immediate = test_context.immediate_context;
hr = ID3D11Device_CreateDeferredContext(device, 0, &deferred);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
buffer_desc.ByteWidth = 200 * 4 * sizeof(struct vec3);
buffer_desc.Usage = D3D11_USAGE_DYNAMIC;
buffer_desc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
......@@ -34383,33 +34379,14 @@ static void test_dynamic_map_synchronization(void)
for (y = 0; y < 200; ++y)
{
if (y % 2)
{
hr = ID3D11DeviceContext_Map(immediate, (ID3D11Resource *)test_context.vb,
0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_dynamic_vb_quad(&map_desc, 0, y);
ID3D11DeviceContext_Unmap(immediate, (ID3D11Resource *)test_context.vb, 0);
draw_color_quad(&test_context, &green);
}
else
{
hr = ID3D11DeviceContext_Map(deferred, (ID3D11Resource *)test_context.vb,
0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_dynamic_vb_quad(&map_desc, 0, y);
hr = ID3D11DeviceContext_Map(immediate, (ID3D11Resource *)test_context.vb,
0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D11DeviceContext_Unmap(deferred, (ID3D11Resource *)test_context.vb, 0);
fill_dynamic_vb_quad(&map_desc, 0, y);
hr = ID3D11DeviceContext_FinishCommandList(deferred, FALSE, &list);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D11DeviceContext_ExecuteCommandList(immediate, list, TRUE);
ID3D11CommandList_Release(list);
draw_color_quad(&test_context, &green);
}
ID3D11DeviceContext_Unmap(immediate, (ID3D11Resource *)test_context.vb, 0);
draw_color_quad(&test_context, &green);
for (x = 1; x < 200; ++x)
{
......@@ -34426,7 +34403,6 @@ static void test_dynamic_map_synchronization(void)
check_texture_color(test_context.backbuffer, 0xff00ff00, 0);
ID3D11DeviceContext_Release(deferred);
release_test_context(&test_context);
}
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