H. Verbeet : wined3d: Use CTXUSAGE_RESOURCELOAD for ActivateContext() in color_fill_fbo().

Alexandre Julliard julliard at winehq.org
Mon Aug 4 08:53:43 CDT 2008


Module: wine
Branch: master
Commit: d28a310f9230a0d67b665d5854e4e1cab210670f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d28a310f9230a0d67b665d5854e4e1cab210670f

Author: H. Verbeet <hverbeet at gmail.com>
Date:   Sun Aug  3 21:17:57 2008 +0200

wined3d: Use CTXUSAGE_RESOURCELOAD for ActivateContext() in color_fill_fbo().

CTXUSAGE_CLEAR will apply the FBO state in a later patch.

---

 dlls/wined3d/device.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index ffe1cf3..cc1b448 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -6182,7 +6182,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface, CONS
 
         TRACE("Surface %p is onscreen\n", surface);
 
-        ActivateContext(This, surface, CTXUSAGE_CLEAR);
+        ActivateContext(This, surface, CTXUSAGE_RESOURCELOAD);
         ENTER_GL();
         GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0));
         buffer = surface_get_gl_buffer(surface, swapchain);
@@ -6191,7 +6191,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface, CONS
     } else {
         TRACE("Surface %p is offscreen\n", surface);
 
-        ActivateContext(This, This->lastActiveRenderTarget, CTXUSAGE_CLEAR);
+        ActivateContext(This, This->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
         ENTER_GL();
         bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->dst_fbo);
         attach_surface_fbo(This, GL_FRAMEBUFFER_EXT, 0, surface);
@@ -6211,6 +6211,10 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface, CONS
     } else {
         glDisable(GL_SCISSOR_TEST);
     }
+    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE));
+
+    glDisable(GL_BLEND);
+    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_ALPHABLENDENABLE));
 
     glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
     IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));




More information about the wine-cvs mailing list