[PATCH 6/8] wined3d: Require FBO attachability for render targets and depth stencils.

Stefan Dösinger stefan at codeweavers.com
Fri May 22 03:11:26 CDT 2015


---
 dlls/wined3d/texture.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 8184e6d..0466706 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1148,6 +1148,10 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
         required_flags |= WINED3DFMT_FLAG_TEXTURE;
     if (desc->usage & WINED3DUSAGE_RENDERTARGET)
         required_flags |= WINED3DFMT_FLAG_RENDERTARGET;
+    if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
+            && desc->usage & (WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_DEPTHSTENCIL))
+        required_flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE;
+
     /* WINED3DUSAGE_DEPTHSTENCIL needs WINED3DFMT_FLAG_DEPTH or WINED3DFMT_FLAG_STENCIL, not both. */
 
     if ((format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & required_flags) == required_flags
-- 
2.3.6




More information about the wine-patches mailing list