[PATCH 5/5] Rename color_fixup_supported to blit_supported support and add additional checks.

Roderick Colenbrander thunderbird2k at gmail.com
Fri Apr 2 15:49:05 CDT 2010


On Fri, Apr 2, 2010 at 3:24 PM, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 2 April 2010 13:49, Roderick Colenbrander <thunderbird2k at 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.
>

P8 -> P8 blits could be handled as ARGB->ARGB blits. Another
alternative would be to disable opengl p8->p8 blits and perform the
blit in software. It would then follow the same route as LockRect
through LoadLocation. I would say that a software blit is more
efficient than a software P8->ARGB conversion but if the app doesn't
reload the source contents frequently, it would be more efficient if
it stays on the GL side. This is more a ddraw-gl redesign point. In
games like Jedi Knight, C&C and others this would save a lot of
framebuffer read backs if GL is used.

Regarding the non-NULL rects it is what I'm trying to move to.
BltOverride doesn't really rely on it anymore (the surface_get_rect
lines can be moved back to its callers).

Roderick

Roderick



More information about the wine-devel mailing list