mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Implement vkd3d_write_mask_component_count() on top of vkd3d_popcount().
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:
parent
78a09d37d2
commit
6b9c589795
@ -866,16 +866,8 @@ static inline unsigned int vkd3d_write_mask_get_component_idx(DWORD write_mask)
|
||||
|
||||
static inline unsigned int vkd3d_write_mask_component_count(DWORD write_mask)
|
||||
{
|
||||
unsigned int i, count = 0;
|
||||
|
||||
assert(write_mask);
|
||||
for (i = 0; i < VKD3D_VEC4_SIZE; ++i)
|
||||
{
|
||||
if (write_mask & (VKD3DSP_WRITEMASK_0 << i))
|
||||
++count;
|
||||
}
|
||||
|
||||
return count;
|
||||
return vkd3d_popcount(write_mask & VKD3DSP_WRITEMASK_ALL);
|
||||
}
|
||||
|
||||
static inline unsigned int vkd3d_write_mask_from_component_count(unsigned int component_count)
|
||||
|
Loading…
Reference in New Issue
Block a user