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
fb189b39
Commit
fb189b39
authored
Apr 19, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Immediately return on redundant changes in IWineD3DDeviceImpl_SetDepthStencilSurface().
parent
5056fd30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
device.c
dlls/wined3d/device.c
+25
-25
No files found.
dlls/wined3d/device.c
View file @
fb189b39
...
...
@@ -5913,37 +5913,37 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDepthStencilSurface(IWineD3DDevice *
if
(
This
->
depth_stencil
==
(
IWineD3DSurfaceImpl
*
)
pNewZStencil
)
{
TRACE
(
"Trying to do a NOP SetRenderTarget operation.
\n
"
);
return
WINED3D_OK
;
}
else
if
(
This
->
depth_stencil
)
{
if
(
This
->
depth_stencil
)
if
(((
IWineD3DSwapChainImpl
*
)
This
->
swapchains
[
0
])
->
presentParms
.
Flags
&
WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL
||
This
->
depth_stencil
->
Flags
&
SFLAG_DISCARD
)
{
if
(((
IWineD3DSwapChainImpl
*
)
This
->
swapchains
[
0
])
->
presentParms
.
Flags
&
WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL
||
This
->
depth_stencil
->
Flags
&
SFLAG_DISCARD
)
{
surface_modify_ds_location
(
This
->
depth_stencil
,
SFLAG_DS_DISCARDED
);
}
else
{
struct
wined3d_context
*
context
=
context_acquire
(
This
,
(
IWineD3DSurface
*
)
This
->
render_targets
[
0
],
CTXUSAGE_RESOURCELOAD
);
surface_load_ds_location
(
This
->
depth_stencil
,
context
,
SFLAG_DS_OFFSCREEN
);
surface_modify_ds_location
(
This
->
depth_stencil
,
SFLAG_DS_OFFSCREEN
);
context_release
(
context
);
}
surface_modify_ds_location
(
This
->
depth_stencil
,
SFLAG_DS_DISCARDED
);
}
else
{
struct
wined3d_context
*
context
=
context_acquire
(
This
,
(
IWineD3DSurface
*
)
This
->
render_targets
[
0
],
CTXUSAGE_RESOURCELOAD
);
surface_load_ds_location
(
This
->
depth_stencil
,
context
,
SFLAG_DS_OFFSCREEN
);
surface_modify_ds_location
(
This
->
depth_stencil
,
SFLAG_DS_OFFSCREEN
);
context_release
(
context
);
}
}
tmp
=
This
->
depth_stencil
;
This
->
depth_stencil
=
(
IWineD3DSurfaceImpl
*
)
pNewZStencil
;
if
(
This
->
depth_stencil
)
IWineD3DSurface_AddRef
((
IWineD3DSurface
*
)
This
->
depth_stencil
);
if
(
tmp
)
IWineD3DSurface_Release
((
IWineD3DSurface
*
)
tmp
);
tmp
=
This
->
depth_stencil
;
This
->
depth_stencil
=
(
IWineD3DSurfaceImpl
*
)
pNewZStencil
;
if
(
This
->
depth_stencil
)
IWineD3DSurface_AddRef
((
IWineD3DSurface
*
)
This
->
depth_stencil
);
if
(
tmp
)
IWineD3DSurface_Release
((
IWineD3DSurface
*
)
tmp
);
if
((
!
tmp
&&
pNewZStencil
)
||
(
!
pNewZStencil
&&
tmp
))
{
/* Swapping NULL / non NULL depth stencil affects the depth and tests */
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_ZENABLE
));
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_STENCIL
ENABLE
));
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_STENCILWRITEMASK
));
}
if
((
!
tmp
&&
pNewZStencil
)
||
(
!
pNewZStencil
&&
tmp
))
{
/* Swapping NULL / non NULL depth stencil affects the depth and tests */
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_Z
ENABLE
));
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_STENCILENABLE
));
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_STENCILWRITEMASK
));
}
return
WINED3D_OK
;
...
...
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