summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/api.cpp
diff options
context:
space:
mode:
author chaviw <chaviw@google.com> 2021-01-07 13:00:37 -0800
committer chaviw <chaviw@google.com> 2021-01-08 09:52:21 -0800
commitdf3c5e8b16a55b2ab6ec4322e78810ab65842e3f (patch)
treebed6998d1b5ae225cfa2503414d105cb2090e355 /vulkan/libvulkan/api.cpp
parent4d25380ce2b3fb5ffbe422e23c19ad387ec87ce9 (diff)
Fix some issues with pending buffer traces
1. If there is already something in the pending transactions queue, we will skip calling transactionIsReadyToBeApplied. This means we won't increment the buffer count properly. Instead, call transactionIsReadyToBeApplied first since it's pretty harmless and will update the buffer count if needed. 2. updateActiveBuffer can be called multiple times with the same buffer. This is because when checking hasReadyFrame, we only check if something has been modified and there's a buffer. It's possible that the geometry was updated, but we didn't receive a new buffer. In that case, we'd still call updateActiveBuffer. That would call decrementPendingBufferCount which is incorrect since there's no new buffer. Instead, check if the buffer has changed in updateActiveBuffer before calling decrementPendingBufferCount to make sure the buffer getting updated is a new buffer buffer. Test: trace isn't going negative Fixes: 176903239 Change-Id: I0bd492463e5e440db16fc8bef1408b5156e961e4
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
0 files changed, 0 insertions, 0 deletions