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
3ec639e3
Commit
3ec639e3
authored
Aug 12, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix swapchain draw buffer cleanup.
Destroying the first back buffer before the other ones might cause an already freed surface to be used as target in FindContext().
parent
06b99c62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
swapchain.c
dlls/wined3d/swapchain.c
+19
-10
No files found.
dlls/wined3d/swapchain.c
View file @
3ec639e3
...
...
@@ -45,23 +45,32 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB
IWineD3DSwapChain_SetGammaRamp
(
iface
,
0
,
&
This
->
orig_gamma
);
/* release the ref to the front and back buffer parents */
if
(
This
->
frontBuffer
)
{
/* Release the swapchain's draw buffers. Make sure This->backBuffer[0] is
* the last buffer to be destroyed, FindContext() depends on that. */
if
(
This
->
frontBuffer
)
{
IWineD3DSurface_SetContainer
(
This
->
frontBuffer
,
0
);
if
(
D3DCB_DestroyRenderTarget
(
This
->
frontBuffer
)
>
0
)
{
FIXME
(
"(%p) Something's still holding the front buffer
\n
"
,
This
);
if
(
D3DCB_DestroyRenderTarget
(
This
->
frontBuffer
))
{
FIXME
(
"(%p) Something's still holding the front buffer (%p).
\n
"
,
This
,
This
->
frontBuffer
);
}
This
->
frontBuffer
=
NULL
;
}
if
(
This
->
backBuffer
)
{
UINT
i
;
for
(
i
=
0
;
i
<
This
->
presentParms
.
BackBufferCount
;
i
++
)
{
if
(
This
->
backBuffer
)
{
UINT
i
=
This
->
presentParms
.
BackBufferCount
;
while
(
i
--
)
{
IWineD3DSurface_SetContainer
(
This
->
backBuffer
[
i
],
0
);
if
(
D3DCB_DestroyRenderTarget
(
This
->
backBuffer
[
i
])
>
0
)
{
FIXME
(
"(%p) Something's still holding
the back buffer
\n
"
,
This
);
}
if
(
D3DCB_DestroyRenderTarget
(
This
->
backBuffer
[
i
]))
FIXME
(
"(%p) Something's still holding
back buffer %u (%p).
\n
"
,
This
,
i
,
This
->
backBuffer
[
i
]);
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
backBuffer
);
This
->
backBuffer
=
NULL
;
}
for
(
i
=
0
;
i
<
This
->
num_contexts
;
++
i
)
...
...
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