Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
06a8cbcc
Commit
06a8cbcc
authored
12 years ago
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wined3d: Don't leave leftover textures when destroying and creating dxgi swapchains.
parent
f98c896e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/wined3d/swapchain.c
+8
-5
8 additions, 5 deletions
dlls/wined3d/swapchain.c
with
8 additions
and
5 deletions
dlls/wined3d/swapchain.c
+
8
−
5
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
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment