texture_cache: detiler: change staging to faster stream buffer
This commit is contained in:
parent
bee444b6da
commit
b59e525408
|
@ -64,10 +64,9 @@ static constexpr u64 PageShift = 12;
|
|||
|
||||
TextureCache::TextureCache(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_)
|
||||
: instance{instance_}, scheduler{scheduler_},
|
||||
staging{instance, scheduler,
|
||||
vk::BufferUsageFlagBits::eTransferSrc | vk::BufferUsageFlagBits::eStorageBuffer,
|
||||
StreamBufferSize, Vulkan::BufferType::Upload},
|
||||
tile_manager{instance, scheduler, *this, staging} {
|
||||
staging{instance, scheduler, vk::BufferUsageFlagBits::eTransferSrc, StreamBufferSize,
|
||||
Vulkan::BufferType::Upload},
|
||||
tile_manager{instance, scheduler, *this} {
|
||||
|
||||
#ifndef _WIN64
|
||||
sigset_t signal_mask;
|
||||
|
|
|
@ -202,9 +202,14 @@ const DetilerContext* TileManager::GetDetiler(const Image& image) const {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
static constexpr vk::BufferUsageFlags StagingFlags = vk::BufferUsageFlagBits::eTransferDst |
|
||||
vk::BufferUsageFlagBits::eUniformBuffer |
|
||||
vk::BufferUsageFlagBits::eStorageBuffer;
|
||||
|
||||
TileManager::TileManager(const Vulkan::Instance& instance, Vulkan::Scheduler& scheduler,
|
||||
TextureCache& texture_cache, Vulkan::StreamBuffer& staging)
|
||||
: instance{instance}, scheduler{scheduler}, texture_cache{texture_cache}, staging{staging} {
|
||||
TextureCache& texture_cache)
|
||||
: instance{instance}, scheduler{scheduler}, texture_cache{texture_cache},
|
||||
staging{instance, scheduler, StagingFlags, 64_MB} {
|
||||
|
||||
static const std::array detiler_shaders{
|
||||
HostShaders::DETILE_M8X1_COMP,
|
||||
|
|
|
@ -32,7 +32,7 @@ struct DetilerContext {
|
|||
class TileManager {
|
||||
public:
|
||||
TileManager(const Vulkan::Instance& instance, Vulkan::Scheduler& scheduler,
|
||||
TextureCache& texture_cache, Vulkan::StreamBuffer& staging);
|
||||
TextureCache& texture_cache);
|
||||
~TileManager();
|
||||
|
||||
bool TryDetile(Image& image);
|
||||
|
@ -44,7 +44,7 @@ private:
|
|||
const Vulkan::Instance& instance;
|
||||
Vulkan::Scheduler& scheduler;
|
||||
TextureCache& texture_cache;
|
||||
Vulkan::StreamBuffer& staging;
|
||||
Vulkan::StreamBuffer staging;
|
||||
std::array<DetilerContext, DetilerType::Max> detilers;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue