From: Connor McAdams cmcadams@codeweavers.com
Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/d3dx9_36/surface.c | 4 ++-- dlls/d3dx9_36/tests/surface.c | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 3a6b8b78ebf..4786b29bfe3 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -2459,7 +2459,7 @@ static void convert_argb_pixel(const uint8_t *src_ptr, const struct pixel_format get_relevant_argb_components(ck_conv_info, src_ptr, channels); ck_pixel = make_argb_color(ck_conv_info, channels); if (ck_pixel == color_key) - val &= ~conv_info->destmask[0]; + val = 0; } memcpy(dst_ptr, &val, dst_fmt->bytes_per_pixel); } @@ -2476,7 +2476,7 @@ static void convert_argb_pixel(const uint8_t *src_ptr, const struct pixel_format
format_from_d3dx_color(ck_format, &tmp, (BYTE *)&ck_pixel); if (ck_pixel == color_key) - tmp.value.w = 0.0f; + tmp.value.x = tmp.value.y = tmp.value.z = tmp.value.w = 0.0f; }
color = tmp; diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index 8c657b702a1..7bc52914184 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c @@ -2219,20 +2219,16 @@ static void test_color_key(void) /* Same color key as before except the alpha channel is set. */ { D3DFMT_R8G8B8, { 0, 0, 4, 4 }, r8g8b8_4_4, r8g8b8_4_4_expected, 0xff008080, - .todo = TRUE }, /* Color key on a palette. */ { D3DFMT_P8, { 0, 0, 4, 4 }, p8_4_4, p8_4_4_expected, 0xf0c0c000, - .todo = TRUE }, { D3DFMT_A8P8, { 0, 0, 4, 4 }, a8p8_4_4, a8p8_4_4_expected, 0x10c0c000, - .todo = TRUE }, { D3DFMT_A32B32G32R32F, { 0, 0, 4, 4 }, a32r32g32b32_4_4, a32r32g32b32_4_4_expected, 0xffff0000, - .todo = TRUE }, /* 5. */ /* @@ -2250,7 +2246,6 @@ static void test_color_key(void) /* Alpha channel factors into the color key check. */ { D3DFMT_A8R8G8B8, { 0, 0, 4, 4 }, a8r8g8b8_4_4, a8r8g8b8_4_4_expected, 0x8000ff00, - .todo = TRUE }, { D3DFMT_A8R8G8B8, { 0, 0, 4, 4 }, a8r8g8b8_4_4, a8r8g8b8_4_4, 0x0000ff00, @@ -2324,7 +2319,7 @@ static void test_color_key(void) } IDirect3DSurface9_UnlockRect(surf);
- todo_wine ok(!mismatch_count, "Unexpected number of mismatched lines %u.\n", mismatch_count); + todo_wine_if(sizeof(void *) == 4) ok(!mismatch_count, "Unexpected number of mismatched lines %u.\n", mismatch_count);
/* * Trying to use D3DX_FILTER_SRGB_IN with a color key results in