wined3d: Move location loading and modification together in IWineD3DDeviceImpl_ClearSurface().
This commit is contained in:
parent
dc67164d0d
commit
4f004a5565
|
@ -4431,6 +4431,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
|
||||||
DWORD location = context->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN;
|
DWORD location = context->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN;
|
||||||
if (!(depth_stencil->Flags & location) && !is_full_clear(depth_stencil, vp, scissor_rect, clear_rect))
|
if (!(depth_stencil->Flags & location) && !is_full_clear(depth_stencil, vp, scissor_rect, clear_rect))
|
||||||
surface_load_ds_location(depth_stencil, context, location);
|
surface_load_ds_location(depth_stencil, context, location);
|
||||||
|
surface_modify_ds_location(depth_stencil, location);
|
||||||
|
|
||||||
glDepthMask(GL_TRUE);
|
glDepthMask(GL_TRUE);
|
||||||
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_ZWRITEENABLE));
|
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_ZWRITEENABLE));
|
||||||
|
@ -4441,6 +4442,8 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
|
||||||
|
|
||||||
if (Flags & WINED3DCLEAR_TARGET)
|
if (Flags & WINED3DCLEAR_TARGET)
|
||||||
{
|
{
|
||||||
|
IWineD3DSurface_ModifyLocation((IWineD3DSurface *)target, SFLAG_INDRAWABLE, TRUE);
|
||||||
|
|
||||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||||
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
|
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
|
||||||
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_COLORWRITEENABLE1));
|
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_COLORWRITEENABLE1));
|
||||||
|
@ -4507,16 +4510,6 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Flags & WINED3DCLEAR_TARGET)
|
|
||||||
{
|
|
||||||
IWineD3DSurface_ModifyLocation((IWineD3DSurface *)target, SFLAG_INDRAWABLE, TRUE);
|
|
||||||
}
|
|
||||||
if (Flags & WINED3DCLEAR_ZBUFFER) {
|
|
||||||
/* Note that WINED3DCLEAR_ZBUFFER implies a depth stencil exists on the device */
|
|
||||||
DWORD location = context->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN;
|
|
||||||
surface_modify_ds_location(depth_stencil, location);
|
|
||||||
}
|
|
||||||
|
|
||||||
LEAVE_GL();
|
LEAVE_GL();
|
||||||
|
|
||||||
if (wined3d_settings.strict_draw_ordering || ((target->Flags & SFLAG_SWAPCHAIN)
|
if (wined3d_settings.strict_draw_ordering || ((target->Flags & SFLAG_SWAPCHAIN)
|
||||||
|
|
Loading…
Reference in New Issue