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
7d5285ac
Commit
7d5285ac
authored
Jun 09, 2009
by
Stefan Doesinger
Committed by
Alexandre Julliard
Jun 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Properly free srgb textures.
parent
2e119a27
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
14 deletions
+10
-14
basetexture.c
dlls/wined3d/basetexture.c
+8
-14
surface.c
dlls/wined3d/surface.c
+2
-0
No files found.
dlls/wined3d/basetexture.c
View file @
7d5285ac
...
...
@@ -53,19 +53,7 @@ HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT levels, WINED3DR
void
basetexture_cleanup
(
IWineD3DBaseTexture
*
iface
)
{
IWineD3DBaseTextureImpl
*
This
=
(
IWineD3DBaseTextureImpl
*
)
iface
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
wineD3DDevice
;
TRACE
(
"(%p) : textureName(%d)
\n
"
,
This
,
This
->
baseTexture
.
textureName
);
if
(
This
->
baseTexture
.
textureName
!=
0
)
{
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
TRACE
(
"(%p) : Deleting texture %d
\n
"
,
This
,
This
->
baseTexture
.
textureName
);
glDeleteTextures
(
1
,
&
This
->
baseTexture
.
textureName
);
glDeleteTextures
(
1
,
&
This
->
baseTexture
.
srgbTextureName
);
LEAVE_GL
();
}
basetexture_unload
(
iface
);
resource_cleanup
((
IWineD3DResource
*
)
iface
);
}
...
...
@@ -78,8 +66,14 @@ void basetexture_unload(IWineD3DBaseTexture *iface)
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
glDeleteTextures
(
1
,
&
This
->
baseTexture
.
textureName
);
glDeleteTextures
(
1
,
&
This
->
baseTexture
.
srgbTextureName
);
This
->
baseTexture
.
textureName
=
0
;
LEAVE_GL
();
}
if
(
This
->
baseTexture
.
srgbTextureName
)
{
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
glDeleteTextures
(
1
,
&
This
->
baseTexture
.
srgbTextureName
);
This
->
baseTexture
.
srgbTextureName
=
0
;
LEAVE_GL
();
}
...
...
dlls/wined3d/surface.c
View file @
7d5285ac
...
...
@@ -892,6 +892,8 @@ static void WINAPI IWineD3DSurfaceImpl_UnLoad(IWineD3DSurface *iface) {
ENTER_GL
();
glDeleteTextures
(
1
,
&
This
->
glDescription
.
textureName
);
This
->
glDescription
.
textureName
=
0
;
glDeleteTextures
(
1
,
&
This
->
glDescription
.
srgbTextureName
);
This
->
glDescription
.
srgbTextureName
=
0
;
LEAVE_GL
();
}
else
{
IWineD3DBaseTexture_Release
(
texture
);
...
...
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