[PATCH 1/2] wined3d: Set palettes on the swapchain (v2).

Stefan Dösinger stefandoesinger at gmail.com
Tue May 20 15:02:00 CDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 2014-05-20 17:17, schrieb Henri Verbeet:
> I don't think we need that since afaik we should never do RGBA ->
> P8 blits / presents. But even then, does this even work for
> swapchain surfaces? I'd expect the alpha channel to just be lost.
I'm not sure what you mean with RGBA -> P8 blits. Those never worked,
and I don't expect them to do anything reasonable on Windows.

But still I think you're right and it is safe to remove this code.
What we needed this for is reading back P8 drawables that were
converted to RGBA, and since 7b049245 that's only the front buffer. If
the conversion is done with the shader we have the unmodified ALPHA8
texture. Otherwise we set SFLAG_CONVERTED and never free sysmem and
don't do GL-side blits. (Ddraw will never read back the front buffer,
but wined3d doesn't know that.)

Re GDI presents: A HPALETTE attached to the device context doesn't do
anything, as expected. If I understand GDI palette handling correctly,
the attached palette only matters when drawing to a device context
that has a palette-indexed bitmap / window attached, but not when
reading from it. The DIB color table determines the color values
produced when reading from a palette-indexed DIB section.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJTe7S4AAoJEN0/YqbEcdMw8NYP/RKLq9SeHO3wBZJ2QFR0T0KC
ImlURVQRiRVgtZyuBDSLolnSy3OMVODFis8fc1M+12jMV9pLsXCvEr/RSZtfLCJP
xuYSIK4Ih5OmJcWWYgW3fYzNVHdSb5JLTvTVNpGpMFGXSKVDBXcXO8+J6Pb5oGHi
Yg1wDiZk/4256V3OMA50Hm2Joby2U0e3YcmU4RbnhKkasOaok1qi5h8pgfzz0HlJ
R9oS1ylOWjVBkqyXxsCnj8Gth1IuLtd+I3OkLHDZwNKpS8wS9crFwB4bfsVg8r6I
TM6Eh1iBXGAg/hOc4v3bgJedWVODSNOq6P7NYSe2joWRhz8rtGRtHxXQmKeok0ee
i7P/hCoxiRCKPhKbPVxyLBoWOphFT1eduHq+FOXDPoiiT5X+yIzm/mqrTntOqP3w
HhV5oPeTvHFAp6cStygC1Ae5dD8TNN2JVidy/cfnO9Wbfbf0HdUut6c48a5T6mnH
MAf0mhELZviAp8m1qpRKi1HhJrAzekc8vJNuEvYVIWejlSICzGzCIGrbpBKPQcu1
I24vzMwtVhd9YLtDxVxAEvRMA1ysQz11AqiIhc2aLpmtYuneP0g3H3LnPdgWk6OX
3aA0d3Z0tNwQuqblPex3KfH6JIoKqGjG0w8vd0hyI4gxeq8W2egUG6IMSiRKk8H1
oOPGdc57O4CAEym7FGRz
=VaAq
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list