aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2016-12-01 00:32:41 +0100
committerBas Nieuwenhuizen <[email protected]>2016-12-05 01:40:54 +0100
commit92d7563fba04219a0a96a4949182b1f94b6d79b0 (patch)
tree18c499cb54de97ab035310eb019dadbdad71914f /src/amd
parent8033f78f94c7c6349e1c6a4d63fe3accb34b36f1 (diff)
ac/nir: Only use the first component for SSBO atomics.
Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 6b91e93f3cb..ec1ba9e55b3 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1952,9 +1952,9 @@ static LLVMValueRef visit_atomic_ssbo(struct nir_to_llvm_context *ctx,
ctx->shader_info->fs.writes_memory = true;
if (instr->intrinsic == nir_intrinsic_ssbo_atomic_comp_swap) {
- params[arg_count++] = get_src(ctx, instr->src[3]);
+ params[arg_count++] = llvm_extract_elem(ctx, get_src(ctx, instr->src[3]), 0);
}
- params[arg_count++] = get_src(ctx, instr->src[2]);
+ params[arg_count++] = llvm_extract_elem(ctx, get_src(ctx, instr->src[2]), 0);
params[arg_count++] = get_src(ctx, instr->src[0]);
params[arg_count++] = LLVMConstInt(ctx->i32, 0, false); /* vindex */
params[arg_count++] = get_src(ctx, instr->src[1]); /* voffset */