mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/spirv: Shift the private variable destination mask instead of the source mask.
Otherwise if the input is located above position 0 in the private array it will be swizzled incorrectly, e.g. a.yz instead of a.xy in test_domain_shader_inputs(). Based on a vkd3d-proton patch by Hans-Kristian Arntzen. Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
5357ab78b9
commit
dbd7e18364
@ -4672,8 +4672,8 @@ static uint32_t vkd3d_dxbc_compiler_emit_input(struct vkd3d_dxbc_compiler *compi
|
||||
}
|
||||
|
||||
val_id = vkd3d_dxbc_compiler_emit_swizzle(compiler, val_id,
|
||||
vkd3d_write_mask_from_component_count(input_component_count) << component_idx,
|
||||
VKD3D_SHADER_COMPONENT_FLOAT, VKD3D_SHADER_NO_SWIZZLE, dst->write_mask);
|
||||
vkd3d_write_mask_from_component_count(input_component_count),
|
||||
VKD3D_SHADER_COMPONENT_FLOAT, VKD3D_SHADER_NO_SWIZZLE, dst->write_mask >> component_idx);
|
||||
|
||||
vkd3d_dxbc_compiler_emit_store_reg(compiler, &dst_reg, dst->write_mask, val_id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user