wined3d: Require FBO attachability for render targets and depth stencils.
This commit is contained in:
parent
04c3c97072
commit
28af7b407b
|
@ -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},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue