On Mon, Apr 5, 2010 at 9:52 PM, Stefan Dösinger <[email protected]> wrote: > > Am 05.04.2010 um 20:05 schrieb Roderick Colenbrander: >> - IWineD3DDeviceImpl *device = This->resource.device; >> - if((This->resource.usage & WINED3DUSAGE_RENDERTARGET) && >> - >> device->blitter->color_fixup_supported(&device->adapter->gl_info, >> This->resource.format_desc->color_fixup)) >> + if(This->resource.usage & WINED3DUSAGE_RENDERTARGET) > It's a problem with the existing code, but checking the usage here doesn't > make much sense. It should check if the surface is a front buffer on any > swapchain(or, as long as we store a P8 surface as ARGB in GL this code also > applies to backbuffers) >
There are some other places which do the same (both P8 and other code). It might be nice to rewrite it e.g. using the p8_primary_render_target call or so perhaps something more generic. In case of DDraw (without P8 textures) we seem to set WINED3DUSAGE_RENDERTARGET only for the primary surface on the ddraw side though. Would you mind if I rewrote this part at a later stage? It isn't that critical right now. I mainly rewrote it to get is_color_fixup_supported out of the way and it also fixed bugs. If you want I could add a 'TODO' comment, so that it won't be forgotten. Roderick
