[1/5] d3d8: Never announce support for palettized textures
hverbeet at gmail.com
Mon Oct 10 03:20:15 CDT 2011
On 9 October 2011 17:31, Stefan Dösinger <stefan at codeweavers.com> wrote:
>> - I can't say I find e.g. sprinkling d3dformat_is_palettized() over
>> the code particularly elegant.
> I suppose I could check for it in IDirect3DDevice8Impl_CreateSurface(and the
> d3d9 equivalent), if all calls that create surfaces run through it.
>> - Do you have tests for the D3DERR_INVALIDCALL returns?
> I tested that and Windows returns D3D_OK. Windows also allows creating P8
> offscreen plain surfaces, and it allows StretchRect operations between those
> surfaces. It doesn't allow StretchRect operations between P8 and non-
> Palettized surfaces. In the end I could not find any way to make use of those
> surfaces I could create.
> I prefer to return INVALIDCALL over the half-baked implementation Windows has
> to find applications that try to use P8 surfaces in a way I may have missed.
It's not really clear to me that refusing to create P8 surfaces in
d3d8/9 really gains us much, or that it's really a prerequisite for
the other patches. If you want to go that way though, you should
probably just map D3DFORMAT_P8 to something that's not
WINED3DFMT_P8_UINT, perhaps WINED3DFMT_UNSUPPORTED, and just let
wined3d fail resource creation.
More information about the wine-devel