diff options
author | Samuel Pitoiset <[email protected]> | 2019-02-12 15:09:29 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-02-14 09:09:48 +0100 |
commit | 2154fac6f3caf207e7d2a90e99ee71937c7989b6 (patch) | |
tree | 9acbf34a1396da493055cf69bbd12067236f4688 /src/amd | |
parent | 338d399fd01caec7f558bb469517baa318410e06 (diff) |
ac: make use of ac_build_expand_to_vec4() in visit_image_store()
And make ac_build_expand() a static function.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_llvm_build.c | 9 | ||||
-rw-r--r-- | src/amd/common/ac_llvm_build.h | 3 | ||||
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index 9395bd1bbda..d06eb7df50c 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -548,10 +548,11 @@ ac_build_gather_values(struct ac_llvm_context *ctx, /* Expand a scalar or vector to <dst_channels x type> by filling the remaining * channels with undef. Extract at most src_channels components from the input. */ -LLVMValueRef ac_build_expand(struct ac_llvm_context *ctx, - LLVMValueRef value, - unsigned src_channels, - unsigned dst_channels) +static LLVMValueRef +ac_build_expand(struct ac_llvm_context *ctx, + LLVMValueRef value, + unsigned src_channels, + unsigned dst_channels) { LLVMTypeRef elemtype; LLVMValueRef chan[dst_channels]; diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h index f218eaf2832..7f8e2398a25 100644 --- a/src/amd/common/ac_llvm_build.h +++ b/src/amd/common/ac_llvm_build.h @@ -171,9 +171,6 @@ LLVMValueRef ac_build_gather_values(struct ac_llvm_context *ctx, LLVMValueRef *values, unsigned value_count); -LLVMValueRef ac_build_expand(struct ac_llvm_context *ctx, - LLVMValueRef value, - unsigned src_channels, unsigned dst_channels); LLVMValueRef ac_build_expand_to_vec4(struct ac_llvm_context *ctx, LLVMValueRef value, unsigned num_channels); diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 4f44e32d9f9..946ea9a4a8a 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -2508,7 +2508,7 @@ static void visit_image_store(struct ac_nir_context *ctx, unsigned src_channels = ac_get_llvm_num_components(src); if (src_channels == 3) - src = ac_build_expand(&ctx->ac, src, 3, 4); + src = ac_build_expand_to_vec4(&ctx->ac, src, 3); params[0] = src; /* data */ params[1] = rsrc; |