On 11 October 2011 22:30, Stefan Dösinger stefan@codeweavers.com wrote:
- if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
- {
if (!((dst_format->flags & WINED3DFMT_FLAG_FBO_ATTACHABLE) || (dst_usage & WINED3DUSAGE_RENDERTARGET)))
return FALSE;
- }
- else if (!(dst_usage & WINED3DUSAGE_RENDERTARGET))
- {
return FALSE;
- }
This is redundant. Formats are never FBO-attachable if we don't have FBOs. It's not clear this is what you want either way though. This pretty much looks like a copy/paste from fbo_blit_supported(), and the WINED3DUSAGE_RENDERTARGET check there is to allow formats that don't have a FBO-attachable internal format, but were created with the rtInternal format (which should always be attachable). There's really no equivalent check for backbuffer ORM, it just renders something and hopes we can read it back.