ac/nir: set attrib flags for SSBO and image store operations
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 12 Mar 2019 10:37:29 +0000 (11:37 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 20 Mar 2019 21:18:37 +0000 (22:18 +0100)
For consistency regarding other store operations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_nir_to_llvm.c

index 0ca3f83a248b251725a856e09bb086cbeeb79bc1..b12cb418e11728aba45c1b1123ed587bfa321d18 100644 (file)
@@ -1593,7 +1593,8 @@ static void visit_store_ssbo(struct ac_nir_context *ctx,
                                ctx->ac.i1false,
                        };
                        ac_build_intrinsic(&ctx->ac, store_name,
-                                          ctx->ac.voidt, tbuffer_params, 10, 0);
+                                          ctx->ac.voidt, tbuffer_params, 10,
+                                          ac_get_store_intr_attribs(writeonly_memory));
                } else {
                        switch (num_bytes) {
                        case 16: /* v4f32 */
@@ -1621,7 +1622,8 @@ static void visit_store_ssbo(struct ac_nir_context *ctx,
                                ctx->ac.i1false,  /* slc */
                        };
                        ac_build_intrinsic(&ctx->ac, store_name,
-                                          ctx->ac.voidt, params, 6, 0);
+                                          ctx->ac.voidt, params, 6,
+                                          ac_get_store_intr_attribs(writeonly_memory));
                }
        }
 }
@@ -2548,7 +2550,8 @@ static void visit_image_store(struct ac_nir_context *ctx,
                        params[4] = LLVMConstInt(ctx->ac.i1, !!(args.cache_policy & ac_glc), 0);
                        params[5] = ctx->ac.i1false;  /* slc */
                }
-               ac_build_intrinsic(&ctx->ac, name, ctx->ac.voidt, params, 6, 0);
+               ac_build_intrinsic(&ctx->ac, name, ctx->ac.voidt, params, 6,
+                                  ac_get_store_intr_attribs(writeonly_memory));
        } else {
                args.opcode = ac_image_store;
                args.data[0] = ac_to_float(&ctx->ac, get_src(ctx, instr->src[3]));