wined3d: Support index in alpha in BltOverride colorfill codepath.
Fixes a failure in ddraw p8_primary_test when running with opengl ddraw renderer.
This commit is contained in:
parent
003f679cbe
commit
1c89795438
|
@ -3395,13 +3395,18 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
|
||||||
* 'clear' expect it in ARGB format => we need to do some conversion :-)
|
* 'clear' expect it in ARGB format => we need to do some conversion :-)
|
||||||
*/
|
*/
|
||||||
if (This->resource.format == WINED3DFMT_P8) {
|
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) {
|
if (This->palette) {
|
||||||
color = ((0xFF000000) |
|
color = (alpha |
|
||||||
(This->palette->palents[DDBltFx->u5.dwFillColor].peRed << 16) |
|
(This->palette->palents[DDBltFx->u5.dwFillColor].peRed << 16) |
|
||||||
(This->palette->palents[DDBltFx->u5.dwFillColor].peGreen << 8) |
|
(This->palette->palents[DDBltFx->u5.dwFillColor].peGreen << 8) |
|
||||||
(This->palette->palents[DDBltFx->u5.dwFillColor].peBlue));
|
(This->palette->palents[DDBltFx->u5.dwFillColor].peBlue));
|
||||||
} else {
|
} else {
|
||||||
color = 0xFF000000;
|
color = alpha;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (This->resource.format == WINED3DFMT_R5G6B5) {
|
else if (This->resource.format == WINED3DFMT_R5G6B5) {
|
||||||
|
|
Loading…
Reference in New Issue