diff options
author | Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> | 2016-12-01 00:32:41 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> | 2016-12-05 01:40:54 +0100 |
commit | 92d7563fba04219a0a96a4949182b1f94b6d79b0 (patch) | |
tree | 18c499cb54de97ab035310eb019dadbdad71914f /src/amd | |
parent | 8033f78f94c7c6349e1c6a4d63fe3accb34b36f1 (diff) |
ac/nir: Only use the first component for SSBO atomics.
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 4 |
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 6b91e93f3c..ec1ba9e55b 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 */ |