=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: wined3d: Require FBO attachability for render targets and depth stencils.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jun 9 08:25:53 CDT 2015
Module: wine
Branch: master
Commit: 28af7b407bb926953a73c373eb536449d1110e82
URL: http://source.winehq.org/git/wine.git/?a=commit;h=28af7b407bb926953a73c373eb536449d1110e82
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Tue Jun 9 09:28:08 2015 +0200
wined3d: Require FBO attachability for render targets and depth stencils.
---
dlls/wined3d/resource.c | 7 +++++++
dlls/wined3d/utils.c | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 7818deb..1891165 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -114,6 +114,13 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
WARN("Format %s cannot be used for depth/stencil buffers.\n", debug_d3dformat(format->id));
continue;
}
+ if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
+ && usage & (WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_DEPTHSTENCIL)
+ && !(format->flags[gl_type] & WINED3DFMT_FLAG_FBO_ATTACHABLE))
+ {
+ WARN("Render target or depth stencil is not FBO attachable.\n");
+ continue;
+ }
if ((usage & WINED3DUSAGE_TEXTURE) && !(format->flags[gl_type] & WINED3DFMT_FLAG_TEXTURE))
{
WARN("Format %s cannot be used for texturing.\n", debug_d3dformat(format->id));
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index a3c3def..687d3d7 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -1282,7 +1282,7 @@ static const struct wined3d_format_texture_info format_texture_info[] =
ARB_FRAMEBUFFER_OBJECT, NULL},
{WINED3DFMT_NULL, 0, 0, 0,
GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, 0,
- WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET,
+ WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_FBO_ATTACHABLE,
ARB_FRAMEBUFFER_OBJECT, NULL},
};
More information about the wine-cvs
mailing list