Skip to content
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

Merged
merged 13 commits into from
Mar 20, 2024
Merged

fix cancel render loop #14868

merged 13 commits into from
Mar 20, 2024

Conversation

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 14, 2024

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 14, 2024

Copy link
Member

@RaananW RaananW left a 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.

packages/dev/core/src/Engines/engine.ts Outdated Show resolved Hide resolved
@bjsplat
Copy link
Collaborator

bjsplat commented Mar 14, 2024

Visualization tests for WebGPU (Experimental)
Important - these might fail sporadically. This is an optional test.

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14868/merge/testResults/webgpuplaywright/index.html

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 14, 2024

packages/dev/core/src/Engines/engine.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Engines/engine.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Engines/engine.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Engines/engine.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Engines/thinEngine.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Engines/thinEngine.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Engines/thinEngine.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Engines/thinEngine.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Engines/thinEngine.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Engines/thinEngine.ts Outdated Show resolved Hide resolved
sebavan and others added 9 commits March 19, 2024 16:36
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>
@bjsplat
Copy link
Collaborator

bjsplat commented Mar 19, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 19, 2024

Visualization tests for WebGPU (Experimental)
Important - these might fail sporadically. This is an optional test.

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14868/merge/testResults/webgpuplaywright/index.html

1 similar comment
@bjsplat
Copy link
Collaborator

bjsplat commented Mar 19, 2024

Visualization tests for WebGPU (Experimental)
Important - these might fail sporadically. This is an optional test.

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14868/merge/testResults/webgpuplaywright/index.html

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 19, 2024

1 similar comment
@bjsplat
Copy link
Collaborator

bjsplat commented Mar 19, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 19, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 19, 2024

Visualization tests for WebGPU (Experimental)
Important - these might fail sporadically. This is an optional test.

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14868/merge/testResults/webgpuplaywright/index.html

@sebavan sebavan requested a review from Popov72 March 19, 2024 21:01
@sebavan sebavan marked this pull request as ready for review March 20, 2024 17:05
@sebavan sebavan merged commit 95aa675 into BabylonJS:master Mar 20, 2024
11 checks passed
bghgary added a commit to BabylonJS/BabylonNative that referenced this pull request May 17, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants