2009/7/6 Stefan Dösinger stefan@codeweavers.com:
Subject: [PATCH] WineD3D: Make context_attach_surface_fbo fbo aware
I hope you meant "sRGB" there.
context_apply_attachment_filter_states((IWineD3DDevice *)This, surface, TRUE);
GL_EXTCALL(glFramebufferTexture2DEXT(fbo_target, GL_COLOR_ATTACHMENT0_EXT + idx, surface_impl->glDescription.target,
surface_impl->glDescription.textureName, surface_impl->glDescription.level));
switch(srgb)
{
case SRGB_BOTH:
ERR("SRGB_BOTH fbo attachment requested\n");
/* drop through */
case SRGB_SRGB:
GL_EXTCALL(glFramebufferTexture2DEXT(fbo_target, GL_COLOR_ATTACHMENT0_EXT > + idx, surface_impl->glDescription.target,
surface_impl->glDescription.srgbTextureName, surface_impl->glDescription.level));
break;
case SRGB_ANY: /* TODO: Keep track of the last use */
case SRGB_RGB:
GL_EXTCALL(glFramebufferTexture2DEXT(fbo_target, GL_COLOR_ATTACHMENT0_EXT > + idx, surface_impl->glDescription.target,
surface_impl->glDescription.textureName, surface_impl->glDescription.level));
break;
}
I don't think SRGB_BOTH and SRGB_ANY make sense here. I also don't think this can work like this, context_apply_attachment_filter_states() needs to be aware of which texture was requested.
Am Monday 06 July 2009 23:05:08 schrieb Henri Verbeet:
I don't think SRGB_BOTH and SRGB_ANY make sense here. I also don't think this can work like this, context_apply_attachment_filter_states() needs to be aware of which texture was requested.
I plan to use SRGB_ANY to redirect rendering to the sRGB copy in some cases(e.g. the app samples from the sRGB copy). So it isn't used in this patchset yet(hence the TODO), but I'll use it later.
I'll check the context_apply_attachment_filter_states call.