Commit 3f6c3d2d authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Properly handle the surface location in stretch_rect_fbo().

parent bf50e07f
...@@ -6318,6 +6318,9 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED ...@@ -6318,6 +6318,9 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
TRACE("Source surface %p is onscreen\n", src_surface); TRACE("Source surface %p is onscreen\n", src_surface);
ActivateContext(This, src_surface, CTXUSAGE_RESOURCELOAD); ActivateContext(This, src_surface, CTXUSAGE_RESOURCELOAD);
/* Make sure the drawable is up to date. In the offscreen case
* attach_surface_fbo() implicitly takes care of this. */
IWineD3DSurface_LoadLocation(src_surface, SFLAG_INDRAWABLE, NULL);
ENTER_GL(); ENTER_GL();
GL_EXTCALL(glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0)); GL_EXTCALL(glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0));
...@@ -6344,6 +6347,9 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED ...@@ -6344,6 +6347,9 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
TRACE("Destination surface %p is onscreen\n", dst_surface); TRACE("Destination surface %p is onscreen\n", dst_surface);
ActivateContext(This, dst_surface, CTXUSAGE_RESOURCELOAD); ActivateContext(This, dst_surface, CTXUSAGE_RESOURCELOAD);
/* Make sure the drawable is up to date. In the offscreen case
* attach_surface_fbo() implicitly takes care of this. */
IWineD3DSurface_LoadLocation(dst_surface, SFLAG_INDRAWABLE, NULL);
ENTER_GL(); ENTER_GL();
GL_EXTCALL(glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0)); GL_EXTCALL(glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0));
...@@ -6380,6 +6386,8 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED ...@@ -6380,6 +6386,8 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
checkGLcall("glBlitFramebuffer()"); checkGLcall("glBlitFramebuffer()");
} }
IWineD3DSurface_ModifyLocation(dst_surface, SFLAG_INDRAWABLE, TRUE);
if (This->render_offscreen) { if (This->render_offscreen) {
bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->fbo); bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->fbo);
} else { } else {
......
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