d3d11: Use WINED3D_POOL_MANAGED for staging 3D textures.

This makes 3D staging textures CPU accessible.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2017-02-03 14:08:50 +01:00 committed by Alexandre Julliard
parent 5188edacb2
commit 8e4b3c0b02
2 changed files with 2 additions and 4 deletions

View File

@ -7972,8 +7972,7 @@ static void test_resource_map(void)
memset(&mapped_subresource, 0, sizeof(mapped_subresource));
hr = ID3D11DeviceContext_Map(context, (ID3D11Resource *)texture3d, 0, D3D11_MAP_WRITE, 0, &mapped_subresource);
todo_wine ok(SUCCEEDED(hr), "Failed to map texture, hr %#x.\n", hr);
if (FAILED(hr)) goto done;
ok(SUCCEEDED(hr), "Failed to map texture, hr %#x.\n", hr);
ok(mapped_subresource.RowPitch == 4 * 64, "Got unexpected row pitch %u.\n", mapped_subresource.RowPitch);
ok(mapped_subresource.DepthPitch == 4 * 64 * 64, "Got unexpected depth pitch %u.\n",
mapped_subresource.DepthPitch);
@ -7990,7 +7989,6 @@ static void test_resource_map(void)
ok(data == 0xdeadbeef, "Got unexpected data %#x.\n", data);
ID3D11DeviceContext_Unmap(context, (ID3D11Resource *)texture3d, 0);
done:
refcount = ID3D11Texture3D_Release(texture3d);
ok(!refcount, "3D texture has %u references left.\n", refcount);

View File

@ -946,7 +946,7 @@ static HRESULT d3d_texture3d_init(struct d3d_texture3d *texture, struct d3d_devi
wined3d_desc.multisample_type = WINED3D_MULTISAMPLE_NONE;
wined3d_desc.multisample_quality = 0;
wined3d_desc.usage = wined3d_usage_from_d3d11(desc->BindFlags, desc->Usage);
wined3d_desc.pool = WINED3D_POOL_DEFAULT;
wined3d_desc.pool = desc->Usage == D3D11_USAGE_STAGING ? WINED3D_POOL_MANAGED : WINED3D_POOL_DEFAULT;
wined3d_desc.width = desc->Width;
wined3d_desc.height = desc->Height;
wined3d_desc.depth = desc->Depth;