[3/4] WineD3D: Perform the srgb copy with fbo_blit if possible
Henri Verbeet
hverbeet at gmail.com
Thu Sep 10 17:05:22 CDT 2009
2009/9/10 Stefan Dösinger <stefan at codeweavers.com>:
> + if (context->current_fbo) {
> + context_bind_fbo(context, GL_FRAMEBUFFER_EXT, &context->current_fbo->id);
> + } else {
> + context_bind_fbo(context, GL_FRAMEBUFFER_EXT, NULL);
> + }
This shouldn't be needed.
> + /* Need FBOs obviously */
> + if(wined3d_settings.offscreen_rendering_mode != ORM_FBO) return FALSE;
> + /* Need framebuffer blit */
> + if(!GL_SUPPORT(EXT_FRAMEBUFFER_BLIT)) return FALSE;
> + /* Need to be able to attach both RGB and sRGB copy */
> + if((fmt_flags & attach_flags) != attach_flags) return FALSE;
> + /* Need to be able to blit from and to my format */
> + if(!surface_can_stretch_rect(This, This)) return FALSE;
> + /* Need either RGB or sRGB copy up to date */
> + if((This->Flags & (SFLAG_INSRGBTEX | SFLAG_INTEXTURE)) == 0) return FALSE;That's redundant,
Some of those are redundant. A format is never FBO attachable if FBOs
are disabled, surface_can_stretch_rect() will already check for
regular attachment.
More information about the wine-devel
mailing list