Paul Gofman : wined3d: Check if destination texture is FBO attachable in glsl_blitter_supported( ).

Alexandre Julliard julliard at winehq.org
Mon May 6 15:38:50 CDT 2019


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

Author: Paul Gofman <gofmanp at gmail.com>
Date:   Mon May  6 13:25:30 2019 +0300

wined3d: Check if destination texture is FBO attachable in glsl_blitter_supported().

If the destination texture is not FBO attachable GLSL blitter does not work
for it unless backbuffer is used as offscreen rendering mode.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47121
Signed-off-by: Paul Gofman <gofmanp at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/glsl_shader.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 47eb6f2..6493e7f 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -13193,6 +13193,14 @@ static BOOL glsl_blitter_supported(enum wined3d_blit_op blit_op, const struct wi
         return FALSE;
     }
 
+    if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
+            && !((dst_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_FBO_ATTACHABLE)
+            || (dst_resource->bind_flags & WINED3D_BIND_RENDER_TARGET)))
+    {
+        TRACE("Destination texture is not FBO attachable.\n");
+        return FALSE;
+    }
+
     TRACE("Returning supported.\n");
     return TRUE;
 }




More information about the wine-cvs mailing list