mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-07-01 22:16:28 +02:00
Revert "fixup descriptor"
This reverts commit 5c790d94b01a4d92563a9923e40e86ceb85642eb.
This commit is contained in:
parent
544515cf94
commit
c1849ddc8e
2 changed files with 9 additions and 7 deletions
|
|
@ -18,7 +18,8 @@ namespace Vulkan {
|
||||||
UpdateDescriptorQueue::UpdateDescriptorQueue(const Device& device_)
|
UpdateDescriptorQueue::UpdateDescriptorQueue(const Device& device_)
|
||||||
: device{device_}
|
: device{device_}
|
||||||
{
|
{
|
||||||
payload_start = payload_cursor = payload.data();
|
payload_start = payload.data();
|
||||||
|
payload_cursor = payload.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateDescriptorQueue::~UpdateDescriptorQueue() = default;
|
UpdateDescriptorQueue::~UpdateDescriptorQueue() = default;
|
||||||
|
|
@ -32,8 +33,12 @@ void UpdateDescriptorQueue::TickFrame() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateDescriptorQueue::Acquire(Scheduler& scheduler) {
|
void UpdateDescriptorQueue::Acquire(Scheduler& scheduler) {
|
||||||
if (std::distance(payload_start, payload_cursor) + MIN_ENTRIES > ptrdiff_t(FRAME_PAYLOAD_SIZE)) {
|
// Minimum number of entries required.
|
||||||
LOG_WARNING(Render_Vulkan, "Payload overflow {}, waiting for worker thread", std::distance(payload_start, payload_cursor));
|
// This is the maximum number of entries a single draw call might use.
|
||||||
|
static constexpr size_t MIN_ENTRIES = 0x400;
|
||||||
|
|
||||||
|
if (std::distance(payload_start, payload_cursor) + MIN_ENTRIES >= FRAME_PAYLOAD_SIZE) {
|
||||||
|
LOG_WARNING(Render_Vulkan, "Payload overflow, waiting for worker thread");
|
||||||
scheduler.WaitWorker();
|
scheduler.WaitWorker();
|
||||||
payload_cursor = payload_start;
|
payload_cursor = payload_start;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,10 @@ union DescriptorUpdateEntry {
|
||||||
};
|
};
|
||||||
|
|
||||||
class UpdateDescriptorQueue final {
|
class UpdateDescriptorQueue final {
|
||||||
// Minimum number of entries required. This is the maximum number of entries a single draw call might use.
|
|
||||||
static constexpr size_t MIN_ENTRIES = 0x400;
|
|
||||||
// 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 = 8;
|
static constexpr size_t FRAMES_IN_FLIGHT = 8;
|
||||||
// Mario Jamboree on minigames uses up to 0x21xxx entries at a time
|
static constexpr size_t FRAME_PAYLOAD_SIZE = 0x20000;
|
||||||
static constexpr size_t FRAME_PAYLOAD_SIZE = 0x24000;
|
|
||||||
static constexpr size_t PAYLOAD_SIZE = FRAME_PAYLOAD_SIZE * FRAMES_IN_FLIGHT;
|
static constexpr size_t PAYLOAD_SIZE = FRAME_PAYLOAD_SIZE * FRAMES_IN_FLIGHT;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue