Henri Verbeet : wined3d: Allow color fills on FBO attachable surfaces in ffp_blit_supported().

Alexandre Julliard julliard at winehq.org
Mon Aug 22 13:29:07 CDT 2011


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Sun Aug 21 21:34:56 2011 +0200

wined3d: Allow color fills on FBO attachable surfaces in ffp_blit_supported().

---

 dlls/wined3d/surface.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 8412aa5..d7d65fb 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -6367,12 +6367,20 @@ static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info, enum wined
             return FALSE;
 
         case WINED3D_BLIT_OP_COLOR_FILL:
-            if (!(dst_usage & WINED3DUSAGE_RENDERTARGET))
+            if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
+            {
+                if (!((dst_format->flags & WINED3DFMT_FLAG_FBO_ATTACHABLE) || (dst_usage & WINED3DUSAGE_RENDERTARGET)))
+                    return FALSE;
+            }
+            else if (!(dst_usage & WINED3DUSAGE_RENDERTARGET))
             {
                 TRACE("Color fill not supported\n");
                 return FALSE;
             }
 
+            /* FIXME: We should reject color fills on formats with fixups,
+             * but this would break P8 color fills for example. */
+
             return TRUE;
 
         case WINED3D_BLIT_OP_DEPTH_FILL:




More information about the wine-cvs mailing list