-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
fix cancel render loop #14868
fix cancel render loop #14868
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14868/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/14868/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/14868/merge#BCU1XR#0 |
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.
LGTM.
I thought it might not be needed to check for frameHandler > -1 when cancelling, but better stay safe there.
Visualization tests for WebGPU (Experimental) |
WebGL2 visualization test reporter: |
Co-authored-by: Popov72 <github@evpopov.com>
Co-authored-by: Popov72 <github@evpopov.com>
Co-authored-by: Popov72 <github@evpopov.com>
Co-authored-by: Popov72 <github@evpopov.com>
Co-authored-by: Popov72 <github@evpopov.com>
Co-authored-by: Popov72 <github@evpopov.com>
Co-authored-by: Popov72 <github@evpopov.com>
Co-authored-by: Popov72 <github@evpopov.com>
Co-authored-by: Popov72 <github@evpopov.com>
WebGL2 visualization test reporter: |
Visualization tests for WebGPU (Experimental) |
1 similar comment
Visualization tests for WebGPU (Experimental) |
WebGL2 visualization test reporter: |
1 similar comment
WebGL2 visualization test reporter: |
WebGL2 visualization test reporter: |
Visualization tests for WebGPU (Experimental) |
Updating to Babylon.js version 7.0.0 reveals a whole slew of issues when running the validation tests because [#14868](BabylonJS/Babylon.js#14868) broke the render loop stopping behavior when running in native. Native does not implement a way to cancel a requested animation frame. This missing canceling functionality should be added to native someday, but, in the meantime, [#15086](BabylonJS/Babylon.js#15086) will make it behave like it did before. These changes fix potential issues in the code regardless of what happened on the JS side. - Update to latest JsRuntimeHost with lots of fixes. - Call SetRenderResetCallback with null to clear the callback that can cause a crash on shutdown. - Update a few validation tests to not use render count. - Update scripts to use `const`/`let` instead of `var`. - Update validation script to handle some errors better and clean up dead code. - Add unhandled exception handler to Playground app so that validation test will report correct errors and exit correctly. - Change core graphics device implemenation to update bgfx state right before requesting screenshots. This will ensure the screenshot is the right size if the resolution has changed. - Fix TestUtils:WritePNG to return an error when the byte length is an unexpected size instead of silently failing. - Change TestUtils::SetTitle to update the HWND title on a background thread to avoid dead lock with the main thread. - Update dynamic texture clip test to newest version that will fail if the feature is not working.
https://forum.babylonjs.com/t/stopping-render-loop-and-then-immediately-running-it-again-causes-double-frames/48599