diff options
author | Connor Abbott <[email protected]> | 2019-06-04 14:12:34 +0200 |
---|---|---|
committer | Connor Abbott <[email protected]> | 2019-06-19 14:08:28 +0200 |
commit | 77be5b2f88d44a16c8f272a05f23b6c0a5971222 (patch) | |
tree | f15d0c2acbb8167e596db045070284d67fc2deb7 /src/compiler | |
parent | a1c737927c0d96f26ce487930aa9a2ed323814c9 (diff) |
nir: Use reorderable access flag
No changes with radeonsi shader-db.
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir.h | 16 |
1 files changed, 12 insertions, 4 deletions
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); + } } /** |