ac/llvm: set invariant.load on image loads with ACCESS_CAN_REORDER

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20146>
This commit is contained in:
Marek Olšák 2022-12-04 06:32:19 -05:00 committed by Marge Bot
parent de3fcc77c7
commit b75b9d6324

View file

@ -2664,7 +2664,7 @@ static LLVMValueRef visit_image_load(struct ac_nir_context *ctx, const nir_intri
if (!level_zero)
args.lod = get_src(ctx, instr->src[3]);
args.dmask = 15;
args.attributes = 0;
args.attributes = access & ACCESS_CAN_REORDER ? AC_ATTR_INVARIANT_LOAD : 0;
assert(instr->dest.is_ssa);
args.d16 = instr->dest.ssa.bit_size == 16;