diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 35e3783bfbc..832caa5b448 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4321,7 +4321,7 @@ void surface_translate_drawable_coords(const struct wined3d_surface *surface, HW } static void surface_blt_to_drawable(const struct wined3d_device *device, - enum wined3d_texture_filter_type filter, BOOL color_key, + enum wined3d_texture_filter_type filter, BOOL alpha_test, struct wined3d_surface *src_surface, const RECT *src_rect_in, struct wined3d_surface *dst_surface, const RECT *dst_rect_in) { @@ -4348,7 +4348,7 @@ static void surface_blt_to_drawable(const struct wined3d_device *device, device->blitter->set_shader(device->blit_priv, context, src_surface); - if (color_key) + if (alpha_test) { gl_info->gl_ops.gl.p_glEnable(GL_ALPHA_TEST); checkGLcall("glEnable(GL_ALPHA_TEST)"); @@ -4372,7 +4372,7 @@ static void surface_blt_to_drawable(const struct wined3d_device *device, draw_textured_quad(src_surface, context, &src_rect, &dst_rect, filter); - if (color_key) + if (alpha_test) { gl_info->gl_ops.gl.p_glDisable(GL_ALPHA_TEST); checkGLcall("glDisable(GL_ALPHA_TEST)"); @@ -4571,7 +4571,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE src_surface->container->color_key_flags &= ~WINEDDSD_CKSRCBLT; } - surface_blt_to_drawable(device, filter, flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE), + surface_blt_to_drawable(device, filter, + flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_ALPHATEST), src_surface, src_rect, dst_surface, dst_rect); /* Restore the color key parameters */ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 40fabc6ebaa..0e7d79fea26 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -432,7 +432,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT RECT rect = {0, 0, src_surface->resource.width, src_surface->resource.height}; /* Blit the logo into the upper left corner of the drawable. */ - wined3d_surface_blt(back_buffer, &rect, src_surface, &rect, WINEDDBLT_KEYSRC, + wined3d_surface_blt(back_buffer, &rect, src_surface, &rect, WINEDDBLT_ALPHATEST, NULL, WINED3D_TEXF_POINT); } @@ -453,7 +453,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT if (swapchain->desc.windowed) MapWindowPoints(NULL, swapchain->win_handle, (POINT *)&destRect, 2); - wined3d_surface_blt(back_buffer, &destRect, cursor, NULL, WINEDDBLT_KEYSRC, + wined3d_surface_blt(back_buffer, &destRect, cursor, NULL, WINEDDBLT_ALPHATEST, NULL, WINED3D_TEXF_POINT); } diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 0f23fa2c5f0..7ddd4664bff 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -1268,6 +1268,7 @@ enum wined3d_display_rotation #define WINEDDBLT_WAIT 0x01000000 #define WINEDDBLT_DEPTHFILL 0x02000000 #define WINEDDBLT_DONOTWAIT 0x08000000 +#define WINEDDBLT_ALPHATEST 0x80000000 /* DDSURFACEDESC.dwFlags */ #define WINEDDSD_CAPS 0x00000001