Skip to content

nir/algebraic: optimize bits=umin(bits, 32-(offset&0x1f))

Rhys Perry requested to merge pendingchaos/mesa:nir_vkd3d_proton_bfe_bfi into main

Optimizes patterns which are created by recent versions of vkd3d-proton, when constant folding doesn't eliminate it entirely:

  • ubitfield_extract(value, offset, umin(bits, 32-(offset&0x1f)))
  • ibitfield_extract(value, offset, umin(bits, 32-(offset&0x1f)))
  • bitfield_insert(base, insert, offset, umin(bits, 32-(offset&0x1f)))

vkd3d-proton commits:

Merge request reports