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
35b9d3db
Commit
35b9d3db
authored
Aug 17, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Release the previous render target only after replacing it in…
wined3d: Release the previous render target only after replacing it in IWineD3DDeviceImpl_SetRenderTarget().
parent
125321d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
device.c
dlls/wined3d/device.c
+7
-5
No files found.
dlls/wined3d/device.c
View file @
35b9d3db
...
@@ -5704,6 +5704,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
...
@@ -5704,6 +5704,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
DWORD
render_target_idx
,
IWineD3DSurface
*
render_target
,
BOOL
set_viewport
)
DWORD
render_target_idx
,
IWineD3DSurface
*
render_target
,
BOOL
set_viewport
)
{
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DSurfaceImpl
*
prev
;
TRACE
(
"iface %p, render_target_idx %u, render_target %p, set_viewport %#x.
\n
"
,
TRACE
(
"iface %p, render_target_idx %u, render_target %p, set_viewport %#x.
\n
"
,
iface
,
render_target_idx
,
render_target
,
set_viewport
);
iface
,
render_target_idx
,
render_target
,
set_viewport
);
...
@@ -5714,7 +5715,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
...
@@ -5714,7 +5715,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
}
}
if
(
render_target
==
(
IWineD3DSurface
*
)
device
->
render_targets
[
render_target_idx
])
prev
=
device
->
render_targets
[
render_target_idx
];
if
(
render_target
==
(
IWineD3DSurface
*
)
prev
)
{
{
TRACE
(
"Trying to do a NOP SetRenderTarget operation.
\n
"
);
TRACE
(
"Trying to do a NOP SetRenderTarget operation.
\n
"
);
return
WINED3D_OK
;
return
WINED3D_OK
;
...
@@ -5733,11 +5735,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
...
@@ -5733,11 +5735,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
}
}
if
(
render_target
)
if
(
render_target
)
IWineD3DSurface_AddRef
(
render_target
);
IWineD3DSurface_AddRef
(
render_target
);
if
(
device
->
render_targets
[
render_target_idx
])
IWineD3DSurface_Release
((
IWineD3DSurface
*
)
device
->
render_targets
[
render_target_idx
]);
device
->
render_targets
[
render_target_idx
]
=
(
IWineD3DSurfaceImpl
*
)
render_target
;
device
->
render_targets
[
render_target_idx
]
=
(
IWineD3DSurfaceImpl
*
)
render_target
;
/* Release after the assignment, to prevent device_resource_released()
* from seeing the surface as still in use. */
if
(
prev
)
IWineD3DSurface_Release
((
IWineD3DSurface
*
)
prev
);
/* Render target 0 is special. */
/* Render target 0 is special. */
if
(
!
render_target_idx
&&
set_viewport
)
if
(
!
render_target_idx
&&
set_viewport
)
...
...
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