mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
Merge pull request #12382 from liamwhite/image-limit
renderer_vulkan: allow up to 7 swapchain images
This commit is contained in:
commit
efe52db690
@ -270,7 +270,7 @@ private:
|
|||||||
|
|
||||||
std::jthread fence_thread;
|
std::jthread fence_thread;
|
||||||
|
|
||||||
DelayedDestructionRing<TFence, 6> delayed_destruction_ring;
|
DelayedDestructionRing<TFence, 8> delayed_destruction_ring;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace VideoCommon
|
} // namespace VideoCommon
|
||||||
|
@ -293,10 +293,10 @@ void PresentManager::RecreateSwapchain(Frame* frame) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PresentManager::SetImageCount() {
|
void PresentManager::SetImageCount() {
|
||||||
// We cannot have more than 5 images in flight at any given time.
|
// We cannot have more than 7 images in flight at any given time.
|
||||||
// FRAMES_IN_FLIGHT is 7, and the cache TICKS_TO_DESTROY is 6.
|
// FRAMES_IN_FLIGHT is 8, and the cache TICKS_TO_DESTROY is 8.
|
||||||
// Mali drivers will give us 6.
|
// Mali drivers will give us 6.
|
||||||
image_count = std::min<size_t>(swapchain.GetImageCount(), 5);
|
image_count = std::min<size_t>(swapchain.GetImageCount(), 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PresentManager::CopyToSwapchain(Frame* frame) {
|
void PresentManager::CopyToSwapchain(Frame* frame) {
|
||||||
|
@ -31,7 +31,7 @@ struct DescriptorUpdateEntry {
|
|||||||
class UpdateDescriptorQueue final {
|
class UpdateDescriptorQueue final {
|
||||||
// This should be plenty for the vast majority of cases. Most desktop platforms only
|
// This should be plenty for the vast majority of cases. Most desktop platforms only
|
||||||
// provide up to 3 swapchain images.
|
// provide up to 3 swapchain images.
|
||||||
static constexpr size_t FRAMES_IN_FLIGHT = 7;
|
static constexpr size_t FRAMES_IN_FLIGHT = 8;
|
||||||
static constexpr size_t FRAME_PAYLOAD_SIZE = 0x20000;
|
static constexpr size_t FRAME_PAYLOAD_SIZE = 0x20000;
|
||||||
static constexpr size_t PAYLOAD_SIZE = FRAME_PAYLOAD_SIZE * FRAMES_IN_FLIGHT;
|
static constexpr size_t PAYLOAD_SIZE = FRAME_PAYLOAD_SIZE * FRAMES_IN_FLIGHT;
|
||||||
|
|
||||||
|
@ -474,7 +474,7 @@ private:
|
|||||||
};
|
};
|
||||||
Common::LeastRecentlyUsedCache<LRUItemParams> lru_cache;
|
Common::LeastRecentlyUsedCache<LRUItemParams> lru_cache;
|
||||||
|
|
||||||
static constexpr size_t TICKS_TO_DESTROY = 6;
|
static constexpr size_t TICKS_TO_DESTROY = 8;
|
||||||
DelayedDestructionRing<Image, TICKS_TO_DESTROY> sentenced_images;
|
DelayedDestructionRing<Image, TICKS_TO_DESTROY> sentenced_images;
|
||||||
DelayedDestructionRing<ImageView, TICKS_TO_DESTROY> sentenced_image_view;
|
DelayedDestructionRing<ImageView, TICKS_TO_DESTROY> sentenced_image_view;
|
||||||
DelayedDestructionRing<Framebuffer, TICKS_TO_DESTROY> sentenced_framebuffers;
|
DelayedDestructionRing<Framebuffer, TICKS_TO_DESTROY> sentenced_framebuffers;
|
||||||
|
Loading…
Reference in New Issue
Block a user