Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/ir.c:
if (!(mov_src = vsir_program_get_src_params(program, 1)))
{
ERR("Failed to allocate instruction src param.\n");
normaliser->result = VKD3D_ERROR_OUT_OF_MEMORY;
return;
}
mov_src->reg = *reg;
mov_src->reg.idx[0].offset = array_offset + component_idx;
mov_src->swizzle = 0;
mov_src->modifiers = 0;
if (!(dst_param = clip_cull_normaliser_emit_mov(normaliser, mov_src)))
return;
vsir_register_init(&dst_param->reg, VKD3DSPR_TEMP, reg->data_type, 1);
dst_param->reg.dimension = reg->dimension;
Shouldn't the destination (i.e., the temp register) be VEC4 even if the source is scalar?