radeonsi: set AC_FUNC_ATTR_READNONE for image opcodes where it was missing
authorMarek Olšák <marek.olsak@amd.com>
Thu, 11 Apr 2019 01:24:18 +0000 (21:24 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 12 Apr 2019 15:34:39 +0000 (11:34 -0400)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/common/ac_llvm_build.c
src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c

index 19496519165f7ea856b23145375d104fde628d49..8f40ddda0b578ce34852b5c3855eed8e13730dc7 100644 (file)
@@ -3291,6 +3291,7 @@ void ac_apply_fmask_to_sample(struct ac_llvm_context *ac, LLVMValueRef fmask,
        fmask_load.resource = fmask;
        fmask_load.dmask = 0xf;
        fmask_load.dim = is_array_tex ? ac_image_2darray : ac_image_2d;
+       fmask_load.attributes = AC_FUNC_ATTR_READNONE;
 
        fmask_load.coords[0] = addr[0];
        fmask_load.coords[1] = addr[1];
index 727def56f658e7ae966b1d8b467f3dd7aec92d1b..ed67976b42119611b937dbb83a95568ed3e7f13b 100644 (file)
@@ -1042,6 +1042,7 @@ static void resq_emit(
        args.opcode = ac_image_get_resinfo;
        args.dim = ac_texture_dim_from_tgsi_target(ctx->screen, target);
        args.dmask = 0xf;
+       args.attributes = AC_FUNC_ATTR_READNONE;
 
        if (inst->Instruction.Opcode == TGSI_OPCODE_TXQ) {
                tex_fetch_ptrs(bld_base, emit_data, &args.resource, NULL, NULL);
@@ -1272,6 +1273,7 @@ si_lower_gather4_integer(struct si_shader_context *ctx,
                resinfo.sampler = args->sampler;
                resinfo.lod = ctx->ac.i32_0;
                resinfo.dmask = 0xf;
+               resinfo.attributes = AC_FUNC_ATTR_READNONE;
 
                LLVMValueRef texsize =
                        fix_resinfo(ctx, target,
@@ -1776,6 +1778,8 @@ static void si_llvm_emit_fbfetch(const struct lp_build_tgsi_action *action,
        args.opcode = ac_image_load;
        args.resource = image;
        args.dmask = 0xf;
+       args.attributes = AC_FUNC_ATTR_READNONE;
+
        if (ctx->shader->key.mono.u.ps.fbfetch_msaa)
                args.dim = ctx->shader->key.mono.u.ps.fbfetch_layered ?
                        ac_image_2darraymsaa : ac_image_2dmsaa;