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

Refactor and improve the texture cache, implement new allocator. #1572

Merged
merged 9 commits into from Aug 15, 2017

Commits on Aug 14, 2017

  1. Add support for array textures that don't have FBOs.

    Simplify render targets (always array textures).
    Remove resize_texture which is now unused.
    Support uploading all texture types via PBO.
    Remove support for texture upload without PBO.
    gw3583 committed Aug 14, 2017
  2. Refactor and improve the texture cache implementation.

    * The texture cache now acts more like a traditional cache,
      where the cache is a fixed size, and can evict items as required.
    * The allocator is switched to a slab style allocator, allowing
      deterministic behavior when allocating and freeing.
    * The slab allocator does not suffer from fragmentation like the
      previous allocator, and has no coalesce requirements.
    * The eviction policy is a lot smarter than the previous implementation.
      Items are evicted from the cache as required, and not before.
    * Since the shared cache is a fixed / bounded size, any allocations
      that are too large for the cache are created as standalone textures.
    * In the rare / edge case of the fixed sized cache being full, and
      the cache not being able to evict items, these items also fallback
      to the standalone texture allocator.
    * All textures using the sColor* samplers are now array textures.
      This will allow us to simplify the large image tiling code in
      the future.
    * All texture updates are performed via PBO, to eliminate CPU
      driver stalls when updating textures.
    gw3583 committed Aug 14, 2017
  3. Fix shader validation error.

    gw3583 committed Aug 14, 2017
  4. Address review comments.

    gw3583 committed Aug 14, 2017
You can’t perform that action at this time.