Skip to content

Commit

Permalink
Zephyr: Renderer: make a comment in the geometry cache clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
fleroviux committed Sep 12, 2024
1 parent bc57843 commit 1cc01e7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions zephyr/renderer/src/engine/geometry_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ namespace zephyr {

void GeometryCache::QueueGeometryDeleteTaskForNextFrame(const Geometry* geometry) {
/**
* Queue the geometry for eviction from the cache.
* To avoid deleting the geometry before the current frame-in-flight has been rendered,
* these tasks will only be processed at the start of the *next* frame on the render thread.
* Queue the geometry for eviction from the cache, when the next frame begin rendering.
* This ensures that the geometry is only evicted after the current frame has fully rendered.
*/
m_delete_tasks[1].push_back({.geometry = (const Geometry*)geometry});
m_geometry_state_table.erase((const Geometry*)geometry);
Expand Down

0 comments on commit 1cc01e7

Please sign in to comment.