Palettized ddraw surface patches

Stefan Dösinger stefandoesinger at
Sun Oct 9 08:12:19 CDT 2011


I'll start sending my patches for blitting palettized surfaces with opengl. 
There are quite a few patches and I won't send them all in one, so this mail 
shows where I am headed.

Palettized surfaces are in a bad shape right now, both in terms of code 
quality and functionality. My patches will not fix all issues because this 
would require a shadow frontbuffer in wined3d, and Henri and I agreed that this 
should wait until after Wine 1.4. However, my patches fix a number of issues 
and eliminate a lot of dead code and hacks.

Other work that needs to be done, but is separate from those patches:
*) Emulate color keying in the ARBfp fragment pipeline. That way the upload-
time color keying conversion can be limited to situations where shaders are 
not available and the alpha = 0.0 hack in patch 20 removed.

*) Finish the blit infrastructure cleanup. Mainly, get rid of the hardcoded 
arbfp_blit backend in wined3d_surface_blt, get rid of arbfp_blit_surface and 
the remains of IWineD3DSurfaceImpl_BltOverride.

*) Investigate if there's any point in P8 blitting with ATIfs and nvrc. The 
fixed function pipeline replacements would profit from proper 3D color keying, 
but that only works if we have blitters that can blit without color keying 
during texture upload.

*) Make overlays work properly again. The overlay tests work, but the d3d7 sdk 
samples refuse to run for some reason. With the GL ddraw renderer as default 
we can also look into games like Settlers 3 that use overlays to draw the 
mouse pointer.

@Henri and Matteo: The difference between this patchset and the one I sent you 
a few days ago is that my old patchset made onscreen surfaces as a whole a 
special case, while this one only has special handling for blits to onscreen 
surfaces. The new way needs less infrastructure changes, works better with 
palette changes and is a lot closer to how things should work with a shadow 
frontbuffer in wined3d.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: p8.tar.bz2
Type: application/x-bzip-compressed-tar
Size: 22226 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the wine-devel mailing list