Commit 1c897954 authored by Alexander Dorofeyev's avatar Alexander Dorofeyev Committed by Alexandre Julliard

wined3d: Support index in alpha in BltOverride colorfill codepath.

Fixes a failure in ddraw p8_primary_test when running with opengl ddraw renderer.
parent 003f679c
......@@ -3395,13 +3395,18 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
* 'clear' expect it in ARGB format => we need to do some conversion :-)
*/
if (This->resource.format == WINED3DFMT_P8) {
DWORD alpha;
if (primary_render_target_is_p8(myDevice)) alpha = DDBltFx->u5.dwFillColor << 24;
else alpha = 0xFF000000;
if (This->palette) {
color = ((0xFF000000) |
color = (alpha |
(This->palette->palents[DDBltFx->u5.dwFillColor].peRed << 16) |
(This->palette->palents[DDBltFx->u5.dwFillColor].peGreen << 8) |
(This->palette->palents[DDBltFx->u5.dwFillColor].peBlue));
} else {
color = 0xFF000000;
color = alpha;
}
}
else if (This->resource.format == WINED3DFMT_R5G6B5) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment