Fix copyGpuBuffers when resize invalidates commands in flight (#876)

* Fix copyGpuBuffers when resize invalidates commands in flight

* Use _MB macro for size constant
This commit is contained in:
baggins183 2024-09-12 12:54:54 -07:00 committed by GitHub
parent 1b12138cda
commit bc66fe8fb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 0 deletions

View file

@ -1088,6 +1088,15 @@ public:
submit_cv.notify_one();
}
void reserveCopyBufferSpace() {
GpuQueue& gfx_queue = mapped_queues[GfxQueueId];
std::scoped_lock<std::mutex> lk(gfx_queue.m_access);
constexpr size_t GfxReservedSize = 2_MB >> 2;
gfx_queue.ccb_buffer.reserve(GfxReservedSize);
gfx_queue.dcb_buffer.reserve(GfxReservedSize);
}
private:
struct Task {
struct promise_type {