Commit a2244051 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use context_attach_depth_stencil_fbo() to clear FBO depth attachments.

parent 13aea3a1
...@@ -1660,8 +1660,7 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU ...@@ -1660,8 +1660,7 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
ENTER_GL(); ENTER_GL();
context_bind_fbo((IWineD3DDevice *)This, GL_FRAMEBUFFER_EXT, &context->dst_fbo); context_bind_fbo((IWineD3DDevice *)This, GL_FRAMEBUFFER_EXT, &context->dst_fbo);
context_attach_surface_fbo(This, GL_FRAMEBUFFER_EXT, 0, target); context_attach_surface_fbo(This, GL_FRAMEBUFFER_EXT, 0, target);
GL_EXTCALL(glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 0)); context_attach_depth_stencil_fbo(This, GL_FRAMEBUFFER_EXT, NULL, FALSE);
checkGLcall("glFramebufferRenderbufferEXT");
LEAVE_GL(); LEAVE_GL();
} else { } else {
ENTER_GL(); ENTER_GL();
......
...@@ -6176,8 +6176,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface, ...@@ -6176,8 +6176,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface,
ENTER_GL(); ENTER_GL();
context_bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->activeContext->dst_fbo); context_bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->activeContext->dst_fbo);
context_attach_surface_fbo(This, GL_FRAMEBUFFER_EXT, 0, surface); context_attach_surface_fbo(This, GL_FRAMEBUFFER_EXT, 0, surface);
GL_EXTCALL(glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 0)); context_attach_depth_stencil_fbo(This, GL_FRAMEBUFFER_EXT, NULL, FALSE);
checkGLcall("glFramebufferRenderbufferEXT");
} }
if (rect) { if (rect) {
...@@ -6596,8 +6595,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED ...@@ -6596,8 +6595,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
context_attach_surface_fbo(This, GL_READ_FRAMEBUFFER_EXT, 0, src_surface); context_attach_surface_fbo(This, GL_READ_FRAMEBUFFER_EXT, 0, src_surface);
glReadBuffer(GL_COLOR_ATTACHMENT0_EXT); glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
checkGLcall("glReadBuffer()"); checkGLcall("glReadBuffer()");
GL_EXTCALL(glFramebufferRenderbufferEXT(GL_READ_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 0)); context_attach_depth_stencil_fbo(This, GL_READ_FRAMEBUFFER_EXT, NULL, FALSE);
checkGLcall("glFramebufferRenderbufferEXT");
} }
LEAVE_GL(); LEAVE_GL();
...@@ -6644,8 +6642,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED ...@@ -6644,8 +6642,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
context_attach_surface_fbo(This, GL_DRAW_FRAMEBUFFER_EXT, 0, dst_surface); context_attach_surface_fbo(This, GL_DRAW_FRAMEBUFFER_EXT, 0, dst_surface);
glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
checkGLcall("glDrawBuffer()"); checkGLcall("glDrawBuffer()");
GL_EXTCALL(glFramebufferRenderbufferEXT(GL_DRAW_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 0)); context_attach_depth_stencil_fbo(This, GL_DRAW_FRAMEBUFFER_EXT, NULL, FALSE);
checkGLcall("glFramebufferRenderbufferEXT");
} }
glDisable(GL_SCISSOR_TEST); glDisable(GL_SCISSOR_TEST);
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE)); IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment