summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/amd/common/ac_nir_to_llvm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 728294cc46e..ddec74fa1ab 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -2351,9 +2351,11 @@ visit_store_var(struct nir_to_llvm_context *ctx,
if (indir_index)
index = LLVMBuildAdd(ctx->builder, index, indir_index, "");
+
+ value = llvm_extract_elem(ctx, src, chan);
derived_ptr = LLVMBuildGEP(ctx->builder, ptr, &index, 1, "");
LLVMBuildStore(ctx->builder,
- to_integer(ctx, src), derived_ptr);
+ to_integer(ctx, value), derived_ptr);
}
break;
}