-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace renderOneFrame for per-workspace update calls #353
Conversation
Codecov Report
@@ Coverage Diff @@
## main #353 +/- ##
==========================================
+ Coverage 58.02% 58.20% +0.17%
==========================================
Files 170 170
Lines 16675 16787 +112
==========================================
+ Hits 9676 9771 +95
- Misses 6999 7016 +17
Continue to review full report at Codecov.
|
src/base/BaseScene.cc
Outdated
} | ||
|
||
////////////////////////////////////////////////// | ||
void BaseScene::SetCameraPassCountPerGpuFlush(uint8_t _numPass) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void BaseScene::SetCameraPassCountPerGpuFlush(uint8_t _numPass) | |
void BaseScene::SetCameraPassCountPerGpuFlush(uint8_t /*_numPass*/) |
ogre2/src/Ogre2Scene.cc
Outdated
auto ogreRoot = engine->OgreRoot(); | ||
Ogre::CompositorManager2 *ogreCompMgr = ogreRoot->getCompositorManager2(); | ||
|
||
// engine->OgreRoot()->renderOneFrame(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to better document this.
That line is very useful, specially if debugging "what should happen when you let Ogre do anything" vs "what happens when we do some lower level calls ourselves"
Hi @darksylinc , mind updating the PR title to be a bit more descriptive? Thanks! |
Done! Sorry!!! 😦 |
8b904d8
to
f2d70cd
Compare
This looks good. Can you also update your other branches (ign-sensors and ign-gazebo) to rebase off of |
Signed-off-by: Louise Poubel <[email protected]>
Add Scene::PostRenderGpuFlush Breaks ABI. Needs changes to other components as well, so they call Scene::PostRenderGpuFlush Affects gazebosim#323 Signed-off-by: Matias N. Goldberg <[email protected]>
Affects gazebosim#323 Signed-off-by: Matias N. Goldberg <[email protected]>
Renamed PostRenderGpuFlush to PostRender PostRenderGpuFlush was leaking too much internal behavior of how the engine works into the user. The new way of forcing the user to pair PreRender and PostRender calls is much easier to understand and user-friendly Signed-off-by: Matias N. Goldberg <[email protected]>
Signed-off-by: Matias N. Goldberg <[email protected]>
Signed-off-by: Matias N. Goldberg <[email protected]>
Fixes GpuRays/GpuRaysTest.RaysParticles failure Particle FXs should now be working as intended Signed-off-by: Matias N. Goldberg <[email protected]>
SetNumCameraPassesPerGpuFlush -> SetCameraPassCountPerGpuFlush GetNumCameraPassesPerGpuFlush -> GetCameraPassCountPerGpuFlush GetLegacyAutoGpuFlush -> LegacyAutoGpuFlush Signed-off-by: Matias N. Goldberg <[email protected]>
Signed-off-by: Matias N. Goldberg <[email protected]>
Signed-off-by: Matias N. Goldberg <[email protected]>
Signed-off-by: Matias N. Goldberg <[email protected]>
Signed-off-by: Matias N. Goldberg <[email protected]>
INTEGRATION_depth_camera now succeeds Signed-off-by: Matias N. Goldberg <[email protected]>
Signed-off-by: Matias N. Goldberg <[email protected]>
Signed-off-by: Matias N. Goldberg <[email protected]>
Signed-off-by: Matias N. Goldberg <[email protected]>
Signed-off-by: Matias N. Goldberg <[email protected]>
Fix wrong documentation about currNumCameraPasses Signed-off-by: Matias N. Goldberg <[email protected]>
Signed-off-by: Matias N. Goldberg <[email protected]>
Better document code in FlushGpuCommandsOnly Signed-off-by: Matias N. Goldberg <[email protected]>
- Do not recommend the user to call Camera::PreRender in docs. This is done implicitly via Scene::PreRender - Rename GetCameraPassCountPerGpuFlush -> CameraPassCountPerGpuFlush - CameraPassCountPerGpuFlush was incorrectly always returning 0 - Grammar mistakes in comments Signed-off-by: Matias N. Goldberg <[email protected]>
2ce934c
to
4421164
Compare
Signed-off-by: Matias N. Goldberg <[email protected]>
b5ea685
to
2720eb8
Compare
I'll address style issues in a separate PR
* 🎈 5.1.0 (gazebosim#351) Signed-off-by: Louise Poubel <[email protected]> * Replace renderOneFrame for per-workspace update calls Add Scene::PostRenderGpuFlush Breaks ABI. Needs changes to other components as well, so they call Scene::PostRenderGpuFlush Affects gazebosim#323 Signed-off-by: Matias N. Goldberg <[email protected]> * Add Scene::SetLegacyAutoGpuFlush Affects gazebosim#323 Signed-off-by: Matias N. Goldberg <[email protected]> * Add Scene::SetNumCameraPassesPerGpuFlush Renamed PostRenderGpuFlush to PostRender PostRenderGpuFlush was leaking too much internal behavior of how the engine works into the user. The new way of forcing the user to pair PreRender and PostRender calls is much easier to understand and user-friendly Signed-off-by: Matias N. Goldberg <[email protected]> * Assert when PreRender/PostRender calls are used incorrectly Signed-off-by: Matias N. Goldberg <[email protected]> * Fix warnings generated by gazebo in legacy mode Signed-off-by: Matias N. Goldberg <[email protected]> * Add missing listener triggers Fixes GpuRays/GpuRaysTest.RaysParticles failure Particle FXs should now be working as intended Signed-off-by: Matias N. Goldberg <[email protected]> * Rename functions to be consistent w/ Ignition naming convention SetNumCameraPassesPerGpuFlush -> SetCameraPassCountPerGpuFlush GetNumCameraPassesPerGpuFlush -> GetCameraPassCountPerGpuFlush GetLegacyAutoGpuFlush -> LegacyAutoGpuFlush Signed-off-by: Matias N. Goldberg <[email protected]> * Document that SetCameraPassCountPerGpuFlush is an upper bound Signed-off-by: Matias N. Goldberg <[email protected]> * Document Camera::Update shouldn't be called if there's many cameras Signed-off-by: Matias N. Goldberg <[email protected]> * Check in Render() call that we're inside PreRender / PostRender Signed-off-by: Matias N. Goldberg <[email protected]> * Fix INTEGRATION_camera crash Signed-off-by: Matias N. Goldberg <[email protected]> * Fix EndFrame not getting called when in non-legacy mode INTEGRATION_depth_camera now succeeds Signed-off-by: Matias N. Goldberg <[email protected]> * Fix wrong documentation about Camera::Capture Signed-off-by: Matias N. Goldberg <[email protected]> * Update Migration notes w/ Scene::PostRender Signed-off-by: Matias N. Goldberg <[email protected]> * Add missing call in doc's recomendations Signed-off-by: Matias N. Goldberg <[email protected]> * Improve documentation and make asserts more helpful Signed-off-by: Matias N. Goldberg <[email protected]> * Default cameraPassCountPerGpuFlush until all modules are merged Fix wrong documentation about currNumCameraPasses Signed-off-by: Matias N. Goldberg <[email protected]> * Remove unnecessary headers Signed-off-by: Matias N. Goldberg <[email protected]> * Style changes for consistency with the rest of the codebase Better document code in FlushGpuCommandsOnly Signed-off-by: Matias N. Goldberg <[email protected]> * Multiple fixes - Do not recommend the user to call Camera::PreRender in docs. This is done implicitly via Scene::PreRender - Rename GetCameraPassCountPerGpuFlush -> CameraPassCountPerGpuFlush - CameraPassCountPerGpuFlush was incorrectly always returning 0 - Grammar mistakes in comments Signed-off-by: Matias N. Goldberg <[email protected]> * Make cameraPassCountPerGpuFlush default to 6 Signed-off-by: Matias N. Goldberg <[email protected]> Co-authored-by: Louise Poubel <[email protected]> Signed-off-by: William Lew <[email protected]>
🎉 New feature
Implements #323 for ign-rendering
Summary
Explanation is in the ticket
The ticket shouldn't be closed until all modules are merged.
Test it
This PR is currently defaulting
SetCameraPassCountPerGpuFlush
to 0 avoid breaking ign-sensors.In order to fully test it, checkout:
And set
SetCameraPassCountPerGpuFlush
to non-0 (e.g. setOgre2ScenePrivate::cameraPassCountPerGpuFlush
to 6)This change is mostly a performance one; but it also affects particle FXs (and possibly some postprocessing FXs) because without this PR, Ogre2GpuRays rendering a cubemap with particle FXs will render each of the 6 faces in a different time; i.e. as if the simulation moved forward 6 times
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge