Skip to content
  • Nanley Chery's avatar
    iris: Support clears in more GPU-based copies · 38529675
    Nanley Chery authored
    Commit 7779b1d7
    
    , disabled clear support
    when copying to/from color buffers. According to the performance CI, it
    falls within a range of commits that introduced a performance regression
    on Bioshock Infinite with Tigerlake. Icelake isn't noticeably affected.
    
    By analyzing a trace of the game, I found a couple cases where that
    commit added new partial resolves. Update get_copy_region_aux_settings
    to avoid them:
    
    - The trace uploads to R8_UNORM textures. On TGL, these enter the
      COMPRESSED_CLEAR state on the upload and are partially resolved before
      every subsequent upload. Thankfully, they keep their initial clear
      color of all zeroes. Since zeros can survive format reinterpretation,
      allow clear support for it.
    
    - The trace copies between RGBA16_FLOAT textures. The ones with zero
      clear color are helped by the optimization above. The ones with
      non-zero clear color are used as source textures. Thankfully on ICL+,
      the clear color used for sampling is in pixel form and can thus be
      sampled from with format reinterpretation. Allow clear support for
      this case.
    
    I haven't tested the actual performance impact of this change, but it
    should be beneficial regardless.
    
    Reported-by: default avatarClayton Craft <clayton.a.craft@intel.com>
    Reported-by: default avatarJordan Justen <jordan.l.justen@intel.com>
    Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
    Part-of: <mesa/mesa!8262>
    38529675