Skip to content
  • Nanley Chery's avatar
    isl: Don't align phys_level0_sa by block dimension · 02f6995d
    Nanley Chery authored
    
    
    Aligning phys_level0_sa by the compression block dimension prior to
    mipmap layout causes the layout of compressed surfaces to differ from
    the sampler's expectations in certain cases. The hardware docs agree:
    
    From the BDW PRM, Vol. 5, Compressed Mipmap Layout,
    
       The compressed mipmaps are stored in a similar fashion to
       uncompressed mipmaps [...]
    
       The following exceptions apply to the layout of compressed (vs.
       uncompressed) mipmaps:
          * [...]
          * The dimensions of the mip maps are first determined by applying
    	the sizing algorithm presented in Non-Power-of-Two Mipmaps
    	above. Then, if necessary, they are padded out to compression
    	block boundaries.
    
    The last bullet indicates that alignment should not be done for
    calculating a miplevel's dimensions, but rather for determining miplevel
    placement/padding. Comply with this text by removing the extra
    alignment.
    
    Fixes some fbo-generatemipmap-formats piglit failures on all tested
    platforms (SNB-KBL).
    
    v2:
    - Note fixed platforms.
    - Update some consumers via a helper function.
    
    Cc: <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
    02f6995d