Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/ir.c:
- memmove(®->idx[1], ®->idx[0], reg->idx_count * sizeof(reg->idx[0]));
- memset(®->idx[0], 0, sizeof(reg->idx[0]));
- ++reg->idx_count;
- if (vsir_write_mask_component_count(write_mask) == 1)
- {
reg->idx[0].offset = array_offset + vsir_swizzle_get_component(src_param->swizzle,
vsir_write_mask_get_component_idx(write_mask));
src_param->swizzle = 0;
return;
- }
- max_component_count = signature->s->elements[element_idx].register_count - array_offset;
- max_component_count = min(max_component_count, VKD3D_VEC4_SIZE);
- for (i = 0, handled_mask = 0; i < max_component_count; ++i)
I am not sure I understand this: what is `max_component_count` expected to be? Why don't you just iterate over the whole write mask?