vkd3d-shader/ir: Pass a uint32_t swizzle to vkd3d_swizzle_get_component().

This commit is contained in:
Henri Verbeet
2023-12-05 23:05:40 +01:00
committed by Alexandre Julliard
parent 4ff389854c
commit 8a1de71fb1
Notes: Alexandre Julliard 2023-12-14 23:32:16 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/525
6 changed files with 48 additions and 49 deletions

View File

@@ -1063,12 +1063,12 @@ static void shader_sm1_validate_instruction(struct vkd3d_shader_sm1_parser *sm1,
}
}
static unsigned int mask_from_swizzle(unsigned int swizzle)
static unsigned int mask_from_swizzle(uint32_t swizzle)
{
return (1u << vkd3d_swizzle_get_component(swizzle, 0))
| (1u << vkd3d_swizzle_get_component(swizzle, 1))
| (1u << vkd3d_swizzle_get_component(swizzle, 2))
| (1u << vkd3d_swizzle_get_component(swizzle, 3));
return (1u << vsir_swizzle_get_component(swizzle, 0))
| (1u << vsir_swizzle_get_component(swizzle, 1))
| (1u << vsir_swizzle_get_component(swizzle, 2))
| (1u << vsir_swizzle_get_component(swizzle, 3));
}
static void shader_sm1_read_instruction(struct vkd3d_shader_sm1_parser *sm1, struct vkd3d_shader_instruction *ins)