From c2e403367812e4af996b2d2883a935980a7e501a Mon Sep 17 00:00:00 2001 From: Branimir Karadzic Date: Tue, 9 Jun 2026 15:54:52 -0700 Subject: [PATCH 1/4] Playground: re-enable 16 validation tests passing on D3D11 + OpenGL Each test was verified to pass both in isolation and in the full validation_native.js sweep on Win32 D3D11 and OpenGL after the latest master (incl. #1739 divisor-driven instancing and #1652 thread-model rework). Stencil/scissor state-leak cascade causers were intentionally left excluded. Re-enabled: Area Lights - Standard Material, Area Lights - PBR, GLTF Node visibility test, Export GLTF Extension KHR_texture_transform, simple-render-target-with-blue-spheres, pillars-sphere-and-torus-with-PCSS-shadows, torus-knot-mirror, simple-sphere-in-4-mirrors, procedural-texture-with-node-material, simple-custom-shader, change-texture-of-material, OpenPBR Thin Film Weight VS IOR / Thickness VS IOR / and Specular Weight / and Specular Weight Metals - Analytic Lights, WebGPU async pipeline pre-warming. D3D11: ran=289 passed=289 failed=0; OpenGL: ran=280 passed=280 failed=0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Apps/Playground/Scripts/config.json | 38 +++-------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/Apps/Playground/Scripts/config.json b/Apps/Playground/Scripts/config.json index d3a315239..f2abb6702 100644 --- a/Apps/Playground/Scripts/config.json +++ b/Apps/Playground/Scripts/config.json @@ -1194,8 +1194,6 @@ { "title": "Area Lights - Standard Material", "playgroundId": "#T7FXR8#67", - "excludeFromAutomaticTesting": true, - "reason": "Test crashes or hangs on Babylon Native", "referenceImage": "areaLightsStandardMaterial.png" }, { @@ -1215,8 +1213,6 @@ { "title": "Area Lights - PBR", "playgroundId": "#T7FXR8#12", - "excludeFromAutomaticTesting": true, - "reason": "Test crashes or hangs on Babylon Native", "referenceImage": "areaLightsPBRMaterial.png" }, { @@ -1514,9 +1510,7 @@ { "title": "GLTF Node visibility test", "playgroundId": "#80DN99#6", - "referenceImage": "gltfNodeVisibility.png", - "excludeFromAutomaticTesting": true, - "reason": "Test crashes on Win32 D3D11 Sanitizers" + "referenceImage": "gltfNodeVisibility.png" }, { "title": "Asset Containers", @@ -2307,8 +2301,6 @@ { "title": "Export GLTF Extension KHR_texture_transform", "playgroundId": "#20OAV9#15148", - "excludeFromAutomaticTesting": true, - "reason": "Test crashes or hangs on Babylon Native", "referenceImage": "exportGltfKHRTextureTransform.png" }, { @@ -2590,15 +2582,11 @@ { "title": "simple-render-target-with-blue-spheres", "playgroundId": "#NRR7F4#0", - "excludeFromAutomaticTesting": true, - "reason": "Pixel comparison fails on Win32 D3D11 / Sanitizers (44605 px diff)", "referenceImage": "simple-render-target-with-blue-spheres.png" }, { "title": "pillars-sphere-and-torus-with-PCSS-shadows", "playgroundId": "#WL4Q8J#0", - "excludeFromAutomaticTesting": true, - "reason": "Pixel difference (~185,225 pixels) on Win32 D3D11 after newly synced from Babylon.js.", "referenceImage": "pillars-sphere-and-torus-with-PCSS-shadows.png" }, { @@ -2611,23 +2599,17 @@ { "title": "torus-knot-mirror", "playgroundId": "#M5GFLR#0", - "excludeFromAutomaticTesting": true, - "reason": "Pixel difference (~182,593 pixels) on Win32 D3D11 after newly synced from Babylon.js.", "referenceImage": "torus-knot-mirror.png" }, { "title": "simple-sphere-in-4-mirrors", "playgroundId": "#58CFTW#4", - "excludeFromAutomaticTesting": true, - "reason": "Pixel difference (~183,312 pixels) on Linux OpenGL and Win32 D3D11 after newly synced from Babylon.js.", "referenceImage": "simple-sphere-in-4-mirrors.png" }, { "title": "procedural-texture-with-node-material", "playgroundId": "#IA4X0H#1", "renderCount": 10, - "excludeFromAutomaticTesting": true, - "reason": "Pixel difference (~102,584 pixels) on Linux OpenGL and Win32 D3D11 after newly synced from Babylon.js.", "referenceImage": "procedural-texture-with-node-material.png" }, { @@ -2642,9 +2624,7 @@ "title": "simple-custom-shader", "playgroundId": "#6GFJNR#2", "renderCount": 5, - "referenceImage": "simple-custom-shader.png", - "excludeFromAutomaticTesting": true, - "reason": "Pixel comparison fails on Linux and Win32 D3D11 after newly synced from Babylon.js." + "referenceImage": "simple-custom-shader.png" }, { "title": "show-multiple-guis", @@ -2717,9 +2697,7 @@ "title": "change-texture-of-material", "playgroundId": "#7PN9PH#2", "renderCount": 10, - "referenceImage": "change-texture-of-material.png", - "excludeFromAutomaticTesting": true, - "reason": "Newly added test fails: 35k pixel difference on Linux Clang/GCC JSC and Win32 D3D11." + "referenceImage": "change-texture-of-material.png" }, { "title": "screen-space-curvature", @@ -3660,15 +3638,11 @@ { "title": "OpenPBR Thin Film Weight VS IOR - Analytic Lights", "playgroundId": "#GRQHVV#87", - "excludeFromAutomaticTesting": true, - "reason": "Test crashes or hangs on Babylon Native", "referenceImage": "OpenPBR-Thin-Film-Weight-VS-IOR---Analytic-Lights.png" }, { "title": "OpenPBR Thin Film Thickness VS IOR - Analytic Lights", "playgroundId": "#GRQHVV#88", - "excludeFromAutomaticTesting": true, - "reason": "Test crashes or hangs on Babylon Native", "referenceImage": "OpenPBR-Thin-Film-Thickness-VS-IOR---Analytic-Lights.png" }, { @@ -3702,15 +3676,11 @@ { "title": "OpenPBR Thin Film and Specular Weight - Analytic Lights", "playgroundId": "#GRQHVV#95", - "excludeFromAutomaticTesting": true, - "reason": "Test crashes or hangs on Babylon Native", "referenceImage": "OpenPBR-Thin-Film-and-Specular-Weight---Analytic-Lights.png" }, { "title": "OpenPBR Thin Film and Specular Weight Metals - Analytic Lights", "playgroundId": "#GRQHVV#96", - "excludeFromAutomaticTesting": true, - "reason": "Test crashes or hangs on Babylon Native", "referenceImage": "OpenPBR-Thin-Film-and-Specular-Weight-Metals---Analytic-Lights.png" }, { @@ -4829,8 +4799,6 @@ { "title": "WebGPU async pipeline pre-warming", "playgroundId": "#823Q62#0", - "excludeFromAutomaticTesting": true, - "reason": "Requires WebGL2-only feature (not supported by Babylon Native)", "referenceImage": "webgpuAsyncPipelinePreWarm.png" } ] From a2e8c82ed3ff8408c1ca7fd40e93719d1ddfd4a4 Mon Sep 17 00:00:00 2001 From: Branimir Karadzic Date: Tue, 9 Jun 2026 16:41:11 -0700 Subject: [PATCH 2/4] Playground: reset stencil/scissor between validation tests; enable stencil test, re-exclude Area Lights on Linux The validation harness reuses one engine across all tests but only reset hardware scaling and effects between them. A test leaving the stencil test enabled or a scissor rect set corrupted later tests (e.g. the glow-layer test failed with 235275 px diff after the stencil test). Reset both in the per-test cleanup via engine.setStencilBuffer(false) + engine.disableScissor(). Note JS-side wipeCaches/StencilState.reset do not clear the native stencil state; only setStencilBuffer(false) emits the disable command. With the leak fixed, re-enable cube-with-holes-using-stencil-buffer. Re-exclude Area Lights - Standard Material / PBR: they render black on Linux desktop OpenGL (area-light LTC path unsupported) though they pass on Win32 D3D11 and Windows ANGLE GL. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Apps/Playground/Scripts/config.json | 12 +++++++----- Apps/Playground/Scripts/validation_native.js | 6 ++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Apps/Playground/Scripts/config.json b/Apps/Playground/Scripts/config.json index f2abb6702..667aa768d 100644 --- a/Apps/Playground/Scripts/config.json +++ b/Apps/Playground/Scripts/config.json @@ -310,7 +310,7 @@ "replace": "//options//, hardwareScalingLevel = 0.9;", "referenceImage": "scissor-test-2.png", "excludeFromAutomaticTesting": true, - "reason": "Suspected to cause later Win32 D3D11 cascade crash; also pixel diff fail on Linux (56223 px diff)" + "reason": "State-leak cascade fixed in validation_native.js (stencil/scissor reset between tests); remains excluded only due to pixel diff fail on Linux (56223 px diff) under 0.9 hardware scaling." }, { "title": "Scissor test with 1.5 hardware scaling", @@ -1194,6 +1194,8 @@ { "title": "Area Lights - Standard Material", "playgroundId": "#T7FXR8#67", + "excludeFromAutomaticTesting": true, + "reason": "Renders black on Linux desktop OpenGL (area-light LTC path unsupported); passes on Win32 D3D11 and Windows ANGLE GL.", "referenceImage": "areaLightsStandardMaterial.png" }, { @@ -1213,6 +1215,8 @@ { "title": "Area Lights - PBR", "playgroundId": "#T7FXR8#12", + "excludeFromAutomaticTesting": true, + "reason": "Renders black on Linux desktop OpenGL (area-light LTC path unsupported); passes on Win32 D3D11 and Windows ANGLE GL.", "referenceImage": "areaLightsPBRMaterial.png" }, { @@ -2036,7 +2040,7 @@ "replace": "//options//, hardwareScalingLevel = 0.9;", "referenceImage": "scissor-test-2.png", "excludeFromAutomaticTesting": true, - "reason": "Suspected to cause later Win32 D3D11 cascade crash; also pixel diff fail on Linux (56223 px diff)" + "reason": "State-leak cascade fixed in validation_native.js (stencil/scissor reset between tests); remains excluded only due to pixel diff fail on Linux (56223 px diff) under 0.9 hardware scaling." }, { "title": "Scissor test with 1.5 hardware scaling", @@ -2536,9 +2540,7 @@ { "title": "cube-with-holes-using-stencil-buffer", "playgroundId": "#CW5PRI#11", - "referenceImage": "cube-with-holes-using-stencil-buffer.png", - "excludeFromAutomaticTesting": true, - "reason": "Disabled to land sync PR; newly-added test in cascade path of Win32 V8 D3D11 ACCESS_VIOLATION (-1073741819). Will be re-enabled in follow-up fix PR." + "referenceImage": "cube-with-holes-using-stencil-buffer.png" }, { "title": "water-material", diff --git a/Apps/Playground/Scripts/validation_native.js b/Apps/Playground/Scripts/validation_native.js index 686280208..0b75478a8 100644 --- a/Apps/Playground/Scripts/validation_native.js +++ b/Apps/Playground/Scripts/validation_native.js @@ -194,6 +194,12 @@ currentScene = null; engine.setHardwareScalingLevel(1); + // Reset render state that persists on the reused engine so each test starts fresh. + // A test that leaves the stencil test enabled or a scissor rect set would otherwise + // corrupt later tests (e.g. the glow-layer test). + engine.setStencilBuffer(false); + engine.disableScissor(); + // This is necessary because of https://github.com/BabylonJS/Babylon.js/pull/15217 so that each test starts fresh. engine.releaseEffects(); From 9bd7f1f1b0b6ee287c3879dcd5167feba9996b6e Mon Sep 17 00:00:00 2001 From: Branimir Karadzic Date: Tue, 9 Jun 2026 16:52:28 -0700 Subject: [PATCH 3/4] Playground: re-exclude OpenPBR Thin Film Analytic Lights tests on Linux These 4 thin-film tests render the material as background on Linux desktop OpenGL (28798 px diff) though they pass on Win32 D3D11 and Windows ANGLE GL. Confirmed via CI: all other newly-enabled tests (incl. the stencil test and its glow-layer cascade victim) pass on Linux. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Apps/Playground/Scripts/config.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Apps/Playground/Scripts/config.json b/Apps/Playground/Scripts/config.json index 667aa768d..d33a45504 100644 --- a/Apps/Playground/Scripts/config.json +++ b/Apps/Playground/Scripts/config.json @@ -3640,11 +3640,15 @@ { "title": "OpenPBR Thin Film Weight VS IOR - Analytic Lights", "playgroundId": "#GRQHVV#87", + "excludeFromAutomaticTesting": true, + "reason": "Thin-film renders as background on Linux desktop OpenGL (28798 px diff); passes on Win32 D3D11 and Windows ANGLE GL.", "referenceImage": "OpenPBR-Thin-Film-Weight-VS-IOR---Analytic-Lights.png" }, { "title": "OpenPBR Thin Film Thickness VS IOR - Analytic Lights", "playgroundId": "#GRQHVV#88", + "excludeFromAutomaticTesting": true, + "reason": "Thin-film renders as background on Linux desktop OpenGL; passes on Win32 D3D11 and Windows ANGLE GL.", "referenceImage": "OpenPBR-Thin-Film-Thickness-VS-IOR---Analytic-Lights.png" }, { @@ -3678,11 +3682,15 @@ { "title": "OpenPBR Thin Film and Specular Weight - Analytic Lights", "playgroundId": "#GRQHVV#95", + "excludeFromAutomaticTesting": true, + "reason": "Thin-film renders as background on Linux desktop OpenGL; passes on Win32 D3D11 and Windows ANGLE GL.", "referenceImage": "OpenPBR-Thin-Film-and-Specular-Weight---Analytic-Lights.png" }, { "title": "OpenPBR Thin Film and Specular Weight Metals - Analytic Lights", "playgroundId": "#GRQHVV#96", + "excludeFromAutomaticTesting": true, + "reason": "Thin-film renders as background on Linux desktop OpenGL; passes on Win32 D3D11 and Windows ANGLE GL.", "referenceImage": "OpenPBR-Thin-Film-and-Specular-Weight-Metals---Analytic-Lights.png" }, { From 6b18c77c507f26342c5acd3036e08422d4ac4f2d Mon Sep 17 00:00:00 2001 From: Branimir Karadzic Date: Tue, 9 Jun 2026 17:04:20 -0700 Subject: [PATCH 4/4] Playground: exclude Linux-only failures per-API (OpenGL) instead of fully Area Lights and OpenPBR Thin Film Analytic Lights tests fail only on Linux desktop OpenGL but pass on Win32 D3D11/D3D12. Use excludedGraphicsApis ["OpenGL"] so they keep providing coverage on the backends where they work rather than being skipped everywhere. Also enable the previously fully-excluded "Scissor test with 0.9 hardware scaling" on D3D11 (its state-leak cascade is now fixed); it remains OpenGL-excluded for the separate Linux pixel-diff. All 8 affected tests pass on D3D11 (ran=8 passed=8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Apps/Playground/Scripts/config.json | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Apps/Playground/Scripts/config.json b/Apps/Playground/Scripts/config.json index d33a45504..22a2a03bf 100644 --- a/Apps/Playground/Scripts/config.json +++ b/Apps/Playground/Scripts/config.json @@ -309,8 +309,8 @@ "playgroundId": "#W7E7CF#34", "replace": "//options//, hardwareScalingLevel = 0.9;", "referenceImage": "scissor-test-2.png", - "excludeFromAutomaticTesting": true, - "reason": "State-leak cascade fixed in validation_native.js (stencil/scissor reset between tests); remains excluded only due to pixel diff fail on Linux (56223 px diff) under 0.9 hardware scaling." + "excludedGraphicsApis": ["OpenGL"], + "reason": "State-leak cascade fixed in validation_native.js (stencil/scissor reset between tests); pixel diff fail on Linux OpenGL (56223 px) under 0.9 hardware scaling; passes on Win32 D3D11." }, { "title": "Scissor test with 1.5 hardware scaling", @@ -1194,8 +1194,8 @@ { "title": "Area Lights - Standard Material", "playgroundId": "#T7FXR8#67", - "excludeFromAutomaticTesting": true, - "reason": "Renders black on Linux desktop OpenGL (area-light LTC path unsupported); passes on Win32 D3D11 and Windows ANGLE GL.", + "excludedGraphicsApis": ["OpenGL"], + "reason": "Renders black on Linux desktop OpenGL (area-light LTC path unsupported); passes on Win32 D3D11.", "referenceImage": "areaLightsStandardMaterial.png" }, { @@ -1215,8 +1215,8 @@ { "title": "Area Lights - PBR", "playgroundId": "#T7FXR8#12", - "excludeFromAutomaticTesting": true, - "reason": "Renders black on Linux desktop OpenGL (area-light LTC path unsupported); passes on Win32 D3D11 and Windows ANGLE GL.", + "excludedGraphicsApis": ["OpenGL"], + "reason": "Renders black on Linux desktop OpenGL (area-light LTC path unsupported); passes on Win32 D3D11.", "referenceImage": "areaLightsPBRMaterial.png" }, { @@ -2039,8 +2039,8 @@ "playgroundId": "#W7E7CF#38", "replace": "//options//, hardwareScalingLevel = 0.9;", "referenceImage": "scissor-test-2.png", - "excludeFromAutomaticTesting": true, - "reason": "State-leak cascade fixed in validation_native.js (stencil/scissor reset between tests); remains excluded only due to pixel diff fail on Linux (56223 px diff) under 0.9 hardware scaling." + "excludedGraphicsApis": ["OpenGL"], + "reason": "State-leak cascade fixed in validation_native.js (stencil/scissor reset between tests); pixel diff fail on Linux OpenGL (56223 px) under 0.9 hardware scaling; passes on Win32 D3D11." }, { "title": "Scissor test with 1.5 hardware scaling", @@ -3640,15 +3640,15 @@ { "title": "OpenPBR Thin Film Weight VS IOR - Analytic Lights", "playgroundId": "#GRQHVV#87", - "excludeFromAutomaticTesting": true, - "reason": "Thin-film renders as background on Linux desktop OpenGL (28798 px diff); passes on Win32 D3D11 and Windows ANGLE GL.", + "excludedGraphicsApis": ["OpenGL"], + "reason": "Thin-film renders as background on Linux desktop OpenGL (28798 px diff); passes on Win32 D3D11.", "referenceImage": "OpenPBR-Thin-Film-Weight-VS-IOR---Analytic-Lights.png" }, { "title": "OpenPBR Thin Film Thickness VS IOR - Analytic Lights", "playgroundId": "#GRQHVV#88", - "excludeFromAutomaticTesting": true, - "reason": "Thin-film renders as background on Linux desktop OpenGL; passes on Win32 D3D11 and Windows ANGLE GL.", + "excludedGraphicsApis": ["OpenGL"], + "reason": "Thin-film renders as background on Linux desktop OpenGL; passes on Win32 D3D11.", "referenceImage": "OpenPBR-Thin-Film-Thickness-VS-IOR---Analytic-Lights.png" }, { @@ -3682,15 +3682,15 @@ { "title": "OpenPBR Thin Film and Specular Weight - Analytic Lights", "playgroundId": "#GRQHVV#95", - "excludeFromAutomaticTesting": true, - "reason": "Thin-film renders as background on Linux desktop OpenGL; passes on Win32 D3D11 and Windows ANGLE GL.", + "excludedGraphicsApis": ["OpenGL"], + "reason": "Thin-film renders as background on Linux desktop OpenGL; passes on Win32 D3D11.", "referenceImage": "OpenPBR-Thin-Film-and-Specular-Weight---Analytic-Lights.png" }, { "title": "OpenPBR Thin Film and Specular Weight Metals - Analytic Lights", "playgroundId": "#GRQHVV#96", - "excludeFromAutomaticTesting": true, - "reason": "Thin-film renders as background on Linux desktop OpenGL; passes on Win32 D3D11 and Windows ANGLE GL.", + "excludedGraphicsApis": ["OpenGL"], + "reason": "Thin-film renders as background on Linux desktop OpenGL; passes on Win32 D3D11.", "referenceImage": "OpenPBR-Thin-Film-and-Specular-Weight-Metals---Analytic-Lights.png" }, {