vkd3d-shader: Merge ifs in vkd3d_dxbc_compiler_emit_swizzle_ext().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2019-02-25 11:59:09 +01:00 committed by Alexandre Julliard
parent c560fdfa26
commit 64f7ff3898

View File

@ -2633,14 +2633,11 @@ static uint32_t vkd3d_dxbc_compiler_emit_swizzle_ext(struct vkd3d_dxbc_compiler
val_component_count = vkd3d_write_mask_component_count(val_write_mask);
if (component_count == val_component_count
&& vkd3d_swizzle_is_equal(val_write_mask, swizzle, write_mask))
&& (component_count == 1 || vkd3d_swizzle_is_equal(val_write_mask, swizzle, write_mask)))
return val_id;
type_id = vkd3d_spirv_get_type_id(builder, component_type, component_count);
if (component_count == 1 && val_component_count == 1)
return val_id;
if (component_count == 1)
{
component_idx = vkd3d_write_mask_get_component_idx(write_mask);