The elements added into a vector should have the same type as the
first one, otherwise this hits an assertion in LLVM.
Fixes: 4b3549c0846 ("radv: reduce the number of loaded channels for vertex input fetches")
reported-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
elemtype = LLVMTypeOf(value);
}
- for (unsigned i = num_channels; i < 4; i++)
+ for (unsigned i = num_channels; i < 4; i++) {
chan[i] = i == 3 ? one : zero;
+ chan[i] = ac_to_float(&ctx->ac, chan[i]);
+ }
return ac_build_gather_values(&ctx->ac, chan, 4);
}