Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
43a86d1e
Commit
43a86d1e
authored
Aug 04, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Cleanup Get/SetDepthStencilSurface().
parent
009cd78f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
device.c
dlls/wined3d/device.c
+17
-16
No files found.
dlls/wined3d/device.c
View file @
43a86d1e
...
...
@@ -5688,18 +5688,18 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetFrontBackBuffers(IWineD3DDevice *ifa
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetDepthStencilSurface
(
IWineD3DDevice
*
iface
,
IWineD3DSurface
**
ppZStencilSurface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
*
ppZStencilSurface
=
(
IWineD3DSurface
*
)
This
->
depth_stencil
;
TRACE
(
"(%p) : zStencilSurface returning %p
\n
"
,
This
,
*
ppZStencilSurface
);
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetDepthStencilSurface
(
IWineD3DDevice
*
iface
,
IWineD3DSurface
**
depth_stencil
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
if
(
*
ppZStencilSurface
!=
NULL
)
{
/* Note inc ref on returned surface */
IWineD3DSurface_AddRef
(
*
ppZStencilSurface
);
return
WINED3D_OK
;
}
else
{
return
WINED3DERR_NOTFOUND
;
}
TRACE
(
"iface %p, depth_stencil %p.
\n
"
,
iface
,
depth_stencil
);
*
depth_stencil
=
(
IWineD3DSurface
*
)
device
->
depth_stencil
;
TRACE
(
"Returning depth/stencil surface %p.
\n
"
,
*
depth_stencil
);
if
(
!*
depth_stencil
)
return
WINED3DERR_NOTFOUND
;
IWineD3DSurface_AddRef
(
*
depth_stencil
);
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetRenderTarget
(
IWineD3DDevice
*
iface
,
...
...
@@ -5765,13 +5765,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetDepthStencilSurface
(
IWineD3DDevice
*
iface
,
IWineD3DSurface
*
pNewZStencil
)
{
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetDepthStencilSurface
(
IWineD3DDevice
*
iface
,
IWineD3DSurface
*
depth_stencil
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DSurfaceImpl
*
tmp
;
TRACE
(
"device %p, depth_stencil %p, old depth_stencil %p.
\n
"
,
This
,
pNewZS
tencil
,
This
->
depth_stencil
);
TRACE
(
"device %p, depth_stencil %p, old depth_stencil %p.
\n
"
,
This
,
depth_s
tencil
,
This
->
depth_stencil
);
if
(
This
->
depth_stencil
==
(
IWineD3DSurfaceImpl
*
)
pNewZS
tencil
)
if
(
This
->
depth_stencil
==
(
IWineD3DSurfaceImpl
*
)
depth_s
tencil
)
{
TRACE
(
"Trying to do a NOP SetRenderTarget operation.
\n
"
);
return
WINED3D_OK
;
...
...
@@ -5794,11 +5795,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDepthStencilSurface(IWineD3DDevice *
}
tmp
=
This
->
depth_stencil
;
This
->
depth_stencil
=
(
IWineD3DSurfaceImpl
*
)
pNewZS
tencil
;
This
->
depth_stencil
=
(
IWineD3DSurfaceImpl
*
)
depth_s
tencil
;
if
(
This
->
depth_stencil
)
IWineD3DSurface_AddRef
((
IWineD3DSurface
*
)
This
->
depth_stencil
);
if
(
tmp
)
IWineD3DSurface_Release
((
IWineD3DSurface
*
)
tmp
);
if
((
!
tmp
&&
pNewZStencil
)
||
(
!
pNewZS
tencil
&&
tmp
))
if
((
!
tmp
&&
depth_stencil
)
||
(
!
depth_s
tencil
&&
tmp
))
{
/* Swapping NULL / non NULL depth stencil affects the depth and tests */
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_ZENABLE
));
...
...
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