libs/vkd3d-shader: Add initial support for typed registers.

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
2018-06-26 14:41:44 +02:00
committed by Alexandre Julliard
parent 270c212265
commit 7dce007c53
2 changed files with 101 additions and 30 deletions

View File

@@ -872,6 +872,12 @@ static inline unsigned int vkd3d_write_mask_component_count(DWORD write_mask)
return count;
}
static inline unsigned int vkd3d_write_mask_from_component_count(unsigned int component_count)
{
assert(component_count <= 4);
return (VKD3DSP_WRITEMASK_0 << component_count) - 1;
}
static inline unsigned int vkd3d_swizzle_get_component(DWORD swizzle,
unsigned int idx)
{