Alexander Dorofeyev : wined3d: Support index in alpha in BltOverride colorfill codepath.
Alexandre Julliard
julliard at winehq.org
Thu Apr 3 05:43:56 CDT 2008
Module: wine
Branch: master
Commit: 1c89795438894c3ee00606929fb7d091dfbaff59
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1c89795438894c3ee00606929fb7d091dfbaff59
Author: Alexander Dorofeyev <alexd4 at inbox.lv>
Date: Thu Apr 3 00:12:13 2008 +0300
wined3d: Support index in alpha in BltOverride colorfill codepath.
Fixes a failure in ddraw p8_primary_test when running with opengl ddraw renderer.
---
dlls/wined3d/surface.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index e7f7391..91bc419 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -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) {
More information about the wine-cvs
mailing list