mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
radeonsi: handle any size of shader args in the LLVM PS prolog
this will be needed for perspective-correct interpolation at offset/sample
This commit is contained in:
parent
536875fc5b
commit
6bce511b78
1 changed files with 4 additions and 9 deletions
|
|
@ -471,16 +471,11 @@ static LLVMValueRef insert_ret_of_arg(struct si_shader_context *ctx, LLVMValueRe
|
|||
if (is_vgpr)
|
||||
data = ac_to_float(&ctx->ac, data);
|
||||
|
||||
if (ctx->args->ac.args[arg_index].size == 1) {
|
||||
return LLVMBuildInsertValue(ctx->ac.builder, ret, data, index, "");
|
||||
} else {
|
||||
assert(ctx->args->ac.args[arg_index].size == 2);
|
||||
LLVMValueRef tmp = LLVMBuildExtractElement(ctx->ac.builder, data, ctx->ac.i32_0, "");
|
||||
ret = LLVMBuildInsertValue(ctx->ac.builder, ret, tmp, index, "");
|
||||
tmp = LLVMBuildExtractElement(ctx->ac.builder, data, ctx->ac.i32_1, "");
|
||||
ret = LLVMBuildInsertValue(ctx->ac.builder, ret, tmp, index + 1, "");
|
||||
return ret;
|
||||
for (unsigned i = 0; i < ctx->args->ac.args[arg_index].size; i++) {
|
||||
ret = LLVMBuildInsertValue(ctx->ac.builder, ret,
|
||||
ac_llvm_extract_elem(&ctx->ac, data, i), index + i, "");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue