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
d612495a
Commit
d612495a
authored
Feb 15, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Translate swap effects in dxgi_factory_CreateSwapChainForHwnd().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5057df1f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
factory.c
dlls/dxgi/factory.c
+10
-3
swapchain.c
dlls/wined3d/swapchain.c
+2
-1
wined3d.h
include/wine/wined3d.h
+1
-0
No files found.
dlls/dxgi/factory.c
View file @
d612495a
...
...
@@ -275,12 +275,22 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForHwnd(IWineDXGIFa
switch
(
swapchain_desc
->
SwapEffect
)
{
case
DXGI_SWAP_EFFECT_DISCARD
:
wined3d_desc
.
swap_effect
=
WINED3D_SWAP_EFFECT_DISCARD
;
min_buffer_count
=
1
;
break
;
case
DXGI_SWAP_EFFECT_SEQUENTIAL
:
wined3d_desc
.
swap_effect
=
WINED3D_SWAP_EFFECT_SEQUENTIAL
;
min_buffer_count
=
1
;
break
;
case
DXGI_SWAP_EFFECT_FLIP_DISCARD
:
wined3d_desc
.
swap_effect
=
WINED3D_SWAP_EFFECT_FLIP_DISCARD
;
min_buffer_count
=
2
;
break
;
case
DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL
:
wined3d_desc
.
swap_effect
=
WINED3D_SWAP_EFFECT_FLIP_SEQUENTIAL
;
min_buffer_count
=
2
;
break
;
...
...
@@ -303,8 +313,6 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForHwnd(IWineDXGIFa
if
(
swapchain_desc
->
Scaling
!=
DXGI_SCALING_STRETCH
)
FIXME
(
"Ignoring scaling %#x.
\n
"
,
swapchain_desc
->
Scaling
);
if
(
swapchain_desc
->
SwapEffect
)
FIXME
(
"Ignoring swap effect %#x.
\n
"
,
swapchain_desc
->
SwapEffect
);
if
(
swapchain_desc
->
AlphaMode
!=
DXGI_ALPHA_MODE_IGNORE
)
FIXME
(
"Ignoring alpha mode %#x.
\n
"
,
swapchain_desc
->
AlphaMode
);
if
(
fullscreen_desc
&&
fullscreen_desc
->
ScanlineOrdering
)
...
...
@@ -319,7 +327,6 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForHwnd(IWineDXGIFa
wined3d_desc
.
backbuffer_usage
=
wined3d_usage_from_dxgi_usage
(
swapchain_desc
->
BufferUsage
);
wined3d_sample_desc_from_dxgi
(
&
wined3d_desc
.
multisample_type
,
&
wined3d_desc
.
multisample_quality
,
&
swapchain_desc
->
SampleDesc
);
wined3d_desc
.
swap_effect
=
WINED3D_SWAP_EFFECT_DISCARD
;
wined3d_desc
.
device_window
=
window
;
wined3d_desc
.
windowed
=
fullscreen_desc
?
fullscreen_desc
->
Windowed
:
TRUE
;
wined3d_desc
.
enable_auto_depth_stencil
=
FALSE
;
...
...
dlls/wined3d/swapchain.c
View file @
d612495a
...
...
@@ -505,7 +505,8 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
* The FLIP swap effect is not implemented yet. We could mark WINED3D_LOCATION_DRAWABLE
* up to date and hope WGL flipped front and back buffers and read this data into
* the FBO. Don't bother about this for now. */
if
(
swapchain
->
desc
.
swap_effect
==
WINED3D_SWAP_EFFECT_DISCARD
)
if
(
swapchain
->
desc
.
swap_effect
==
WINED3D_SWAP_EFFECT_DISCARD
||
swapchain
->
desc
.
swap_effect
==
WINED3D_SWAP_EFFECT_FLIP_DISCARD
)
wined3d_texture_validate_location
(
swapchain
->
back_buffers
[
swapchain
->
desc
.
backbuffer_count
-
1
],
0
,
WINED3D_LOCATION_DISCARDED
);
...
...
include/wine/wined3d.h
View file @
d612495a
...
...
@@ -507,6 +507,7 @@ enum wined3d_swap_effect
{
WINED3D_SWAP_EFFECT_DISCARD
,
WINED3D_SWAP_EFFECT_SEQUENTIAL
,
WINED3D_SWAP_EFFECT_FLIP_DISCARD
,
WINED3D_SWAP_EFFECT_FLIP_SEQUENTIAL
,
WINED3D_SWAP_EFFECT_COPY
,
WINED3D_SWAP_EFFECT_COPY_VSYNC
,
...
...
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