graphics: initialize BDA tables before first buffer registration

Co-authored-by: Leandro Bras <shadowgaming.7@gmail.com>
This commit is contained in:
nmzik
2026-10-21 05:03:34 +02:00
parent 4bb4be50b9
commit 4644c52927
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -256,6 +256,10 @@ BufferCache::BufferCache(GraphicContext& graphics, CommandScheduler& scheduler,
m_gds_buffer.Flush(0, m_gds_buffer.Size());
SetVulkanObjectNameF(m_graphics.device, m_bda_pagetable_buffer.Handle(),
"BDA Page Table Buffer");
m_scheduler.BeginCommand();
for (auto* buffer: {&m_bda_pagetable_buffer, m_fault_manager.GetFaultBuffer()}) {
buffer->Fill(0, buffer->Size(), 0);
}
const auto null_id =
m_slot_buffers.insert(m_graphics, m_scheduler, MemoryUsage::DeviceLocal, 0, AllFlags, 16);
EXIT_IF(null_id != NULL_BUFFER_ID);
@@ -327,7 +327,7 @@ void CommandScheduler::CheckActive() const {
}
CommandBuffer& CommandScheduler::Current() {
CheckActive();
EXIT_IF(m_command.IsInvalid());
return m_command;
}