From: Marek Olšák <marek.ol...@amd.com>

---
 src/gallium/drivers/radeonsi/si_shader.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c 
b/src/gallium/drivers/radeonsi/si_shader.c
index dd5bdf6..16579af 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3720,21 +3720,22 @@ static void store_emit_buffer(
                        offset = LLVMBuildAdd(
                                builder, offset,
                                lp_build_const_int32(gallivm, start * 4), "");
                }
 
                emit_data->args[0] = data;
                emit_data->args[3] = offset;
 
                lp_build_intrinsic(
                        builder, intrinsic_name, emit_data->dst_type,
-                       emit_data->args, emit_data->arg_count, 0);
+                       emit_data->args, emit_data->arg_count,
+                       LP_FUNC_ATTR_WRITEONLY);
        }
 }
 
 static void store_emit_memory(
                struct si_shader_context *ctx,
                struct lp_build_emit_data *emit_data)
 {
        const struct tgsi_full_instruction *inst = emit_data->inst;
        struct gallivm_state *gallivm = &ctx->gallivm;
        struct lp_build_context *base = &ctx->bld_base.base;
@@ -3778,32 +3779,34 @@ static void store_emit(
 
        if (inst->Dst[0].Register.File == TGSI_FILE_BUFFER) {
                store_emit_buffer(ctx, emit_data);
                return;
        }
 
        if (target == TGSI_TEXTURE_BUFFER) {
                emit_data->output[emit_data->chan] = lp_build_intrinsic(
                        builder, "llvm.amdgcn.buffer.store.format.v4f32",
                        emit_data->dst_type, emit_data->args,
-                       emit_data->arg_count, 0);
+                       emit_data->arg_count,
+                       LP_FUNC_ATTR_WRITEONLY);
        } else {
                get_image_intr_name("llvm.amdgcn.image.store",
                                LLVMTypeOf(emit_data->args[0]), /* vdata */
                                LLVMTypeOf(emit_data->args[1]), /* coords */
                                LLVMTypeOf(emit_data->args[2]), /* rsrc */
                                intrinsic_name, sizeof(intrinsic_name));
 
                emit_data->output[emit_data->chan] =
                        lp_build_intrinsic(
                                builder, intrinsic_name, emit_data->dst_type,
-                               emit_data->args, emit_data->arg_count, 0);
+                               emit_data->args, emit_data->arg_count,
+                               LP_FUNC_ATTR_WRITEONLY);
        }
 }
 
 static void atomic_fetch_args(
                struct lp_build_tgsi_context * bld_base,
                struct lp_build_emit_data * emit_data)
 {
        struct si_shader_context *ctx = si_shader_context(bld_base);
        struct gallivm_state *gallivm = bld_base->base.gallivm;
        LLVMBuilderRef builder = gallivm->builder;
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to