Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cf4de1c4
Commit
cf4de1c4
authored
Feb 28, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send swapchain context destruction through the command stream.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
df0f07bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
swapchain.c
dlls/wined3d/swapchain.c
+8
-15
No files found.
dlls/wined3d/swapchain.c
View file @
cf4de1c4
...
...
@@ -27,6 +27,11 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
static
void
wined3d_swapchain_destroy_object
(
void
*
object
)
{
swapchain_destroy_contexts
(
object
);
}
static
void
swapchain_cleanup
(
struct
wined3d_swapchain
*
swapchain
)
{
HRESULT
hr
;
...
...
@@ -60,11 +65,7 @@ static void swapchain_cleanup(struct wined3d_swapchain *swapchain)
swapchain
->
back_buffers
=
NULL
;
}
for
(
i
=
0
;
i
<
swapchain
->
num_contexts
;
++
i
)
{
context_destroy
(
swapchain
->
device
,
swapchain
->
context
[
i
]);
}
HeapFree
(
GetProcessHeap
(),
0
,
swapchain
->
context
);
wined3d_cs_destroy_object
(
swapchain
->
device
->
cs
,
wined3d_swapchain_destroy_object
,
swapchain
);
/* Restore the screen resolution if we rendered in fullscreen.
* This will restore the screen resolution to what it was before creating
...
...
@@ -925,7 +926,6 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
hr
=
E_OUTOFMEMORY
;
goto
err
;
}
swapchain
->
num_contexts
=
1
;
/* In WGL both color, depth and stencil are features of a pixel format. In case of D3D they are separate.
* You are able to add a depth + stencil surface at a later stage when you need it.
...
...
@@ -953,6 +953,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
hr
=
WINED3DERR_NOTAVAILABLE
;
goto
err
;
}
swapchain
->
num_contexts
=
1
;
if
(
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
&&
(
!
desc
->
enable_auto_depth_stencil
...
...
@@ -1051,15 +1052,7 @@ err:
HeapFree
(
GetProcessHeap
(),
0
,
swapchain
->
back_buffers
);
}
if
(
swapchain
->
context
)
{
if
(
swapchain
->
context
[
0
])
{
context_destroy
(
device
,
swapchain
->
context
[
0
]);
swapchain
->
num_contexts
=
0
;
}
HeapFree
(
GetProcessHeap
(),
0
,
swapchain
->
context
);
}
wined3d_cs_destroy_object
(
swapchain
->
device
->
cs
,
wined3d_swapchain_destroy_object
,
swapchain
);
if
(
swapchain
->
front_buffer
)
{
...
...
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