Skip to content
  • Kenneth Graunke's avatar
    isl, anv, iris: Add a centralized helper to select MOCS based on usage · 02fe825a
    Kenneth Graunke authored
    
    
    On Gen12+, we can enable additional caches in certain usage situations.
    This routes that decision making to a central place in ISL, based on
    surface usage flags, and updates both drivers to use it.  (i965 doesn't
    need to change because it doesn't support Gen12.)
    
    We continue handling the "external" decision via an anv_mocs() wrapper
    for now, since we store that flag in anv_bo, which isl doesn't know
    about.  (We could introduce an ISL_SURF_USAGE_EXTERNAL, but I'm not
    actually sure that would be cleaner.)
    
    This patch should not have any functional nor performance effects, as
    we continue selecting the exact same MOCS values for now.
    
    Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
    Part-of: <!7104>
    02fe825a