On 2 April 2010 13:49, Roderick Colenbrander thunderbird2k@gmail.com wrote:
This was a long mail (hope you can make sense of it). To summarize the P8 check in blit_supported is so ugly (and it might not work in all cases) for a part due to CheckSurfaceCapability and CheckDeviceFormat. I think that if I would kill the P8 texture support it might take away your concerns. While I would like to keep the problem as simple as possible I fear that some parts of d3dfmt_get_conv already need a rewrite at this point since it is starting to make life difficult. The main concern is how to perform surface conversion when needed and the color keying (though for that a special location flag could work as you suggested before).
Can't you handle P8 -> P8 blits as regular ARGB -> ARGB blits as long as you don't stretch? I.e., compared to this patch the main difference would be that you don't set the P8 -> ARGB shader at all in that case. This would be generic for all complex fixups as long as we don't stretch, and for simple / linear fixups even with stretching.
Only slightly related, I think it's reasonable to require non-NULL source / destination rectangles for internal interfaces. I.e., handle NULL rectangles in the public wined3d entry points, but just require them to be non-NULL everywhere else.