Commit 8e4b3c0b authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d11: Use WINED3D_POOL_MANAGED for staging 3D textures.

This makes 3D staging textures CPU accessible. Signed-off-by: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 5188edac
...@@ -7972,8 +7972,7 @@ static void test_resource_map(void) ...@@ -7972,8 +7972,7 @@ static void test_resource_map(void)
memset(&mapped_subresource, 0, sizeof(mapped_subresource)); memset(&mapped_subresource, 0, sizeof(mapped_subresource));
hr = ID3D11DeviceContext_Map(context, (ID3D11Resource *)texture3d, 0, D3D11_MAP_WRITE, 0, &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); ok(SUCCEEDED(hr), "Failed to map texture, hr %#x.\n", hr);
if (FAILED(hr)) goto done;
ok(mapped_subresource.RowPitch == 4 * 64, "Got unexpected row pitch %u.\n", mapped_subresource.RowPitch); 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", ok(mapped_subresource.DepthPitch == 4 * 64 * 64, "Got unexpected depth pitch %u.\n",
mapped_subresource.DepthPitch); mapped_subresource.DepthPitch);
...@@ -7990,7 +7989,6 @@ static void test_resource_map(void) ...@@ -7990,7 +7989,6 @@ static void test_resource_map(void)
ok(data == 0xdeadbeef, "Got unexpected data %#x.\n", data); ok(data == 0xdeadbeef, "Got unexpected data %#x.\n", data);
ID3D11DeviceContext_Unmap(context, (ID3D11Resource *)texture3d, 0); ID3D11DeviceContext_Unmap(context, (ID3D11Resource *)texture3d, 0);
done:
refcount = ID3D11Texture3D_Release(texture3d); refcount = ID3D11Texture3D_Release(texture3d);
ok(!refcount, "3D texture has %u references left.\n", refcount); ok(!refcount, "3D texture has %u references left.\n", refcount);
......
...@@ -946,7 +946,7 @@ static HRESULT d3d_texture3d_init(struct d3d_texture3d *texture, struct d3d_devi ...@@ -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_type = WINED3D_MULTISAMPLE_NONE;
wined3d_desc.multisample_quality = 0; wined3d_desc.multisample_quality = 0;
wined3d_desc.usage = wined3d_usage_from_d3d11(desc->BindFlags, desc->Usage); 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.width = desc->Width;
wined3d_desc.height = desc->Height; wined3d_desc.height = desc->Height;
wined3d_desc.depth = desc->Depth; wined3d_desc.depth = desc->Depth;
......
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