• Zhigang Gong's avatar
    glamor-fbo-pool: Implement fbo cache mechanism. · c7e79d6a
    Zhigang Gong authored
    We classify the cache according to the texture's format/width/height.
    As openGL doesn't allow us to change a texture's format/width/height
    after the internal texture object is already allocated, we can't
    just calculate the size and then according ths size to put the
    fbo to an bucket which is just like SNA does. We can only put
    the fbo to the corresponding format/width/height bucket.
    
    This commit only support the exact size match. The following patch
    will remove this restriction, just need to handle the repeat/tile
    case when the size is not exactly match.
    
    Should use fls instead of ffs when decide the width/height bucket,
    thanks for Chris to point this out.
    Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
    c7e79d6a
glamor_render.c 45.4 KB