Pass through the DrawContext to texturecaches and fb managers.

This is preparation for sharing more framebuffer code between the
backends.
This commit is contained in:
Henrik Rydgard committed 2017-02-05 19:51:50 +01:00
1 parent 1c5ad71f60
commit d05ef4a859
20 files changed
+78 -45

No files matched your search

+8 -5
View File
@@ -140,17 +140,20 @@ void SamplerCache::DeviceRestore(VulkanContext *vulkan) {
vulkan_ = vulkan;
}
TextureCacheVulkan::TextureCacheVulkan(VulkanContext *vulkan)
: vulkan_(vulkan), samplerCache_(vulkan), secondCacheSizeEstimate_(0),
clearCacheNextFrame_(false), lowMemoryMode_(false), texelsScaledThisFrame_(0) {
TextureCacheVulkan::TextureCacheVulkan(Draw::DrawContext *draw, VulkanContext *vulkan)
: TextureCacheCommon(draw),
vulkan_(vulkan),
samplerCache_(vulkan),
secondCacheSizeEstimate_(0),
clearCacheNextFrame_(false),
lowMemoryMode_(false),
texelsScaledThisFrame_(0) {
timesInvalidatedAllThisFrame_ = 0;
lastBoundTexture = nullptr;
decimationCounter_ = TEXCACHE_DECIMATION_INTERVAL;
allocator_ = new VulkanDeviceAllocator(vulkan_, TEXCACHE_MIN_SLAB_SIZE, TEXCACHE_MAX_SLAB_SIZE);
SetupTextureDecoder();
nextTexture_ = nullptr;
}
TextureCacheVulkan::~TextureCacheVulkan() {