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
06a8cbcc
Commit
06a8cbcc
authored
Sep 24, 2012
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Sep 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't leave leftover textures when destroying and creating dxgi swapchains.
parent
f98c896e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
swapchain.c
dlls/wined3d/swapchain.c
+8
-5
No files found.
dlls/wined3d/swapchain.c
View file @
06a8cbcc
...
...
@@ -42,7 +42,8 @@ static void swapchain_cleanup(struct wined3d_swapchain *swapchain)
* is the last buffer to be destroyed, FindContext() depends on that. */
if
(
swapchain
->
front_buffer
)
{
surface_set_container
(
swapchain
->
front_buffer
,
WINED3D_CONTAINER_NONE
,
NULL
);
if
(
swapchain
->
front_buffer
->
container
.
type
==
WINED3D_CONTAINER_SWAPCHAIN
)
surface_set_container
(
swapchain
->
front_buffer
,
WINED3D_CONTAINER_NONE
,
NULL
);
if
(
wined3d_surface_decref
(
swapchain
->
front_buffer
))
WARN
(
"Something's still holding the front buffer (%p).
\n
"
,
swapchain
->
front_buffer
);
swapchain
->
front_buffer
=
NULL
;
...
...
@@ -54,7 +55,8 @@ static void swapchain_cleanup(struct wined3d_swapchain *swapchain)
while
(
i
--
)
{
surface_set_container
(
swapchain
->
back_buffers
[
i
],
WINED3D_CONTAINER_NONE
,
NULL
);
if
(
swapchain
->
back_buffers
[
i
]
->
container
.
type
==
WINED3D_CONTAINER_SWAPCHAIN
)
surface_set_container
(
swapchain
->
back_buffers
[
i
],
WINED3D_CONTAINER_NONE
,
NULL
);
if
(
wined3d_surface_decref
(
swapchain
->
back_buffers
[
i
]))
WARN
(
"Something's still holding back buffer %u (%p).
\n
"
,
i
,
swapchain
->
back_buffers
[
i
]);
}
...
...
@@ -917,7 +919,8 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, enum wined3d_
goto
err
;
}
surface_set_container
(
swapchain
->
front_buffer
,
WINED3D_CONTAINER_SWAPCHAIN
,
swapchain
);
if
(
swapchain
->
front_buffer
->
container
.
type
==
WINED3D_CONTAINER_NONE
)
surface_set_container
(
swapchain
->
front_buffer
,
WINED3D_CONTAINER_SWAPCHAIN
,
swapchain
);
if
(
surface_type
==
WINED3D_SURFACE_TYPE_OPENGL
)
surface_modify_location
(
swapchain
->
front_buffer
,
SFLAG_INDRAWABLE
,
TRUE
);
...
...
@@ -1025,8 +1028,8 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, enum wined3d_
WARN
(
"Failed to create back buffer %u, hr %#x.
\n
"
,
i
,
hr
);
goto
err
;
}
surface_set_container
(
swapchain
->
back_buffers
[
i
],
WINED3D_CONTAINER_SWAPCHAIN
,
swapchain
);
if
(
swapchain
->
back_buffers
[
i
]
->
container
.
type
==
WINED3D_CONTAINER_NONE
)
surface_set_container
(
swapchain
->
back_buffers
[
i
],
WINED3D_CONTAINER_SWAPCHAIN
,
swapchain
);
}
}
...
...
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