mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 03:56:43 +00:00
wined3d: Respect WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e4ffe65899
commit
cdfdfc382b
|
@ -4756,6 +4756,11 @@ static void update_swapchain_flags(struct wined3d_texture *texture)
|
||||||
{
|
{
|
||||||
unsigned int flags = texture->swapchain->desc.flags;
|
unsigned int flags = texture->swapchain->desc.flags;
|
||||||
|
|
||||||
|
if (flags & WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER)
|
||||||
|
texture->resource.access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
|
||||||
|
else
|
||||||
|
texture->resource.access &= ~(WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W);
|
||||||
|
|
||||||
if (flags & WINED3D_SWAPCHAIN_GDI_COMPATIBLE)
|
if (flags & WINED3D_SWAPCHAIN_GDI_COMPATIBLE)
|
||||||
texture->flags |= WINED3D_TEXTURE_GET_DC;
|
texture->flags |= WINED3D_TEXTURE_GET_DC;
|
||||||
else
|
else
|
||||||
|
|
|
@ -838,6 +838,8 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||||
texture_desc.usage |= WINED3DUSAGE_OWNDC;
|
texture_desc.usage |= WINED3DUSAGE_OWNDC;
|
||||||
texture_desc.bind_flags = 0;
|
texture_desc.bind_flags = 0;
|
||||||
texture_desc.access = WINED3D_RESOURCE_ACCESS_GPU;
|
texture_desc.access = WINED3D_RESOURCE_ACCESS_GPU;
|
||||||
|
if (swapchain->desc.flags & WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER)
|
||||||
|
texture_desc.access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
|
||||||
texture_desc.width = swapchain->desc.backbuffer_width;
|
texture_desc.width = swapchain->desc.backbuffer_width;
|
||||||
texture_desc.height = swapchain->desc.backbuffer_height;
|
texture_desc.height = swapchain->desc.backbuffer_height;
|
||||||
texture_desc.depth = 1;
|
texture_desc.depth = 1;
|
||||||
|
@ -947,6 +949,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
|
||||||
texture_desc.format = swapchain->desc.auto_depth_stencil_format;
|
texture_desc.format = swapchain->desc.auto_depth_stencil_format;
|
||||||
texture_desc.usage = 0;
|
texture_desc.usage = 0;
|
||||||
texture_desc.bind_flags = WINED3D_BIND_DEPTH_STENCIL;
|
texture_desc.bind_flags = WINED3D_BIND_DEPTH_STENCIL;
|
||||||
|
texture_desc.access = WINED3D_RESOURCE_ACCESS_GPU;
|
||||||
|
|
||||||
if (FAILED(hr = device->device_parent->ops->create_swapchain_texture(device->device_parent,
|
if (FAILED(hr = device->device_parent->ops->create_swapchain_texture(device->device_parent,
|
||||||
device->device_parent, &texture_desc, 0, &ds)))
|
device->device_parent, &texture_desc, 0, &ds)))
|
||||||
|
|
Loading…
Reference in a new issue