Track batch fences with the batches.
This commit is contained in:
@@ -164,8 +164,8 @@ bool CircularBuffer::CanAcquire(VkDeviceSize length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
CircularBuffer::Allocation* CircularBuffer::Acquire(
|
||||
VkDeviceSize length, std::shared_ptr<Fence> fence) {
|
||||
CircularBuffer::Allocation* CircularBuffer::Acquire(VkDeviceSize length,
|
||||
VkFence fence) {
|
||||
VkDeviceSize aligned_length = xe::round_up(length, alignment_);
|
||||
if (!CanAcquire(aligned_length)) {
|
||||
return nullptr;
|
||||
@@ -243,7 +243,7 @@ void CircularBuffer::Clear() {
|
||||
|
||||
void CircularBuffer::Scavenge() {
|
||||
for (auto it = allocations_.begin(); it != allocations_.end();) {
|
||||
if ((*it)->fence->status() != VK_SUCCESS) {
|
||||
if (vkGetFenceStatus(*device_, (*it)->fence) != VK_SUCCESS) {
|
||||
// Don't bother freeing following allocations to ensure proper ordering.
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user