From: Stefan Dösinger Subject: [PATCH 6/8] wined3d: Require FBO attachability for render targets and depth stencils. Message-Id: <1432282288-18626-6-git-send-email-stefan@codeweavers.com> Date: Fri, 22 May 2015 10:11:26 +0200 --- 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