The main issue this addresses is that WINED3D_RESOURCE_ACCESS_GPU implies that
WINED3D_LOCATION_TEXTURE_RGB makes sense as a location for the texture.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/wined3d/swapchain.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index e23da1180c1..3497a4d560e 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -1413,7 +1413,10 @@ static HRESULT wined3d_swapchain_init(struct wined3d_swapchain *swapchain, struc
if (device->wined3d->flags & WINED3D_NO3D)
texture_desc.usage |= WINED3DUSAGE_OWNDC;
texture_desc.bind_flags = 0;
- texture_desc.access = WINED3D_RESOURCE_ACCESS_GPU;
+ if (device->wined3d->flags & WINED3D_NO3D)
+ texture_desc.access = WINED3D_RESOURCE_ACCESS_CPU;
+ else
+ texture_desc.access = WINED3D_RESOURCE_ACCESS_GPU;
if (swapchain->state.desc.flags & WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER)
texture_desc.access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
texture_desc.width = swapchain->state.desc.backbuffer_width;
@@ -1493,7 +1496,10 @@ static HRESULT wined3d_swapchain_init(struct wined3d_swapchain *swapchain, struc
texture_desc.format = swapchain->state.desc.auto_depth_stencil_format;
texture_desc.usage = 0;
texture_desc.bind_flags = WINED3D_BIND_DEPTH_STENCIL;
- texture_desc.access = WINED3D_RESOURCE_ACCESS_GPU;
+ if (device->wined3d->flags & WINED3D_NO3D)
+ texture_desc.access = WINED3D_RESOURCE_ACCESS_CPU;
+ else
+ texture_desc.access = WINED3D_RESOURCE_ACCESS_GPU;
if (FAILED(hr = device->device_parent->ops->create_swapchain_texture(device->device_parent,
device->device_parent, &texture_desc, 0, &ds)))
--
2.20.1