WineD3D: paletted texture emulation using fragment shaders

Stefan Dösinger stefan at codeweavers.com
Sun Dec 17 06:08:33 CST 2006


Am Sonntag 17 Dezember 2006 05:06 schrieb H. Verbeet:
> On 17/12/06, Chris Robinson <chris.kcat at gmail.com> wrote:
> > Won't this break for programs that attempt to use paletted textures and
> > fragment shaders itself?
>
> For ddraw that won't be an issue, but in case of d3d I think it will,
> even if the game isn't using fragment shaders itself. Calls to
> DrawPrimitive will (re)bind the proper vertex / fragment shaders,
> which would effectively disable the surface conversion.
>
> AFAIK this patch is aimed at ddraw blits with 8-bit paletted surfaces,
> where this would of course work just fine, but code that gets called
Yeah, this will only work for 2D Blits, not for 3D drawing. Even if the app 
doesn't use pixel shaders we would need a full fragment pipeline replacement 
I think.

Games that use fragment shaders and 8 bit textures at the same time should be 
pretty rare, as directx drivers dropped 8 bit support long ago. I think we 
should remove the advertisement for WINED3DFMT_P8 if the texture palette 
extension isn't available for directx8 and directx9, even though we support 
those formats. Even though the emulation via manual unpacking works, it needs 
4 times the video memory, and CPU time for unpacking. Games will fall back to 
a 16 bit texture usually. They have to deal with a lack of that format on 
windows too.

We should keep advertising it for DirectX7 and below games. Afaik all cards 
that were out when these games were written had support for P8 (well, the 
ddraw format that represents D3DFMT_P8). And if a dx8/9 game tries to use P8, 
then this should succeed, with just beeing inefficient in terms of vidmem 
usage.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20061217/ed21018c/attachment.pgp


More information about the wine-devel mailing list