Prechádzať zdrojové kódy

Add new validation test

Popov72 4 rokov pred
rodič
commit
ae138f2397

BIN
tests/validation/ReferenceImages/webgpu/particle system matrix like.png


+ 6 - 6
tests/validation/config.json

@@ -455,7 +455,7 @@
             "playgroundId": "#DS8AA7#18",
             "replace": "__folder__, Animation_Skin, __page__, 0",
             "referenceImage": "gltfAnimationSkin0.png",
-            "excludedEngines": ["webgpu"]
+            "excludedEngines": ["webgpu","webgpucache"]
         },
         {
             "title": "GLTF Animation Skin (1)",
@@ -463,14 +463,14 @@
             "playgroundId": "#DS8AA7#18",
             "replace": "__folder__, Animation_Skin, __page__, 1",
             "referenceImage": "gltfAnimationSkin1.png",
-            "excludedEngines": ["webgpu"]
+            "excludedEngines": ["webgpu","webgpucache"]
         },
         {
             "title": "GLTF Animation Skin Type",
             "playgroundId": "#DS8AA7#18",
             "replace": "__folder__, Animation_SkinType, __page__, 0",
             "referenceImage": "gltfAnimationSkinType.png",
-            "excludedEngines": ["webgpu"]
+            "excludedEngines": ["webgpu","webgpucache"]
         },
         {
             "title": "GLTF Buffer Interleaved",
@@ -549,14 +549,14 @@
             "playgroundId": "#DS8AA7#18",
             "replace": "__folder__, Mesh_PrimitiveMode, __page__, 0",
             "referenceImage": "gltfMeshPrimitiveMode0.png",
-            "excludedEngines": ["webgpu"]
+            "excludedEngines": ["webgpu","webgpucache"]
         },
         {
             "title": "GLTF Mesh Primitive Mode (1)",
             "playgroundId": "#DS8AA7#18",
             "replace": "__folder__, Mesh_PrimitiveMode, __page__, 1",
             "referenceImage": "gltfMeshPrimitiveMode1.png",
-            "excludedEngines": ["webgpu"]
+            "excludedEngines": ["webgpu","webgpucache"]
         },
         {
             "title": "GLTF Mesh Primitive Vertex Color",
@@ -985,7 +985,7 @@
             "playgroundId": "#PIZ1GK#173",
             "referenceImage": "geometrybufferrenderer.png",
             "renderCount": 10,
-            "excludedEngines": ["webgl1", "webgpu"],
+            "excludedEngines": ["webgl1", "webgpu","webgpucache"],
             "excludeFromAutomaticTesting": true
         },
         {

+ 5 - 3
tests/validation/validation.js

@@ -456,13 +456,13 @@ function init(_engineName) {
     canvas = document.createElement("canvas");
     canvas.className = "renderCanvas";
     document.body.appendChild(canvas);
-    if (engineName === "webgpu") {
+    if (engineName === "webgpu" || engineName === "webgpucache") {
         const glslangOptions = { 
             jsPath: "../../dist/preview%20release/glslang/glslang.js",
             wasmPath: "../../dist/preview%20release/glslang/glslang.wasm"
         };
 
-        engine = new BABYLON.WebGPUEngine(canvas, {
+        const options = {
             deviceDescriptor: {
                 extensions: [
                     "texture-compression-bc",
@@ -474,7 +474,9 @@ function init(_engineName) {
                 ]
             },
             antialiasing: false,
-        });
+        };
+
+        engine = engineName === "webgpucache" ? new BABYLON.WebGPUEngineCache(canvas, options) : new BABYLON.WebGPUEngine(canvas, options);
         engine.enableOfflineSupport = false;
         return new Promise((resolve) => {
             engine.initAsync(glslangOptions).then(() => resolve());

+ 5 - 0
tests/validation/webgpu.json

@@ -134,6 +134,11 @@
             "title": "create environment texture",
             "playgroundId": "#L4RXKN#4",
             "excludedEngines": ["webgl1"]
+        },
+        {
+            "title": "particle system matrix like",
+            "renderCount": 100,
+            "playgroundId": "#WL44T7"
         }
     ]
 }