• Advertisement
Sign in to follow this  

Managing pipeline dependencies in a submission-based renderer

This topic is 1767 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

  Submission-based engines and stateless renderers (of which the only example i could find is bgfx: https://github.com/bkaradzic/bgfx) are said to be vastly superior than state-machine based APIs. The idea consists in accumulating all the necessary states for making a draw call (helps debugging and filtering out redundant state changes), queuing up the entire frame, sorting the render queue and issuing graphics commands in correct and optimal order.


  But in my engine batched draw calls (RenderItems, RenderOps) are not self-contained, they depend on several global constant buffers (per-frame, per-view, per-object, per-material, per-light, etc.), e.g. the cbPerObject buffer should be updated with fresh data before rendering the actual object and some textures must be updated first before being fed to further stages in the post-processing pipeline and so on.

  Of course, i could create a separate CB for each object, material, etc., but that seems pretty wasteful to me (eschewed approach in DirectX SDK examples).


  How can i ensure the correct execution order (Update,Set,Draw) after sorting the render queue ?




Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement