Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
cdfdfc38
Commit
cdfdfc38
authored
Nov 08, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Respect WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e4ffe658
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
device.c
dlls/wined3d/device.c
+5
-0
swapchain.c
dlls/wined3d/swapchain.c
+3
-0
No files found.
dlls/wined3d/device.c
View file @
cdfdfc38
...
...
@@ -4756,6 +4756,11 @@ static void update_swapchain_flags(struct wined3d_texture *texture)
{
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
)
texture
->
flags
|=
WINED3D_TEXTURE_GET_DC
;
else
...
...
dlls/wined3d/swapchain.c
View file @
cdfdfc38
...
...
@@ -838,6 +838,8 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
texture_desc
.
usage
|=
WINED3DUSAGE_OWNDC
;
texture_desc
.
bind_flags
=
0
;
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
.
height
=
swapchain
->
desc
.
backbuffer_height
;
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
.
usage
=
0
;
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
,
device
->
device_parent
,
&
texture_desc
,
0
,
&
ds
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment