Skip to content

Commit

Permalink
Update to Babylon.js 7.6.2 (#1373)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bghgary committed May 17, 2024
1 parent 737bc8e commit 4cf5677
Show file tree
Hide file tree
Showing 42 changed files with 486 additions and 555 deletions.
Binary file modified Apps/Playground/ReferenceImages/dynamicTextureClip.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Apps/Playground/ReferenceImages/scissor-test.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 15 additions & 20 deletions Apps/Playground/Scripts/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
},
{
"title": "GLTF ClearCoat",
"playgroundId": "#YG3BBF#4",
"referenceImage": "glTFClearCoat.png",
"renderCount": 50,
"excludeFromAutomaticTesting": false
"playgroundId": "#YG3BBF#33",
"referenceImage": "glTFClearCoat.png"
},
{
"title": "Iridescence GLTF",
Expand Down Expand Up @@ -98,7 +96,7 @@
},
{
"title": "Dynamic Texture context clip",
"playgroundId": "#FU0ES5#37",
"playgroundId": "#FU0ES5#47",
"referenceImage": "dynamicTextureClip.png"
},
{
Expand Down Expand Up @@ -255,27 +253,26 @@
},
{
"title": "Scissor test",
"renderCount": 10,
"playgroundId": "#W7E7CF#12",
"playgroundId": "#W7E7CF#34",
"referenceImage": "scissor-test.png",
"excludedGraphicsApis": [ "D3D12" ],
"comment": "TODO: reenable D3D12 when automatica mip-maps issue is fixed in bgfx"
"comment": "TODO: reenable D3D12 when automatic mip-maps issue is fixed in bgfx"
},
{
"title": "Scissor test with 0.9 hardware scaling",
"renderCount": 10,
"playgroundId": "#W7E7CF#27",
"referenceImage": "scissorTestWith0.9HardwareScaling.png",
"playgroundId": "#W7E7CF#34",
"replace": "//options//, hardwareScalingLevel = 0.9;",
"referenceImage": "scissor-test-2.png",
"excludedGraphicsApis": [ "D3D12" ],
"comment": "TODO: reenable D3D12 when automatica mip-maps issue is fixed in bgfx"
"comment": "TODO: reenable D3D12 when automatic mip-maps issue is fixed in bgfx"
},
{
"title": "Scissor test with 1.5 hardware scaling",
"renderCount": 10,
"playgroundId": "#W7E7CF#28",
"referenceImage": "scissorTestWith1.5HardwareScaling.png",
"playgroundId": "#W7E7CF#34",
"replace": "//options//, hardwareScalingLevel = 1.5;",
"referenceImage": "scissor-test-3.png",
"excludedGraphicsApis": [ "D3D12" ],
"comment": "TODO: reenable D3D12 when automatica mip-maps issue is fixed in bgfx"
"comment": "TODO: reenable D3D12 when automatic mip-maps issue is fixed in bgfx"
},
{
"title": "Scissor test with negative x and y",
Expand Down Expand Up @@ -411,16 +408,14 @@
"playgroundId": "#DS8AA7#27",
"replace": "__folder__, Mesh_PrimitiveMode, __page__, 0, __disableSRGBBuffers__, 0",
"referenceImage": "gltfMeshPrimitiveMode0.png",
"errorRatio": 8.0,
"excludedEngines": [ "webgpu" ]
"errorRatio": 8.0
},
{
"title": "GLTF Mesh Primitive Mode (1)",
"playgroundId": "#DS8AA7#27",
"replace": "__folder__, Mesh_PrimitiveMode, __page__, 1, __disableSRGBBuffers__, 0",
"referenceImage": "gltfMeshPrimitiveMode1.png",
"errorRatio": 8.0,
"excludedEngines": [ "webgpu" ]
"errorRatio": 8.0
},
{
"title": "GLTF Mesh Primitives",
Expand Down
2 changes: 1 addition & 1 deletion Apps/Playground/Scripts/playground_runner.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if (typeof createScene === "function") {
var engine = new BABYLON.NativeEngine({adaptToDeviceRatio: true});
var engine = new BABYLON.NativeEngine({ adaptToDeviceRatio: true });
var scene = createScene();
if (scene.then) {
scene.then(function (scene) {
Expand Down

0 comments on commit 4cf5677

Please sign in to comment.