From 56428c638650b39fc37b100af1d67acc0f96a559 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Sun, 21 Aug 2011 21:34:52 +0200 Subject: [PATCH] wined3d: Reuse convert_a8r8g8b8_x8r8g8b8() for B8G8R8X8 -> B8G8R8A8 conversions. --- dlls/wined3d/surface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 8e720dd69eb..88e8a1dbd0b 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}, };