wined3d: Use the format info to determine the A8_UNORM output swizzle in find_ps_compile_args().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2019-08-07 16:11:57 +04:30 committed by Alexandre Julliard
parent aa6517cf87
commit 844a5ad74f
1 changed files with 4 additions and 7 deletions

View File

@ -4159,14 +4159,11 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
args->render_offscreen = shader->reg_maps.vpos && gl_info->supported[ARB_FRAGMENT_COORD_CONVENTIONS]
? context->render_offscreen : 0;
if (!gl_info->supported[WINED3D_GL_LEGACY_CONTEXT])
for (i = 0; i < ARRAY_SIZE(state->fb->render_targets); ++i)
{
for (i = 0; i < ARRAY_SIZE(state->fb->render_targets); ++i)
{
struct wined3d_rendertarget_view *rtv = state->fb->render_targets[i];
if (rtv && rtv->format->id == WINED3DFMT_A8_UNORM)
args->rt_alpha_swizzle |= 1u << i;
}
struct wined3d_rendertarget_view *rtv = state->fb->render_targets[i];
if (rtv && rtv->format->id == WINED3DFMT_A8_UNORM && !is_identity_fixup(rtv->format->color_fixup))
args->rt_alpha_swizzle |= 1u << i;
}
}