wined3d: Immediately return on redundant changes in IWineD3DDeviceImpl_SetDepthStencilSurface().
This commit is contained in:
parent
5056fd309d
commit
fb189b39a9
|
@ -5913,9 +5913,9 @@ 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 (((IWineD3DSwapChainImpl *)This->swapchains[0])->presentParms.Flags & WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL
|
||||
|
@ -5938,13 +5938,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDepthStencilSurface(IWineD3DDevice *
|
|||
if (This->depth_stencil) IWineD3DSurface_AddRef((IWineD3DSurface *)This->depth_stencil);
|
||||
if (tmp) IWineD3DSurface_Release((IWineD3DSurface *)tmp);
|
||||
|
||||
if((!tmp && pNewZStencil) || (!pNewZStencil && 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_STENCILENABLE));
|
||||
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_STENCILWRITEMASK));
|
||||
}
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue