Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce3ac11

Browse files
committed
Note the possibility of validation layer errors rather than increasing memory usage in the 'frames in flight' section
1 parent 388e345 commit ce3ac11

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

en/03_Drawing_a_triangle/03_Drawing/02_Rendering_and_presentation.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,7 @@ when closing the window.
349349

350350
## Frames in flight
351351

352-
If you run your application with validation layers enabled and you monitor the
353-
memory usage of your application, you may notice that it is slowly growing. The reason for this is that the application is rapidly submitting work in the `drawFrame` function, but doesn't actually check if any of it finishes. If the CPU is submitting work faster than the GPU can keep up with then the queue will slowly fill up with work. Worse, even, is that we are reusing the `imageAvailableSemaphore` and `renderFinishedSemaphore` for multiple frames at the same time.
352+
If you run your application with validation layers enabled now you may either get errors or notice that the memory usage slowly grows. The reason for this is that the application is rapidly submitting work in the `drawFrame` function, but doesn't actually check if any of it finishes. If the CPU is submitting work faster than the GPU can keep up with then the queue will slowly fill up with work. Worse, even, is that we are reusing the `imageAvailableSemaphore` and `renderFinishedSemaphore` semaphores, along with the command buffers, for multiple frames at the same time!
354353

355354
The easy way to solve this is to wait for work to finish right after submitting it, for example by using `vkQueueWaitIdle`:
356355

0 commit comments

Comments
 (0)