Skip to content
  • Rob Clark's avatar
    nir: const_index helpers · 1df3ecc1
    Rob Clark authored
    
    
    Direct access to intr->const_index[n], where different slots have
    different meanings, is somewhat confusing.
    
    Instead, let's put some extra info in nir_intrinsic_infos[] about which
    slots map to what, and add some get/set helpers.  The helpers validate
    that the field being accessed (base/writemask/etc) is applicable for the
    intrinsic opc, for some extra safety.  And nir_print can use this to
    dump out decoded const_index fields.
    
    Signed-off-by: default avatarRob Clark <robclark@freedesktop.org>
    Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
    1df3ecc1