mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-26 19:32:40 -06:00
metal: create buffer cache on startup
This commit is contained in:
parent
d33d50780e
commit
b3e8d8d11f
2 changed files with 7 additions and 4 deletions
|
@ -14,8 +14,6 @@
|
||||||
#include "video_core/renderer_metal/mtl_rasterizer.h"
|
#include "video_core/renderer_metal/mtl_rasterizer.h"
|
||||||
#include "video_core/texture_cache/texture_cache_base.h"
|
#include "video_core/texture_cache/texture_cache_base.h"
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
namespace Metal {
|
namespace Metal {
|
||||||
|
|
||||||
AccelerateDMA::AccelerateDMA() = default;
|
AccelerateDMA::AccelerateDMA() = default;
|
||||||
|
@ -34,6 +32,8 @@ RasterizerMetal::RasterizerMetal(Tegra::GPU& gpu_,
|
||||||
: gpu{gpu_}, device_memory{device_memory_}, device{device_},
|
: gpu{gpu_}, device_memory{device_memory_}, device{device_},
|
||||||
command_recorder{command_recorder_}, swap_chain{swap_chain_},
|
command_recorder{command_recorder_}, swap_chain{swap_chain_},
|
||||||
staging_buffer_pool(device, command_recorder),
|
staging_buffer_pool(device, command_recorder),
|
||||||
|
buffer_cache_runtime(device, command_recorder, staging_buffer_pool),
|
||||||
|
buffer_cache(device_memory, buffer_cache_runtime),
|
||||||
texture_cache_runtime(device, command_recorder, staging_buffer_pool),
|
texture_cache_runtime(device, command_recorder, staging_buffer_pool),
|
||||||
texture_cache(texture_cache_runtime, device_memory) {}
|
texture_cache(texture_cache_runtime, device_memory) {}
|
||||||
RasterizerMetal::~RasterizerMetal() = default;
|
RasterizerMetal::~RasterizerMetal() = default;
|
||||||
|
@ -255,4 +255,4 @@ void RasterizerMetal::ReleaseChannel(s32 channel_id) {
|
||||||
texture_cache.EraseChannel(channel_id);
|
texture_cache.EraseChannel(channel_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Metal
|
} // namespace Metal
|
||||||
|
|
|
@ -4,10 +4,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "mtl_texture_cache.h"
|
#include "mtl_buffer_cache.h"
|
||||||
#include "video_core/control/channel_state_cache.h"
|
#include "video_core/control/channel_state_cache.h"
|
||||||
#include "video_core/engines/maxwell_dma.h"
|
#include "video_core/engines/maxwell_dma.h"
|
||||||
#include "video_core/rasterizer_interface.h"
|
#include "video_core/rasterizer_interface.h"
|
||||||
|
#include "video_core/renderer_metal/mtl_buffer_cache.h"
|
||||||
#include "video_core/renderer_metal/mtl_texture_cache.h"
|
#include "video_core/renderer_metal/mtl_texture_cache.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
@ -102,6 +103,8 @@ private:
|
||||||
const SwapChain& swap_chain;
|
const SwapChain& swap_chain;
|
||||||
|
|
||||||
StagingBufferPool staging_buffer_pool;
|
StagingBufferPool staging_buffer_pool;
|
||||||
|
BufferCacheRuntime buffer_cache_runtime;
|
||||||
|
BufferCache buffer_cache;
|
||||||
TextureCacheRuntime texture_cache_runtime;
|
TextureCacheRuntime texture_cache_runtime;
|
||||||
TextureCache texture_cache;
|
TextureCache texture_cache;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue