Commit 51cdeeac authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Explicitly request alpha testing for blitting the cursor and logo textures to screen.

parent 06d6bdae
......@@ -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 */
......
......@@ -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);
}
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment