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
e55754bf
Commit
e55754bf
authored
Apr 10, 2016
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Discard default pool surfaces on unload.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b8ffc4df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
21 deletions
+4
-21
surface.c
dlls/wined3d/surface.c
+4
-21
No files found.
dlls/wined3d/surface.c
View file @
e55754bf
...
...
@@ -887,27 +887,10 @@ static void surface_unload(struct wined3d_resource *resource)
if
(
resource
->
pool
==
WINED3D_POOL_DEFAULT
)
{
/* Default pool resources are supposed to be destroyed before Reset is called.
* Implicit resources stay however. So this means we have an implicit render target
* or depth stencil. The content may be destroyed, but we still have to tear down
* opengl resources, so we cannot leave early.
*
* Put the surfaces into sysmem, and reset the content. The D3D content is undefined,
* but we can't set the sysmem INDRAWABLE because when we're rendering the swapchain
* or the depth stencil into an FBO the texture or render buffer will be removed
* and all flags get lost */
if
(
resource
->
usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
{
wined3d_texture_validate_location
(
texture
,
sub_resource_idx
,
WINED3D_LOCATION_DISCARDED
);
wined3d_texture_invalidate_location
(
texture
,
sub_resource_idx
,
~
WINED3D_LOCATION_DISCARDED
);
}
else
{
surface_prepare_system_memory
(
surface
);
memset
(
surface
->
resource
.
heap_memory
,
0
,
surface
->
resource
.
size
);
wined3d_texture_validate_location
(
texture
,
sub_resource_idx
,
WINED3D_LOCATION_SYSMEM
);
wined3d_texture_invalidate_location
(
texture
,
sub_resource_idx
,
~
WINED3D_LOCATION_SYSMEM
);
}
/* We should only get here on device reset/teardown for implicit
* resources. */
wined3d_texture_validate_location
(
texture
,
sub_resource_idx
,
WINED3D_LOCATION_DISCARDED
);
wined3d_texture_invalidate_location
(
texture
,
sub_resource_idx
,
~
WINED3D_LOCATION_DISCARDED
);
}
else
{
...
...
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