From: Connor Abbott Date: Tue, 4 Jun 2019 12:12:34 +0000 (+0200) Subject: nir: Use reorderable access flag X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77be5b2f88d44a16c8f272a05f23b6c0a5971222;p=mesa.git nir: Use reorderable access flag No changes with radeonsi shader-db. Reviewed-by: Timothy Arceri --- diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index bbe3fed70dd..203601cee2c 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1459,10 +1459,18 @@ void nir_rewrite_image_intrinsic(nir_intrinsic_instr *instr, static inline bool nir_intrinsic_can_reorder(nir_intrinsic_instr *instr) { - const nir_intrinsic_info *info = - &nir_intrinsic_infos[instr->intrinsic]; - return (info->flags & NIR_INTRINSIC_CAN_ELIMINATE) && - (info->flags & NIR_INTRINSIC_CAN_REORDER); + if (instr->intrinsic == nir_intrinsic_load_deref || + instr->intrinsic == nir_intrinsic_load_ssbo || + instr->intrinsic == nir_intrinsic_bindless_image_load || + instr->intrinsic == nir_intrinsic_image_deref_load || + instr->intrinsic == nir_intrinsic_image_load) { + return nir_intrinsic_access(instr) & ACCESS_CAN_REORDER; + } else { + const nir_intrinsic_info *info = + &nir_intrinsic_infos[instr->intrinsic]; + return (info->flags & NIR_INTRINSIC_CAN_ELIMINATE) && + (info->flags & NIR_INTRINSIC_CAN_REORDER); + } } /**