vkd3d-shader: Fix component decoration for shader IO variables.

This fixes a regression introduced by commit
91820630cb.

We need to take into account the combined write mask returned from
needs_private_io_variable().

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-06-17 15:43:27 +02:00
committed by Alexandre Julliard
parent 09c1601b86
commit 0bde4c7dca
2 changed files with 69 additions and 4 deletions

View File

@@ -3944,6 +3944,10 @@ static uint32_t vkd3d_dxbc_compiler_emit_input(struct vkd3d_dxbc_compiler *compi
component_count = VKD3D_VEC4_SIZE;
write_mask = VKD3DSP_WRITEMASK_ALL;
}
else
{
component_idx = vkd3d_write_mask_get_component_idx(write_mask);
}
storage_class = SpvStorageClassInput;
@@ -4300,6 +4304,10 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler
use_private_variable = true;
write_mask = VKD3DSP_WRITEMASK_ALL;
}
else
{
component_idx = vkd3d_write_mask_get_component_idx(write_mask);
}
vkd3d_symbol_make_register(&reg_symbol, reg);