Commit 28af7b40 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Require FBO attachability for render targets and depth stencils.

parent 04c3c970
......@@ -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));
......
......@@ -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},
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment