Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expire entries in the shared texture cache before allocating another layer #3293

Merged
merged 6 commits into from Nov 9, 2018

Commits on Nov 9, 2018

  1. Consolidate driver limits and work around mac bug.

    This restores non-mac platforms back to the old maximum of 64 layers.
    
    Differential Revision: https://phabricator.services.mozilla.com/D11416
    bholley committed Nov 9, 2018
  2. Factor texture cache handle lists into a helper struct.

    This is a bit cleaner and avoids borrow checking problems.
    
    Differential Revision: https://phabricator.services.mozilla.com/D11271
    bholley committed Nov 9, 2018
  3. Refactor TextureCache allocation with some helpers.

    The container struct reduces repetition, and the helper method will simplify
    future work by allowing early returns.
    
    Differential Revision: https://phabricator.services.mozilla.com/D11272
    bholley committed Nov 9, 2018
  4. Unify standalone and shared texture expiration and GC before growing.

    This patch does a few things:
    * Uses the same age-based expiration that we use for the standalone
      cache for the shared cache.
    * Tracks the last time we expired shared entries.
    * When allocation fails, tries to expire old entries before allocating
      another layer, assuming we haven't done so just a few frames ago.
    * Eliminates the size limits on the shared caches, and just grows them
      instead of allocating standalone entries.
    
    The last bit could cause us to get stuck with larger total texture
    allocations than we do now, if a lot of entries were used in quick
    succession (since we never drop shared entries like we do with
    standalone entries). However, I think it's probably unlikely enough
    that it's fine to ship it for a few days while I finish up shrinking
    support.
    
    The parameters here (75 and 25) still aren't perfect, and I'll tune them going
    forward.
    
    Differential Revision: https://phabricator.services.mozilla.com/D11273
    bholley committed Nov 9, 2018
  5. Rename EntryKind to EntryDetails.

    We need this so that we can have a detail-less enum called EntryKind to
    eliminate the boolean. People on #servo agreed this was an appropriate
    naming strategy.
    bholley committed Nov 9, 2018
  6. Use EntryKind instead of a boolean.

    bholley committed Nov 9, 2018
You can’t perform that action at this time.