Skip to content

Conversation

@show50726
Copy link
Contributor

@show50726 show50726 commented Nov 3, 2025

To focus on the integration logic added in this PR, please ignore BufferAllocator and UboManager and their related tests. They were introduced in the base PR (#9331).

Changes

  • Engine
    • The engine now owns the UboManager. It initializes it, calls its beginFrame/endFrame methods, and manages MaterialInstance slot retirement on destruction.
  • MaterialInstance
    • Constructors are updated to accept a useUboBatching flag.
    • commit() now writes data to the shared buffer via uboManager->updateSlot.
    • use() now binds the shared buffer using its dynamic offset.
  • Material
    • createInstance() methods are updated to pass the useUboBatching flag to the MaterialInstance.
  • PostProcessManager
    • All calls to mi->commit(driver) are updated to mi->commit(driver, mEngine.getUboManager()) to pass the manager.
  • Renderer
    • At endFrame(), it now notifies the UboManager to create a fence for GPU synchronization.
  • filamat
    • Updated to set the DYNAMIC_OFFSET flag for the material's uniform buffer, so that it could update the offset without recreating the descriptor set.

@show50726 show50726 added the internal Issue/PR does not affect clients label Nov 3, 2025
@show50726 show50726 changed the title [depends on #9331] Integrate UboManager into the engine [depends on #9331] buffer update opt: Integrate UboManager into the engine Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Issue/PR does not affect clients

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant