[PATCH] wined3d: Restore WINEDDBLT_ALPHATEST support.
Henri Verbeet
hverbeet at gmail.com
Tue Dec 8 04:42:58 CST 2015
On 7 December 2015 at 23:36, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
> -static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
> +static void arbfp_blit_surface(enum wined3d_blit_op op, struct wined3d_device *device, DWORD filter,
I think I'd prefer "device" to stay the first parameter for
consistency with the other blitter ops. It's probably not a big deal
though.
> @@ -7881,6 +7885,9 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
> /* Leave the opengl state valid for blitting */
> arbfp_blit_unset(context->gl_info);
>
> + if (op == WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST)
> + glDisable(GL_ALPHA_TEST);
> +
You shouldn't need this. context_apply_blit_state() invalidates
WINED3D_RS_ALPHATESTENABLE, but even if it didn't, disabling the alpha
test isn't necessarily the right thing to do. Not that
arbfp_blit_surface() necessarily needs all the invalidation
context_apply_blit_state() does though.
> @@ -4335,8 +4336,16 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter,
> wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT, color_key);
>
> context = context_acquire(device, dst_surface);
> +
> + if (op == WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST)
> + glEnable(GL_ALPHA_TEST);
> +
> surface_blt_to_drawable(device, context, filter,
> !!color_key, src_surface, src_rect, dst_surface, dst_rect);
> +
> + if (op == WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST)
> + glDisable(GL_ALPHA_TEST);
> +
Like above.
Some basic tests probably wouldn't hurt. If we had had any the
regression might not have happened in the first place.
More information about the wine-devel
mailing list