Commit 34232874 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Collapse some trivially nested ifs into a single condition.

parent d219903c
......@@ -6477,35 +6477,37 @@ void wined3d_ffp_get_fs_settings(const struct wined3d_context *context, const st
aarg0 = (args[aop] & ARG0) ? state->texture_states[i][WINED3D_TSS_ALPHA_ARG0] : ARG_UNUSED;
}
if (!i && texture && state->render_states[WINED3D_RS_COLORKEYENABLE])
if (!i && state->render_states[WINED3D_RS_COLORKEYENABLE]
&& texture && !(texture->resource.usage & WINED3DUSAGE_LEGACY_CUBEMAP)
&& (texture->async.color_key_flags & WINED3D_CKEY_SRC_BLT) && !texture->resource.format->alpha_size)
{
if (!(texture->resource.usage & WINED3DUSAGE_LEGACY_CUBEMAP))
if (aop == WINED3D_TOP_DISABLE)
{
if (texture->async.color_key_flags & WINED3D_CKEY_SRC_BLT && !texture->resource.format->alpha_size)
aarg1 = WINED3DTA_TEXTURE;
aop = WINED3D_TOP_SELECT_ARG1;
}
else if (aop == WINED3D_TOP_SELECT_ARG1 && aarg1 != WINED3DTA_TEXTURE)
{
if (state->blend_state && state->blend_state->desc.rt[0].enable)
{
if (aop == WINED3D_TOP_DISABLE)
{
aarg1 = WINED3DTA_TEXTURE;
aop = WINED3D_TOP_SELECT_ARG1;
}
else if (aop == WINED3D_TOP_SELECT_ARG1 && aarg1 != WINED3DTA_TEXTURE)
{
if (state->blend_state && state->blend_state->desc.rt[0].enable)
{
aarg2 = WINED3DTA_TEXTURE;
aop = WINED3D_TOP_MODULATE;
}
else aarg1 = WINED3DTA_TEXTURE;
}
else if (aop == WINED3D_TOP_SELECT_ARG2 && aarg2 != WINED3DTA_TEXTURE)
{
if (state->blend_state && state->blend_state->desc.rt[0].enable)
{
aarg1 = WINED3DTA_TEXTURE;
aop = WINED3D_TOP_MODULATE;
}
else aarg2 = WINED3DTA_TEXTURE;
}
aarg2 = WINED3DTA_TEXTURE;
aop = WINED3D_TOP_MODULATE;
}
else
{
aarg1 = WINED3DTA_TEXTURE;
}
}
else if (aop == WINED3D_TOP_SELECT_ARG2 && aarg2 != WINED3DTA_TEXTURE)
{
if (state->blend_state && state->blend_state->desc.rt[0].enable)
{
aarg1 = WINED3DTA_TEXTURE;
aop = WINED3D_TOP_MODULATE;
}
else
{
aarg2 = WINED3DTA_TEXTURE;
}
}
}
......
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