Skip to content
  • Kenneth Graunke's avatar
    iris: Improve direct CPU map heuristics · e5143bb2
    Kenneth Graunke authored
    We were promoting reads with a valid primary to direct CPU maps even
    if the mmap mode was IRIS_MMAP_WC, which would mean uncached reads from
    VRAM.  In that case, GPU blits are in fact useful!
    
    We were also only checking for !DISCARD_RANGE rather than MAP_READ,
    which isn't a great idea for image maps, given the discussion in the
    previous commit about image map semantics.
    
    The original code was also just confusingly structured.  Make a helper
    function with clearly defined cases where we want to bail on CPU maps.
    e5143bb2