Henri Verbeet : wined3d: Use the format info to determine the A8_UNORM output swizzle in find_ps_compile_args ().
Alexandre Julliard
julliard at winehq.org
Wed Aug 7 15:36:21 CDT 2019
Module: wine
Branch: master
Commit: 844a5ad74f0b850911392eecf8a36c0052269ba1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=844a5ad74f0b850911392eecf8a36c0052269ba1
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Aug 7 16:29:57 2019 +0430
wined3d: Use the format info to determine the A8_UNORM output swizzle in find_ps_compile_args().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/shader.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 2bd201a..6061efa 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -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;
}
}
More information about the wine-cvs
mailing list