=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3d11: Use WINED3D_POOL_MANAGED for staging 3D textures.
Alexandre Julliard
julliard at winehq.org
Fri Feb 3 13:31:34 CST 2017
Module: wine
Branch: master
Commit: 8e4b3c0b0234ed74ffe7470e2d2e350a9d769d10
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8e4b3c0b0234ed74ffe7470e2d2e350a9d769d10
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Fri Feb 3 14:08:50 2017 +0100
d3d11: Use WINED3D_POOL_MANAGED for staging 3D textures.
This makes 3D staging textures CPU accessible.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d11/tests/d3d11.c | 4 +---
dlls/d3d11/texture.c | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index abd78c5..1e966d4 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -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);
diff --git a/dlls/d3d11/texture.c b/dlls/d3d11/texture.c
index 54c5613..de1e865 100644
--- a/dlls/d3d11/texture.c
+++ b/dlls/d3d11/texture.c
@@ -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;
More information about the wine-cvs
mailing list