fix: Async Compute

This commit is contained in:
Anish Bhobe 2025-05-28 20:58:00 +02:00
parent cfb76c7d78
commit cc1fd12b64
2 changed files with 8 additions and 1 deletions

View File

@ -386,7 +386,7 @@ struct Frame
// TODO: ThreadSafe
_internal::GraphicsContextPool m_PrimaryPool;
_internal::TransferContextPool m_AsyncTransferPool;
_internal::ContextPool m_AsyncComputePool;
_internal::ComputeContextPool m_AsyncComputePool;
vk::Fence m_FrameAvailableFence;
vk::Semaphore m_ImageAcquireSem;
@ -402,6 +402,7 @@ struct Frame
void Reset(u32 imageIdx, vk::Image swapchainImage, vk::ImageView swapchainImageView, Size2D swapchainSize);
GraphicsContext CreateGraphicsContext();
TransferContext CreateAsyncTransferContext();
ComputeContext CreateAsyncComputeContext();
void WaitUntilReady();
Frame() = default;

View File

@ -1286,6 +1286,12 @@ systems::Frame::CreateAsyncTransferContext()
return m_AsyncTransferPool.CreateTransferContext();
}
systems::ComputeContext
systems::Frame::CreateAsyncComputeContext()
{
return m_AsyncComputePool.CreateComputeContext();
}
void
systems::Frame::WaitUntilReady()
{