Skip to content

Commit

Permalink
change shrinkSize position
Browse files Browse the repository at this point in the history
  • Loading branch information
star-e committed Dec 5, 2024
1 parent 152ec27 commit a77cf25
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions native/cocos/renderer/gfx-vulkan/VKDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,10 +642,6 @@ void CCVKDevice::acquire(Swapchain *const *swapchains, uint32_t count) {
_gpuDescriptorSetHub->flush();
_gpuSemaphorePool->reset();

auto *bufferPool = gpuStagingBufferPool();
bufferPool->reset();
bufferPool->shrinkSize();

for (uint32_t i = 0; i < vkSwapchains.size(); ++i) {
VkSemaphore acquireSemaphore = _gpuSemaphorePool->alloc();
VkResult res = vkAcquireNextImageKHR(_gpuDevice->vkDevice, vkSwapchains[i], ~0ULL,
Expand Down Expand Up @@ -724,6 +720,7 @@ void CCVKDevice::present() {
gpuFencePool()->reset();
gpuRecycleBin()->clear();
gpuStagingBufferPool()->reset();
gpuStagingBufferPool()->shrinkSize();
if (_xr) {
_xr->postGFXDevicePresent(_api);
}
Expand Down

0 comments on commit a77cf25

Please sign in to comment.