Henri Verbeet : wined3d: Reuse convert_a8r8g8b8_x8r8g8b8() for B8G8R8X8 -> B8G8R8A8 conversions.
Alexandre Julliard
julliard at winehq.org
Mon Aug 22 13:29:07 CDT 2011
Module: wine
Branch: master
Commit: 56428c638650b39fc37b100af1d67acc0f96a559
URL: http://source.winehq.org/git/wine.git/?a=commit;h=56428c638650b39fc37b100af1d67acc0f96a559
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Sun Aug 21 21:34:52 2011 +0200
wined3d: Reuse convert_a8r8g8b8_x8r8g8b8() for B8G8R8X8 -> B8G8R8A8 conversions.
---
dlls/wined3d/surface.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 8e720dd..88e8a1d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3199,6 +3199,8 @@ static void convert_r5g6b5_x8r8g8b8(const BYTE *src, BYTE *dst,
}
}
+/* We use this for both B8G8R8A8 -> B8G8R8X8 and B8G8R8X8 -> B8G8R8A8, since
+ * in both cases we're just setting the X / Alpha channel to 0xff. */
static void convert_a8r8g8b8_x8r8g8b8(const BYTE *src, BYTE *dst,
DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h)
{
@@ -3317,6 +3319,7 @@ static const struct d3dfmt_convertor_desc convertors[] =
{WINED3DFMT_R32_FLOAT, WINED3DFMT_R16_FLOAT, convert_r32_float_r16_float},
{WINED3DFMT_B5G6R5_UNORM, WINED3DFMT_B8G8R8X8_UNORM, convert_r5g6b5_x8r8g8b8},
{WINED3DFMT_B8G8R8A8_UNORM, WINED3DFMT_B8G8R8X8_UNORM, convert_a8r8g8b8_x8r8g8b8},
+ {WINED3DFMT_B8G8R8X8_UNORM, WINED3DFMT_B8G8R8A8_UNORM, convert_a8r8g8b8_x8r8g8b8},
{WINED3DFMT_YUY2, WINED3DFMT_B8G8R8X8_UNORM, convert_yuy2_x8r8g8b8},
{WINED3DFMT_YUY2, WINED3DFMT_B5G6R5_UNORM, convert_yuy2_r5g6b5},
};
More information about the wine-cvs
mailing list