radv: fix invalid element type when filling vertex input default values
The elements added into a vector should have the same type as the
first one, otherwise this hits an assertion in LLVM.
Fixes: 4b3549c084 ("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>
This commit is contained in:
@@ -2089,8 +2089,10 @@ radv_fixup_vertex_input_fetches(struct radv_shader_context *ctx,
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user