@forgeax/engine-render 0.1.33 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1062 -127
- package/dist/assembly/backend-contract.d.ts +2 -0
- package/dist/assembly/backend-contract.d.ts.map +1 -1
- package/dist/assembly/barrel-distortion-inspection.d.ts +3 -0
- package/dist/assembly/barrel-distortion-inspection.d.ts.map +1 -0
- package/dist/assembly/canvas-draw-guard.d.ts +3 -0
- package/dist/assembly/canvas-draw-guard.d.ts.map +1 -0
- package/dist/assembly/cloud-shadow-entry.d.ts +4 -0
- package/dist/assembly/cloud-shadow-entry.d.ts.map +1 -0
- package/dist/assembly/device-feature-admission.d.ts +2 -2
- package/dist/assembly/dynamic-geometry-host.d.ts +4 -1
- package/dist/assembly/dynamic-geometry-host.d.ts.map +1 -1
- package/dist/assembly/dynamic-geometry-runtime.d.ts +1 -1
- package/dist/assembly/dynamic-geometry-runtime.d.ts.map +1 -1
- package/dist/assembly/factory.d.ts +1 -1
- package/dist/assembly/factory.d.ts.map +1 -1
- package/dist/assembly/host-contract.d.ts +6 -5
- package/dist/assembly/host-contract.d.ts.map +1 -1
- package/dist/assembly/material/assembly.d.ts.map +1 -1
- package/dist/assembly/material/pipeline-helpers.d.ts +5 -0
- package/dist/assembly/material/pipeline-helpers.d.ts.map +1 -1
- package/dist/assembly/material-shader-policy.d.ts +16 -2
- package/dist/assembly/material-shader-policy.d.ts.map +1 -1
- package/dist/assembly/material-shader-prewarm.d.ts.map +1 -1
- package/dist/assembly/recovery/device-loss-fanout.d.ts.map +1 -1
- package/dist/assembly/recovery/renderer-recover.d.ts +2 -0
- package/dist/assembly/recovery/renderer-recover.d.ts.map +1 -1
- package/dist/assembly/render-feature-post-processes.d.ts +6 -0
- package/dist/assembly/render-feature-post-processes.d.ts.map +1 -0
- package/dist/assembly/render-target-host.d.ts +5 -0
- package/dist/assembly/render-target-host.d.ts.map +1 -1
- package/dist/assembly/renderer-facade.d.ts.map +1 -1
- package/dist/assembly/renderer-feature-inspection.d.ts +1 -1
- package/dist/assembly/renderer-feature-inspection.d.ts.map +1 -1
- package/dist/assembly/renderer-frame-transaction.d.ts +12 -0
- package/dist/assembly/renderer-frame-transaction.d.ts.map +1 -1
- package/dist/assembly/renderer-inspection.d.ts +11 -0
- package/dist/assembly/renderer-inspection.d.ts.map +1 -1
- package/dist/assembly/webgpu-pbr-ready.d.ts +1 -0
- package/dist/assembly/webgpu-pbr-ready.d.ts.map +1 -1
- package/dist/assembly/webgpu-ready-per-pass.d.ts +39 -0
- package/dist/assembly/webgpu-ready-per-pass.d.ts.map +1 -0
- package/dist/assembly/webgpu-ready.d.ts +1 -1
- package/dist/assembly/webgpu-ready.d.ts.map +1 -1
- package/dist/assembly/webgpu-renderer-bootstrap.d.ts.map +1 -1
- package/dist/assembly/webgpu-renderer-observation-owner.d.ts +35 -0
- package/dist/assembly/webgpu-renderer-observation-owner.d.ts.map +1 -0
- package/dist/assembly/webgpu-renderer.d.ts +2 -1
- package/dist/assembly/webgpu-renderer.d.ts.map +1 -1
- package/dist/authoring.mjs +2 -4
- package/dist/authoring.mjs.map +1 -1
- package/dist/barrel-distortion.d.ts +47 -0
- package/dist/barrel-distortion.d.ts.map +1 -0
- package/dist/chunk-3XUBWRY2.mjs +1842 -0
- package/dist/chunk-3XUBWRY2.mjs.map +1 -0
- package/dist/{chunk-OO3DRYK7.mjs → chunk-G6HDNGY7.mjs} +2400 -1767
- package/dist/chunk-G6HDNGY7.mjs.map +1 -0
- package/dist/{chunk-ZDQWGQW7.mjs → chunk-LM5IE7GF.mjs} +4 -4
- package/dist/{chunk-ZDQWGQW7.mjs.map → chunk-LM5IE7GF.mjs.map} +1 -1
- package/dist/{chunk-VOZWDM3L.mjs → chunk-LNIUIKQ7.mjs} +1514 -498
- package/dist/chunk-LNIUIKQ7.mjs.map +1 -0
- package/dist/chunk-MXTWKZO4.mjs +3268 -0
- package/dist/chunk-MXTWKZO4.mjs.map +1 -0
- package/dist/chunk-MZ4C7EHF.mjs +6942 -0
- package/dist/chunk-MZ4C7EHF.mjs.map +1 -0
- package/dist/chunk-RIPAEGI6.mjs +48 -0
- package/dist/chunk-RIPAEGI6.mjs.map +1 -0
- package/dist/{chunk-LEAXOMYJ.mjs → chunk-SGPUJW3F.mjs} +117 -5
- package/dist/chunk-SGPUJW3F.mjs.map +1 -0
- package/dist/{chunk-PA5DRJNI.mjs → chunk-X2KA6WHM.mjs} +29 -4
- package/dist/chunk-X2KA6WHM.mjs.map +1 -0
- package/dist/{chunk-BLXGONR2.mjs → chunk-XSFB7XXQ.mjs} +51 -4
- package/dist/chunk-XSFB7XXQ.mjs.map +1 -0
- package/dist/cloud/density.d.ts +55 -0
- package/dist/cloud/density.d.ts.map +1 -0
- package/dist/cloud/extract.d.ts +25 -0
- package/dist/cloud/extract.d.ts.map +1 -0
- package/dist/cloud/feature.d.ts +57 -0
- package/dist/cloud/feature.d.ts.map +1 -0
- package/dist/cloud/frame-context.d.ts +8 -0
- package/dist/cloud/frame-context.d.ts.map +1 -0
- package/dist/cloud/inspection.d.ts +59 -0
- package/dist/cloud/inspection.d.ts.map +1 -0
- package/dist/cloud/optics.d.ts +56 -0
- package/dist/cloud/optics.d.ts.map +1 -0
- package/dist/cloud/parameters.d.ts +73 -0
- package/dist/cloud/parameters.d.ts.map +1 -0
- package/dist/cloud/resources.d.ts +60 -0
- package/dist/cloud/resources.d.ts.map +1 -0
- package/dist/cloud/shadow.d.ts +42 -0
- package/dist/cloud/shadow.d.ts.map +1 -0
- package/dist/cloud/temporal.d.ts +74 -0
- package/dist/cloud/temporal.d.ts.map +1 -0
- package/dist/components/barrel-distortion.d.ts +13 -0
- package/dist/components/barrel-distortion.d.ts.map +1 -0
- package/dist/components/cloud-layer.d.ts +29 -0
- package/dist/components/cloud-layer.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/instances.d.ts +20 -6
- package/dist/components/instances.d.ts.map +1 -1
- package/dist/construct-renderer.d.ts +1 -1
- package/dist/construct-renderer.d.ts.map +1 -1
- package/dist/construct-renderer.mjs +8406 -5785
- package/dist/construct-renderer.mjs.map +1 -1
- package/dist/device/gpu-residency.d.ts +19 -19
- package/dist/device/gpu-residency.d.ts.map +1 -1
- package/dist/dynamic-geometry.d.ts +5 -1
- package/dist/dynamic-geometry.d.ts.map +1 -1
- package/dist/errors/cloud.d.ts +59 -0
- package/dist/errors/cloud.d.ts.map +1 -0
- package/dist/errors/render.d.ts +20 -5
- package/dist/errors/render.d.ts.map +1 -1
- package/dist/examples/single-layer-medium-surface.d.ts +47 -0
- package/dist/examples/single-layer-medium-surface.d.ts.map +1 -0
- package/dist/extract/camera.d.ts.map +1 -1
- package/dist/extract/contracts.d.ts +5 -1
- package/dist/extract/contracts.d.ts.map +1 -1
- package/dist/extract/material-context.d.ts +7 -0
- package/dist/extract/material-context.d.ts.map +1 -0
- package/dist/features/barrel-distortion.d.ts +29 -0
- package/dist/features/barrel-distortion.d.ts.map +1 -0
- package/dist/features/error-reporting.d.ts +6 -2
- package/dist/features/error-reporting.d.ts.map +1 -1
- package/dist/features/host.d.ts +15 -0
- package/dist/features/host.d.ts.map +1 -1
- package/dist/features/plan.d.ts +10 -0
- package/dist/features/plan.d.ts.map +1 -1
- package/dist/features/render-graph-contribution.d.ts +5 -0
- package/dist/features/render-graph-contribution.d.ts.map +1 -1
- package/dist/features/render-graph-raster.d.ts +1 -0
- package/dist/features/render-graph-raster.d.ts.map +1 -1
- package/dist/features/targets.d.ts +2 -0
- package/dist/features/targets.d.ts.map +1 -1
- package/dist/features/types.d.ts +48 -0
- package/dist/features/types.d.ts.map +1 -1
- package/dist/fullscreen-post-process-pass.d.ts +15 -7
- package/dist/fullscreen-post-process-pass.d.ts.map +1 -1
- package/dist/glyph-text-layout-system.d.ts +1 -1
- package/dist/glyph-text-layout-system.d.ts.map +1 -1
- package/dist/gpu-dirty-ranges.d.ts +11 -0
- package/dist/gpu-dirty-ranges.d.ts.map +1 -0
- package/dist/gpu-driven/batch-topology.d.ts +17 -0
- package/dist/gpu-driven/batch-topology.d.ts.map +1 -1
- package/dist/gpu-driven/material-artifacts.d.ts +6 -0
- package/dist/gpu-driven/material-artifacts.d.ts.map +1 -1
- package/dist/gpu-driven/prepared-draw.d.ts.map +1 -1
- package/dist/gpu-driven/production-raster-material.d.ts +178 -0
- package/dist/gpu-driven/production-raster-material.d.ts.map +1 -0
- package/dist/gpu-driven/production-raster.d.ts +47 -3
- package/dist/gpu-driven/production-raster.d.ts.map +1 -1
- package/dist/gpu-driven/resource-allocation.d.ts +31 -0
- package/dist/gpu-driven/resource-allocation.d.ts.map +1 -0
- package/dist/gpu-driven/shadow-ownership.d.ts +14 -0
- package/dist/gpu-driven/shadow-ownership.d.ts.map +1 -0
- package/dist/gpu-driven/view-gpu.d.ts +26 -2
- package/dist/gpu-driven/view-gpu.d.ts.map +1 -1
- package/dist/gpu-scene.d.ts +5 -0
- package/dist/gpu-scene.d.ts.map +1 -1
- package/dist/hdrp-buffers.d.ts +2 -2
- package/dist/hdrp-buffers.d.ts.map +1 -1
- package/dist/ibl/frame-resources.d.ts.map +1 -1
- package/dist/ibl/skylight-bind-group.d.ts +14 -5
- package/dist/ibl/skylight-bind-group.d.ts.map +1 -1
- package/dist/index.d.ts +30 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +780 -9
- package/dist/index.mjs.map +1 -1
- package/dist/inspection-types.d.ts +135 -1
- package/dist/inspection-types.d.ts.map +1 -1
- package/dist/instance-buffer-cache.d.ts +4 -4
- package/dist/instance-buffer-cache.d.ts.map +1 -1
- package/dist/instances.d.ts +47 -100
- package/dist/instances.d.ts.map +1 -1
- package/dist/internal.mjs +7 -8
- package/dist/internal.mjs.map +1 -1
- package/dist/pbr-pipeline.d.ts +22 -4
- package/dist/pbr-pipeline.d.ts.map +1 -1
- package/dist/pipeline/single-layer-medium-passes.d.ts +73 -0
- package/dist/pipeline/single-layer-medium-passes.d.ts.map +1 -0
- package/dist/pipeline/standard-forward-lane.d.ts.map +1 -1
- package/dist/pipeline/standard-output/graph.d.ts.map +1 -1
- package/dist/pipeline/standard-output/lut-gpu.d.ts +2 -2
- package/dist/pipeline/standard-output/lut-gpu.d.ts.map +1 -1
- package/dist/pipeline/standard-output/resources.d.ts +2 -2
- package/dist/pipeline/standard-output/resources.d.ts.map +1 -1
- package/dist/pipeline/standard-output/types.d.ts +4 -2
- package/dist/pipeline/standard-output/types.d.ts.map +1 -1
- package/dist/pipeline/standard-pipeline.d.ts.map +1 -1
- package/dist/pipeline/standard-post.d.ts.map +1 -1
- package/dist/pipeline-builder.d.ts +1 -1
- package/dist/pipeline-builder.d.ts.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/prepare/prepared-graphics-resolver.d.ts +2 -0
- package/dist/prepare/prepared-graphics-resolver.d.ts.map +1 -1
- package/dist/publication/contract.d.ts +77 -0
- package/dist/publication/contract.d.ts.map +1 -0
- package/dist/publication/dependencies.d.ts +7 -0
- package/dist/publication/dependencies.d.ts.map +1 -0
- package/dist/publication/prepare-geometry.d.ts +9 -0
- package/dist/publication/prepare-geometry.d.ts.map +1 -0
- package/dist/publication/programs.d.ts +5 -0
- package/dist/publication/programs.d.ts.map +1 -0
- package/dist/publication/publisher.d.ts +33 -0
- package/dist/publication/publisher.d.ts.map +1 -0
- package/dist/publication/receiver.d.ts +29 -0
- package/dist/publication/receiver.d.ts.map +1 -0
- package/dist/publication/resource-scope.d.ts +18 -0
- package/dist/publication/resource-scope.d.ts.map +1 -0
- package/dist/publication/targets.d.ts +33 -0
- package/dist/publication/targets.d.ts.map +1 -0
- package/dist/publication/video.d.ts +5 -0
- package/dist/publication/video.d.ts.map +1 -0
- package/dist/record/barrel-distortion-frame.d.ts +15 -0
- package/dist/record/barrel-distortion-frame.d.ts.map +1 -0
- package/dist/record/dynamic-geometry-consumption.d.ts +10 -2
- package/dist/record/dynamic-geometry-consumption.d.ts.map +1 -1
- package/dist/record/fold-buckets.d.ts +95 -0
- package/dist/record/fold-buckets.d.ts.map +1 -0
- package/dist/record/fold-instance-buffer.d.ts +6 -0
- package/dist/record/fold-instance-buffer.d.ts.map +1 -0
- package/dist/record/frame-lighting.d.ts +1 -0
- package/dist/record/frame-lighting.d.ts.map +1 -1
- package/dist/record/frame-snapshot.d.ts +43 -9
- package/dist/record/frame-snapshot.d.ts.map +1 -1
- package/dist/record/frame.d.ts +15 -65
- package/dist/record/frame.d.ts.map +1 -1
- package/dist/record/gpu-draw-receipts.d.ts +11 -0
- package/dist/record/gpu-draw-receipts.d.ts.map +1 -0
- package/dist/record/gpu-timing.d.ts +8 -0
- package/dist/record/gpu-timing.d.ts.map +1 -1
- package/dist/record/helpers.d.ts +2 -2
- package/dist/record/helpers.d.ts.map +1 -1
- package/dist/record/main-pass-geometry.d.ts +22 -6
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +14 -10
- package/dist/record/main-pass-material.d.ts.map +1 -1
- package/dist/record/main-pass-sprite-draws.d.ts +3 -16
- package/dist/record/main-pass-sprite-draws.d.ts.map +1 -1
- package/dist/record/main-pass.d.ts +13 -2
- package/dist/record/main-pass.d.ts.map +1 -1
- package/dist/record/motion-blur-receipt.d.ts +11 -0
- package/dist/record/motion-blur-receipt.d.ts.map +1 -0
- package/dist/record/prepared-material-bindings.d.ts +3 -3
- package/dist/record/prepared-material-bindings.d.ts.map +1 -1
- package/dist/record/probe-blend-buffer.d.ts +16 -0
- package/dist/record/probe-blend-buffer.d.ts.map +1 -0
- package/dist/record/recovery-pipeline.d.ts.map +1 -1
- package/dist/record/render-context.d.ts +24 -5
- package/dist/record/render-context.d.ts.map +1 -1
- package/dist/record/shadow-pass.d.ts +2 -0
- package/dist/record/shadow-pass.d.ts.map +1 -1
- package/dist/record/skybox-post-pass.d.ts +1 -1
- package/dist/record/skybox-post-pass.d.ts.map +1 -1
- package/dist/record/sprite-instance-buffer.d.ts +31 -0
- package/dist/record/sprite-instance-buffer.d.ts.map +1 -0
- package/dist/record/target-capture-graph.d.ts +19 -0
- package/dist/record/target-capture-graph.d.ts.map +1 -0
- package/dist/record/typed-frame-graph.d.ts +24 -15
- package/dist/record/typed-frame-graph.d.ts.map +1 -1
- package/dist/record/view-ubo.d.ts +11 -3
- package/dist/record/view-ubo.d.ts.map +1 -1
- package/dist/record/volume-params.d.ts +9 -0
- package/dist/record/volume-params.d.ts.map +1 -0
- package/dist/recovery/render-system-candidate.d.ts +14 -4
- package/dist/recovery/render-system-candidate.d.ts.map +1 -1
- package/dist/reflection/record-owner.d.ts.map +1 -1
- package/dist/render-contract.d.ts +46 -5
- package/dist/render-contract.d.ts.map +1 -1
- package/dist/render-graph-primitives.d.ts.map +1 -1
- package/dist/render-pipeline.d.ts +103 -2
- package/dist/render-pipeline.d.ts.map +1 -1
- package/dist/render-system-extract-tail.d.ts +3 -2
- package/dist/render-system-extract-tail.d.ts.map +1 -1
- package/dist/render-system-extract.d.ts +18 -9
- package/dist/render-system-extract.d.ts.map +1 -1
- package/dist/render-system-presentation.d.ts +23 -0
- package/dist/render-system-presentation.d.ts.map +1 -0
- package/dist/render-system-producer-roots.d.ts +10 -0
- package/dist/render-system-producer-roots.d.ts.map +1 -0
- package/dist/render-system-projections.d.ts +3 -2
- package/dist/render-system-projections.d.ts.map +1 -1
- package/dist/render-system-residency.d.ts +12 -0
- package/dist/render-system-residency.d.ts.map +1 -0
- package/dist/render-system.d.ts +22 -21
- package/dist/render-system.d.ts.map +1 -1
- package/dist/scene/probe-blend.d.ts +27 -0
- package/dist/scene/probe-blend.d.ts.map +1 -1
- package/dist/scene/render-scene.d.ts +18 -7
- package/dist/scene/render-scene.d.ts.map +1 -1
- package/dist/scene/render-source.d.ts +42 -0
- package/dist/scene/render-source.d.ts.map +1 -0
- package/dist/scene/source-systems.d.ts +6 -0
- package/dist/scene/source-systems.d.ts.map +1 -0
- package/dist/ssao-buffers.d.ts +9 -0
- package/dist/ssao-buffers.d.ts.map +1 -1
- package/dist/surface/dynamic-input.d.ts +133 -0
- package/dist/surface/dynamic-input.d.ts.map +1 -0
- package/dist/surface/gpu-driven.d.ts +41 -0
- package/dist/surface/gpu-driven.d.ts.map +1 -0
- package/dist/surface/submission-observation.d.ts +136 -0
- package/dist/surface/submission-observation.d.ts.map +1 -0
- package/dist/systems/skin-palette-allocator.d.ts.map +1 -1
- package/dist/systems/skin-palette-types.d.ts +10 -0
- package/dist/systems/skin-palette-types.d.ts.map +1 -1
- package/dist/systems/transparent-dispatch.d.ts +2 -2
- package/dist/systems/transparent-dispatch.d.ts.map +1 -1
- package/dist/systems/transparent-sort-config.d.ts +2 -1
- package/dist/systems/transparent-sort-config.d.ts.map +1 -1
- package/dist/temporal/gpu.d.ts +13 -1
- package/dist/temporal/gpu.d.ts.map +1 -1
- package/dist/temporal/index.mjs +6 -7
- package/dist/temporal/inspection.d.ts.map +1 -1
- package/dist/temporal/standard-scene-data.d.ts.map +1 -1
- package/dist/temporal/target-coverage-attachment.d.ts.map +1 -1
- package/dist/transmission/single-layer-medium.d.ts +89 -0
- package/dist/transmission/single-layer-medium.d.ts.map +1 -0
- package/dist/typed-render-graph-primitives.d.ts +14 -2
- package/dist/typed-render-graph-primitives.d.ts.map +1 -1
- package/dist/volume/component.d.ts +9 -4
- package/dist/volume/component.d.ts.map +1 -1
- package/dist/volume/extract.d.ts +1 -1
- package/dist/volume/extract.d.ts.map +1 -1
- package/dist/volume/inspection.d.ts +2 -0
- package/dist/volume/inspection.d.ts.map +1 -1
- package/dist/volume/passes.d.ts +4 -1
- package/dist/volume/passes.d.ts.map +1 -1
- package/dist/volume/resources.d.ts.map +1 -1
- package/package.json +22 -21
- package/src/__tests__/atmosphere-daylight.dawn.test.ts +72 -0
- package/src/__tests__/auto-exposure-transaction.integration.test.ts +4 -9
- package/src/__tests__/barrel-distortion-lkg.integration.test.ts +353 -0
- package/src/__tests__/barrel-distortion.dawn.test.ts +41 -0
- package/src/__tests__/barrel-distortion.unit.test.ts +364 -0
- package/src/__tests__/construct-renderer-identity.unit.test.ts +49 -0
- package/src/__tests__/detached-recovery-graph.unit.test.ts +277 -0
- package/src/__tests__/device-feature-admission.unit.test.ts +3 -2
- package/src/__tests__/device-loss-fanout.unit.test.ts +36 -1
- package/src/__tests__/docs-gate-green.unit.test.ts +112 -1
- package/src/__tests__/factory-contract.integration.test.ts +295 -45
- package/src/__tests__/feature-depth-input.dawn.test.ts +129 -2
- package/src/__tests__/fullscreen-feature-plan.unit.test.ts +14 -3
- package/src/__tests__/gpu-dirty-ranges.unit.test.ts +22 -0
- package/src/__tests__/gpu-driven-baseline.characterization.test.ts +16 -3
- package/src/__tests__/gpu-driven-batch-topology-pbr.unit.test.ts +12 -0
- package/src/__tests__/gpu-driven-material-artifacts.unit.test.ts +143 -0
- package/src/__tests__/gpu-driven-pbr.dawn.test.ts +5 -6
- package/src/__tests__/gpu-driven-production.integration.test.ts +482 -3
- package/src/__tests__/gpu-driven-shadow-views.dawn.test.ts +6 -5
- package/src/__tests__/gpu-driven-view-gpu-evidence.ts +94 -6
- package/src/__tests__/gpu-driven-view-graph.integration.test.ts +18 -2
- package/src/__tests__/gpu-driven-view.browser.test.ts +5 -8
- package/src/__tests__/gpu-driven-view.dawn.test.ts +6 -2
- package/src/__tests__/gpu-driven-view.unit.test.ts +1 -1
- package/src/__tests__/gpu-pass-timing-lifecycle.integration.test.ts +1 -0
- package/src/__tests__/gpu-pass-timing.browser.test.ts +6 -4
- package/src/__tests__/gpu-pass-timing.rhi-null.unit.test.ts +1 -0
- package/src/__tests__/gpu-scene.unit.test.ts +119 -9
- package/src/__tests__/instance-allocation-failure.unit.test.ts +57 -0
- package/src/__tests__/instances-culling.integration.test.ts +10 -36
- package/src/__tests__/instances-store.unit.test.ts +97 -305
- package/src/__tests__/instances-world-ownership.integration.test.ts +62 -0
- package/src/__tests__/ktx2-basis-gpu-consumer.dawn.test.ts +4 -1
- package/src/__tests__/main-pass-material-medium-selection.unit.test.ts +145 -0
- package/src/__tests__/material-shader-prewarm.unit.test.ts +59 -0
- package/src/__tests__/material-snapshot-mutation.integration.test.ts +39 -1
- package/src/__tests__/materials-standard-contract.unit.test.ts +0 -1
- package/src/__tests__/morph-culling-reentry.dawn.test.ts +5 -5
- package/src/__tests__/morph-visual-evidence.integration.test.ts +8 -7
- package/src/__tests__/motion-blur-compute.dawn.test.ts +13 -7
- package/src/__tests__/motion-blur.pixel.integration.test.ts +2 -2
- package/src/__tests__/nineslice-handle-surface.unit.test.ts +4 -4
- package/src/__tests__/pbr-view-layout.unit.test.ts +9 -0
- package/src/__tests__/physical-clearcoat.integration.test.ts +66 -8
- package/src/__tests__/physical-material-budget.unit.test.ts +40 -0
- package/src/__tests__/prepared-graphics-capability.unit.test.ts +66 -2
- package/src/__tests__/probe-bindings.unit.test.ts +582 -1
- package/src/__tests__/probe-scene-dirty.integration.test.ts +28 -1
- package/src/__tests__/receipt-observation-retirement.unit.test.ts +65 -0
- package/src/__tests__/recovery-candidate-prepare.contract.test.ts +69 -0
- package/src/__tests__/render-error-code-owner.test-d.ts +8 -0
- package/src/__tests__/render-feature-diagnostics.unit.test.ts +15 -2
- package/src/__tests__/render-feature-error-reporting.unit.test.ts +21 -1
- package/src/__tests__/render-feature-prepared-diagnostics.unit.test.ts +10 -1
- package/src/__tests__/render-feature-retry.unit.test.ts +12 -1
- package/src/__tests__/render-scene-mixed-updates.integration.test.ts +145 -19
- package/src/__tests__/render-scene-projection.unit.test.ts +36 -11
- package/src/__tests__/render-scene-temporal-retry.unit.test.ts +20 -20
- package/src/__tests__/render-target-probe-soak.perf.test.ts +2 -2
- package/src/__tests__/render-temporal-environment-consumer.browser.test.ts +3 -3
- package/src/__tests__/render-temporal-environment-consumer.dawn.test.ts +5 -2
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +42 -8
- package/src/__tests__/renderer-frame-generation-fence.integration.test.ts +16 -0
- package/src/__tests__/renderer-frame-transaction.integration.test.ts +26 -10
- package/src/__tests__/resource-allocation.unit.test.ts +123 -0
- package/src/__tests__/single-layer-medium-passes.unit.test.ts +275 -0
- package/src/__tests__/skin-motion-regression.unit.test.ts +70 -1
- package/src/__tests__/skin-palette-recycling.dawn.test.ts +97 -0
- package/src/__tests__/skinned-shadow-caster.test.ts +15 -0
- package/src/__tests__/ssr-carrier-public-contract.unit.test.ts +21 -0
- package/src/__tests__/ssr-gpu-dispatch.browser.test.ts +4 -4
- package/src/__tests__/ssr-gpu-dispatch.dawn.test.ts +2 -2
- package/src/__tests__/ssr-gpu-dispatch.ts +1 -1
- package/src/__tests__/ssr-receiver-coverage.dawn.test.ts +6 -2
- package/src/__tests__/standard-output-chain-contract.unit.test.ts +28 -0
- package/src/__tests__/standard-pbr-artifact-assembly.unit.test.ts +46 -1
- package/src/__tests__/standard-pipeline.integration.test.ts +182 -1
- package/src/__tests__/surface-dynamic-buffer-lifecycle.unit.test.ts +506 -0
- package/src/__tests__/surface-submission-observation.unit.test.ts +812 -0
- package/src/__tests__/temporal-history-lifecycle.unit.test.ts +32 -0
- package/src/__tests__/temporal-performance.integration.test.ts +3 -3
- package/src/__tests__/visibility-instances.integration.test.ts +7 -19
- package/src/__tests__/visibility-producer-matrix.integration.test.ts +9 -20
- package/src/__tests__/volume-optics-oracle.unit.test.ts +4 -2
- package/src/__tests__/volumetric-fog-budget-recovery.integration.test.ts +30 -20
- package/src/__tests__/volumetric-fog-errors.unit.test.ts +4 -3
- package/src/__tests__/volumetric-fog-multiple.unit.test.ts +55 -0
- package/src/__tests__/volumetric-fog-spot-frame-optics.integration.test.ts +1 -1
- package/src/__tests__/volumetric-fog-stage-readback.dawn.test.ts +113 -9
- package/src/__tests__/volumetric-fog-topology.unit.test.ts +5 -3
- package/src/assembly/backend-contract.ts +30 -0
- package/src/assembly/barrel-distortion-inspection.ts +22 -0
- package/src/assembly/canvas-draw-guard.ts +11 -0
- package/src/assembly/cloud-shadow-entry.ts +22 -0
- package/src/assembly/device-feature-admission.ts +2 -2
- package/src/assembly/dynamic-geometry-host.ts +65 -37
- package/src/assembly/dynamic-geometry-runtime.ts +7 -1
- package/src/assembly/factory.ts +2 -30
- package/src/assembly/host-contract.ts +8 -5
- package/src/assembly/material/assembly.ts +25 -13
- package/src/assembly/material/pipeline-helpers.ts +53 -12
- package/src/assembly/material-shader-policy.ts +55 -0
- package/src/assembly/material-shader-prewarm.ts +21 -10
- package/src/assembly/recovery/device-loss-fanout.ts +13 -0
- package/src/assembly/recovery/renderer-recover.ts +50 -18
- package/src/assembly/render-feature-post-processes.ts +54 -0
- package/src/assembly/render-target-host.ts +57 -47
- package/src/assembly/renderer-facade.ts +7 -2
- package/src/assembly/renderer-feature-inspection.ts +8 -2
- package/src/assembly/renderer-frame-transaction.ts +23 -0
- package/src/assembly/renderer-inspection.ts +28 -0
- package/src/assembly/skin-palette-owner.ts +1 -1
- package/src/assembly/temporal-post-process-prewarm.ts +3 -3
- package/src/assembly/webgpu-pbr-ready.ts +9 -1
- package/src/assembly/webgpu-ready-per-pass.ts +104 -0
- package/src/assembly/webgpu-ready.ts +116 -62
- package/src/assembly/webgpu-renderer-bootstrap.ts +0 -12
- package/src/assembly/webgpu-renderer-observation-owner.ts +222 -0
- package/src/assembly/webgpu-renderer.ts +303 -313
- package/src/assembly/webgpu-vertex-layouts.ts +1 -1
- package/src/barrel-distortion.ts +247 -0
- package/src/cloud/__tests__/cloud-density-parity.dawn.test.ts +173 -0
- package/src/cloud/__tests__/cloud-layer-framebuffer-y.dawn.test.ts +265 -0
- package/src/cloud/__tests__/cloud-layer.browser.test.ts +432 -0
- package/src/cloud/__tests__/cloud-layer.unit.test.ts +634 -0
- package/src/cloud/density.ts +600 -0
- package/src/cloud/extract.ts +110 -0
- package/src/cloud/feature.ts +1810 -0
- package/src/cloud/frame-context.ts +42 -0
- package/src/cloud/inspection.ts +130 -0
- package/src/cloud/optics.ts +285 -0
- package/src/cloud/parameters.ts +255 -0
- package/src/cloud/resources.ts +122 -0
- package/src/cloud/shadow.ts +167 -0
- package/src/cloud/temporal.ts +226 -0
- package/src/components/barrel-distortion.ts +46 -0
- package/src/components/cloud-layer.ts +47 -0
- package/src/components/index.ts +2 -0
- package/src/components/instances.ts +18 -45
- package/src/components/sprite-instances.ts +1 -1
- package/src/construct-renderer.ts +1 -1
- package/src/device/gpu-residency.ts +26 -25
- package/src/dynamic-geometry.ts +12 -1
- package/src/errors/cloud.ts +103 -0
- package/src/errors/render.ts +47 -8
- package/src/examples/single-layer-medium-surface.ts +59 -0
- package/src/extract/camera.ts +15 -1
- package/src/extract/contracts.ts +5 -0
- package/src/extract/material-context.ts +21 -0
- package/src/features/barrel-distortion.ts +172 -0
- package/src/features/error-reporting.ts +26 -6
- package/src/features/host.ts +128 -19
- package/src/features/plan.ts +10 -0
- package/src/features/render-graph-contribution.ts +9 -0
- package/src/features/render-graph-raster.ts +45 -3
- package/src/features/targets.ts +66 -0
- package/src/features/types.ts +51 -0
- package/src/fullscreen-post-process-pass.ts +41 -9
- package/src/glyph-text-layout-system.ts +2 -2
- package/src/gpu-dirty-ranges.ts +48 -0
- package/src/gpu-driven/batch-topology.ts +53 -0
- package/src/gpu-driven/material-artifacts.ts +33 -25
- package/src/gpu-driven/prepared-draw.ts +12 -4
- package/src/gpu-driven/production-raster-material.ts +1894 -0
- package/src/gpu-driven/production-raster.ts +825 -784
- package/src/gpu-driven/resource-allocation.ts +142 -0
- package/src/gpu-driven/shadow-ownership.ts +71 -0
- package/src/gpu-driven/view-gpu.ts +164 -10
- package/src/gpu-scene.ts +75 -84
- package/src/hdrp-buffers.ts +4 -3
- package/src/ibl/frame-resources.ts +0 -1
- package/src/ibl/skylight-bind-group.ts +62 -32
- package/src/index.ts +205 -9
- package/src/inspection-types.ts +162 -0
- package/src/instance-buffer-cache.ts +4 -4
- package/src/instances.ts +152 -569
- package/src/pbr-pipeline.ts +230 -30
- package/src/pipeline/single-layer-medium-passes.ts +267 -0
- package/src/pipeline/standard-forward-lane.ts +313 -57
- package/src/pipeline/standard-output/graph.ts +8 -2
- package/src/pipeline/standard-output/lut-gpu.ts +3 -3
- package/src/pipeline/standard-output/resources.ts +2 -2
- package/src/pipeline/standard-output/types.ts +12 -1
- package/src/pipeline/standard-pipeline.ts +291 -18
- package/src/pipeline/standard-post.ts +90 -24
- package/src/pipeline-builder.ts +1 -1
- package/src/plugin.ts +4 -0
- package/src/points-lines/__tests__/points-lines.bench.ts +17 -8
- package/src/prepare/prepared-graphics-resolver.ts +2 -0
- package/src/publication/__tests__/derived-geometry.integration.test.ts +177 -0
- package/src/publication/__tests__/features.integration.test.ts +122 -0
- package/src/publication/__tests__/programs.unit.test.ts +25 -0
- package/src/publication/__tests__/publication.integration.test.ts +370 -0
- package/src/publication/__tests__/targets.integration.test.ts +120 -0
- package/src/publication/__tests__/video.browser.test.ts +50 -0
- package/src/publication/contract.ts +104 -0
- package/src/publication/dependencies.ts +54 -0
- package/src/publication/prepare-geometry.ts +94 -0
- package/src/publication/programs.ts +45 -0
- package/src/publication/publisher.ts +618 -0
- package/src/publication/receiver.ts +297 -0
- package/src/publication/resource-scope.ts +31 -0
- package/src/publication/targets.ts +182 -0
- package/src/publication/video.ts +33 -0
- package/src/record/__tests__/main-pass-geometry.unit.test.ts +30 -0
- package/src/record/__tests__/material-bg-cache.unit.test.ts +15 -1
- package/src/record/__tests__/sprite-material-abi.unit.test.ts +9 -11
- package/src/record/__tests__/temporal-payload.unit.test.ts +1 -1
- package/src/record/__tests__/transparent-group2-selection.unit.test.ts +11 -0
- package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +1 -0
- package/src/record/__tests__/video-texture-view.unit.test.ts +9 -9
- package/src/record/__tests__/view-ubo-layout.unit.test.ts +4 -3
- package/src/record/barrel-distortion-frame.ts +110 -0
- package/src/record/dynamic-geometry-consumption.ts +39 -9
- package/src/record/fold-buckets.ts +855 -0
- package/src/record/fold-instance-buffer.ts +51 -0
- package/src/record/frame-lighting.ts +36 -2
- package/src/record/frame-snapshot.ts +45 -9
- package/src/record/frame.ts +258 -1105
- package/src/record/gpu-draw-receipts.ts +38 -0
- package/src/record/gpu-timing.ts +48 -5
- package/src/record/helpers.ts +2 -2
- package/src/record/main-pass-geometry.ts +272 -84
- package/src/record/main-pass-material.ts +102 -36
- package/src/record/main-pass-sprite-draws.ts +13 -217
- package/src/record/main-pass.ts +164 -27
- package/src/record/motion-blur-receipt.ts +91 -0
- package/src/record/prepared-material-bindings.ts +11 -6
- package/src/record/probe-blend-buffer.ts +180 -0
- package/src/record/recovery-pipeline.ts +35 -3
- package/src/record/render-context.ts +41 -5
- package/src/record/shadow-pass.ts +30 -4
- package/src/record/skybox-post-pass.ts +28 -4
- package/src/record/sprite-instance-buffer.ts +155 -0
- package/src/record/target-capture-graph.ts +258 -0
- package/src/record/typed-frame-graph.ts +776 -340
- package/src/record/view-ubo.ts +27 -4
- package/src/record/volume-params.ts +225 -0
- package/src/recovery/render-system-candidate.ts +243 -50
- package/src/reflection/record-owner.ts +7 -3
- package/src/render-contract.ts +54 -5
- package/src/render-graph-primitives.ts +7 -1
- package/src/render-pipeline.ts +130 -0
- package/src/render-system-extract-tail.ts +90 -78
- package/src/render-system-extract.ts +76 -76
- package/src/render-system-presentation.ts +56 -0
- package/src/render-system-producer-roots.ts +96 -0
- package/src/render-system-projections.ts +3 -2
- package/src/render-system-residency.ts +159 -0
- package/src/render-system.ts +421 -408
- package/src/scene/probe-blend.ts +96 -4
- package/src/scene/render-scene.ts +416 -337
- package/src/scene/render-source.ts +90 -0
- package/src/scene/source-systems.ts +33 -0
- package/src/ssao-buffers.ts +95 -2
- package/src/surface/__tests__/dynamic-input.unit.test.ts +374 -0
- package/src/surface/__tests__/gpu-driven.unit.test.ts +87 -0
- package/src/surface/dynamic-input.ts +658 -0
- package/src/surface/gpu-driven.ts +147 -0
- package/src/surface/submission-observation.ts +517 -0
- package/src/systems/skin-palette-allocator.ts +5 -1
- package/src/systems/skin-palette-types.ts +11 -0
- package/src/systems/transparent-dispatch.ts +2 -2
- package/src/systems/transparent-sort-config.ts +3 -1
- package/src/temporal/gpu.ts +101 -17
- package/src/temporal/inspection.ts +7 -1
- package/src/temporal/standard-scene-data.ts +5 -0
- package/src/temporal/target-coverage-attachment.ts +4 -0
- package/src/transmission/__tests__/single-layer-medium.unit.test.ts +149 -0
- package/src/transmission/__tests__/standard-transmission.dawn.test.ts +12 -11
- package/src/transmission/single-layer-medium.ts +322 -0
- package/src/typed-render-graph-primitives.ts +70 -2
- package/src/volume/component.ts +10 -9
- package/src/volume/extract.ts +11 -5
- package/src/volume/inspection.ts +3 -0
- package/src/volume/passes.ts +87 -4
- package/src/volume/resources.ts +2 -1
- package/dist/chunk-3RTCJTH4.mjs +0 -1610
- package/dist/chunk-3RTCJTH4.mjs.map +0 -1
- package/dist/chunk-BLXGONR2.mjs.map +0 -1
- package/dist/chunk-ILQ5MEZF.mjs +0 -32
- package/dist/chunk-ILQ5MEZF.mjs.map +0 -1
- package/dist/chunk-LEAXOMYJ.mjs.map +0 -1
- package/dist/chunk-NB2S7ZRX.mjs +0 -1783
- package/dist/chunk-NB2S7ZRX.mjs.map +0 -1
- package/dist/chunk-NNQL7CB3.mjs +0 -1713
- package/dist/chunk-NNQL7CB3.mjs.map +0 -1
- package/dist/chunk-OO3DRYK7.mjs.map +0 -1
- package/dist/chunk-PA5DRJNI.mjs.map +0 -1
- package/dist/chunk-PLAXOOX5.mjs +0 -1907
- package/dist/chunk-PLAXOOX5.mjs.map +0 -1
- package/dist/chunk-RXZ3RGOU.mjs +0 -53
- package/dist/chunk-RXZ3RGOU.mjs.map +0 -1
- package/dist/chunk-VOZWDM3L.mjs.map +0 -1
|
@@ -19,6 +19,7 @@ import { describe, expect, it, vi } from 'vitest';
|
|
|
19
19
|
import type { RhiBackendPack } from '../assembly/backend-contract';
|
|
20
20
|
import { createRenderer as constructRenderer } from '../assembly/factory';
|
|
21
21
|
import {
|
|
22
|
+
BarrelDistortion,
|
|
22
23
|
DirectionalLight,
|
|
23
24
|
DynamicResolution,
|
|
24
25
|
MeshFilter,
|
|
@@ -164,7 +165,75 @@ async function createMotionBlurScenario() {
|
|
|
164
165
|
};
|
|
165
166
|
}
|
|
166
167
|
|
|
168
|
+
function createGenericPostProbeFeature(): RenderFeature<undefined> {
|
|
169
|
+
return {
|
|
170
|
+
identity: 'synthetic.generic-post-probe',
|
|
171
|
+
placement: 'post',
|
|
172
|
+
shaderModuleMode: 'immediate',
|
|
173
|
+
extract: () => ok(undefined),
|
|
174
|
+
plan: () =>
|
|
175
|
+
ok({
|
|
176
|
+
resources: [
|
|
177
|
+
{
|
|
178
|
+
kind: 'compute-program' as const,
|
|
179
|
+
name: 'generic-post-probe-program',
|
|
180
|
+
program: {
|
|
181
|
+
wgsl: '@compute @workgroup_size(1) fn main() {}',
|
|
182
|
+
entryPoints: ['main'],
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
kind: 'compute-bindings' as const,
|
|
187
|
+
name: 'generic-post-probe-bindings',
|
|
188
|
+
program: 'generic-post-probe-program',
|
|
189
|
+
entries: [],
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
passes: [
|
|
193
|
+
{
|
|
194
|
+
kind: 'compute' as const,
|
|
195
|
+
name: 'generic-post-probe',
|
|
196
|
+
program: 'generic-post-probe-program',
|
|
197
|
+
bindings: 'generic-post-probe-bindings',
|
|
198
|
+
dispatches: [{ kind: 'direct' as const, entryPoint: 'main', workgroups: [1] }],
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
}),
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
167
205
|
describe('factory contract', () => {
|
|
206
|
+
it('does not publish renderer initialization before boot queue work settles', async () => {
|
|
207
|
+
const fence = deferred<undefined>();
|
|
208
|
+
const onSubmittedWorkDone = vi
|
|
209
|
+
.spyOn(RhiNullQueue.prototype, 'onSubmittedWorkDone')
|
|
210
|
+
.mockReturnValue(fence.promise);
|
|
211
|
+
const canvas = { width: 64, height: 64, getContext: () => null };
|
|
212
|
+
let renderer: Awaited<ReturnType<typeof constructRenderer>> | undefined;
|
|
213
|
+
try {
|
|
214
|
+
renderer = await constructRenderer(
|
|
215
|
+
canvas,
|
|
216
|
+
{ rhi },
|
|
217
|
+
{ shaderManifestUrl: renderLifecycleManifestUrl() },
|
|
218
|
+
);
|
|
219
|
+
let settled = false;
|
|
220
|
+
const initialization = renderer.initialization.then(() => {
|
|
221
|
+
settled = true;
|
|
222
|
+
});
|
|
223
|
+
await vi.waitFor(() => expect(onSubmittedWorkDone).toHaveBeenCalled(), {
|
|
224
|
+
timeout: 2_000,
|
|
225
|
+
});
|
|
226
|
+
expect(settled).toBe(false);
|
|
227
|
+
fence.resolve(undefined);
|
|
228
|
+
await initialization;
|
|
229
|
+
expect(settled).toBe(true);
|
|
230
|
+
} finally {
|
|
231
|
+
fence.resolve(undefined);
|
|
232
|
+
onSubmittedWorkDone.mockRestore();
|
|
233
|
+
await renderer?.dispose();
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
|
|
168
237
|
it('requires one Renderer-owned target lifecycle seam', () => {
|
|
169
238
|
expect(existsSync(renderTargetHostSourcePath)).toBe(true);
|
|
170
239
|
const factorySource = readFileSync(factorySourcePath, 'utf8');
|
|
@@ -199,7 +268,7 @@ describe('factory contract', () => {
|
|
|
199
268
|
it('releases its profiler catalog contribution on dispose', async () => {
|
|
200
269
|
const profiler = createProfiler();
|
|
201
270
|
const renderer = await constructRenderer(
|
|
202
|
-
{ getContext: () => null },
|
|
271
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
203
272
|
{ profiler, rhi },
|
|
204
273
|
{ shaderManifestUrl: manifestUrl() },
|
|
205
274
|
);
|
|
@@ -227,7 +296,7 @@ describe('factory contract', () => {
|
|
|
227
296
|
|
|
228
297
|
try {
|
|
229
298
|
const renderer = await constructRenderer(
|
|
230
|
-
{ getContext: () => null },
|
|
299
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
231
300
|
{ rhi },
|
|
232
301
|
{ shaderManifestUrl: renderLifecycleManifestUrl() },
|
|
233
302
|
);
|
|
@@ -273,7 +342,7 @@ describe('factory contract', () => {
|
|
|
273
342
|
}),
|
|
274
343
|
} as never;
|
|
275
344
|
const renderer = await constructRenderer(
|
|
276
|
-
{ getContext: () => null },
|
|
345
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
277
346
|
{
|
|
278
347
|
rhi: timingRhi,
|
|
279
348
|
gpuPassTiming: { maxPassesPerFrame: 4, maxFramesInFlight: 1, retentionFrames: 2 },
|
|
@@ -286,7 +355,7 @@ describe('factory contract', () => {
|
|
|
286
355
|
|
|
287
356
|
it('completes the receipt-bound create, attach, draw, observe, recover chain', async () => {
|
|
288
357
|
const renderer = await constructRenderer(
|
|
289
|
-
{ getContext: () => null },
|
|
358
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
290
359
|
{ rhi },
|
|
291
360
|
{ shaderManifestUrl: manifestUrl() },
|
|
292
361
|
);
|
|
@@ -303,7 +372,7 @@ describe('factory contract', () => {
|
|
|
303
372
|
camera: { lease },
|
|
304
373
|
environment: { lease },
|
|
305
374
|
});
|
|
306
|
-
expect(frame.ok).toBe(true);
|
|
375
|
+
expect(frame.ok, frame.ok ? '' : JSON.stringify(frame.error)).toBe(true);
|
|
307
376
|
if (!frame.ok || frame.value === undefined) return;
|
|
308
377
|
|
|
309
378
|
const observed = await renderer.observe(frame.value, { include: ['timings'] });
|
|
@@ -316,7 +385,7 @@ describe('factory contract', () => {
|
|
|
316
385
|
|
|
317
386
|
it('rejects the removed Standard reflection-probe profile field at the Renderer boundary', async () => {
|
|
318
387
|
const renderer = await constructRenderer(
|
|
319
|
-
{ getContext: () => null },
|
|
388
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
320
389
|
{ rhi },
|
|
321
390
|
{ shaderManifestUrl: manifestUrl() },
|
|
322
391
|
);
|
|
@@ -332,7 +401,7 @@ describe('factory contract', () => {
|
|
|
332
401
|
|
|
333
402
|
it('projects stable output and observation identity without pixel payloads', async () => {
|
|
334
403
|
const renderer = await constructRenderer(
|
|
335
|
-
{ getContext: () => null },
|
|
404
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
336
405
|
{ rhi },
|
|
337
406
|
{ shaderManifestUrl: manifestUrl() },
|
|
338
407
|
);
|
|
@@ -361,7 +430,7 @@ describe('factory contract', () => {
|
|
|
361
430
|
|
|
362
431
|
it('delivers a target readback only through its matching receipt', async () => {
|
|
363
432
|
const renderer = await constructRenderer(
|
|
364
|
-
{ getContext: () => null },
|
|
433
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
365
434
|
{ rhi },
|
|
366
435
|
{ shaderManifestUrl: manifestUrl() },
|
|
367
436
|
);
|
|
@@ -390,7 +459,7 @@ describe('factory contract', () => {
|
|
|
390
459
|
camera: { lease: attached.value },
|
|
391
460
|
environment: { lease: attached.value },
|
|
392
461
|
});
|
|
393
|
-
expect(frame.ok).toBe(true);
|
|
462
|
+
expect(frame.ok, frame.ok ? '' : JSON.stringify(frame.error)).toBe(true);
|
|
394
463
|
if (!frame.ok || frame.value === undefined) return;
|
|
395
464
|
const observed = await renderer.observe(frame.value, {
|
|
396
465
|
include: ['target-readbacks'],
|
|
@@ -439,11 +508,65 @@ describe('factory contract', () => {
|
|
|
439
508
|
camera: { lease: attached.value },
|
|
440
509
|
environment: { lease: attached.value },
|
|
441
510
|
});
|
|
442
|
-
expect(frame.ok).toBe(true);
|
|
511
|
+
expect(frame.ok, frame.ok ? '' : JSON.stringify(frame.error)).toBe(true);
|
|
443
512
|
expect(planCalls).toBe(1);
|
|
444
513
|
renderer.dispose();
|
|
445
514
|
});
|
|
446
515
|
|
|
516
|
+
it('projects the active barrel stage through the ordinary feature host once', async () => {
|
|
517
|
+
const renderer = await constructRenderer(
|
|
518
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
519
|
+
{ rhi },
|
|
520
|
+
{ shaderManifestUrl: renderLifecycleManifestUrl() },
|
|
521
|
+
);
|
|
522
|
+
expect((await renderer.initialization).ok).toBe(true);
|
|
523
|
+
const world = new World();
|
|
524
|
+
const attached = renderer.attach(world);
|
|
525
|
+
expect(attached.ok).toBe(true);
|
|
526
|
+
if (!attached.ok) return;
|
|
527
|
+
registerPropagateTransforms(world);
|
|
528
|
+
world
|
|
529
|
+
.spawn(
|
|
530
|
+
{ component: Transform, data: { pos: [0, 0, 4] } },
|
|
531
|
+
{
|
|
532
|
+
component: LocalCamera,
|
|
533
|
+
data: {
|
|
534
|
+
fov: 1,
|
|
535
|
+
aspect: 1,
|
|
536
|
+
near: 0.1,
|
|
537
|
+
far: 100,
|
|
538
|
+
antialias: ANTIALIAS_NONE,
|
|
539
|
+
tonemap: TONEMAP_ACES_FILMIC,
|
|
540
|
+
bloom: BLOOM_DISABLED,
|
|
541
|
+
},
|
|
542
|
+
},
|
|
543
|
+
{ component: BarrelDistortion, data: { strength: 0.2, centerX: 0.5, centerY: 0.5 } },
|
|
544
|
+
)
|
|
545
|
+
.unwrap();
|
|
546
|
+
expect(world.update().ok).toBe(true);
|
|
547
|
+
const frame = renderer.draw({
|
|
548
|
+
leases: [attached.value],
|
|
549
|
+
camera: { lease: attached.value },
|
|
550
|
+
environment: { lease: attached.value },
|
|
551
|
+
});
|
|
552
|
+
expect(frame.ok, frame.ok ? '' : JSON.stringify(frame.error)).toBe(true);
|
|
553
|
+
if (frame.ok && frame.value !== undefined) {
|
|
554
|
+
expect(frame.value.barrelDistortion).toMatchObject({
|
|
555
|
+
width: 64,
|
|
556
|
+
height: 64,
|
|
557
|
+
camera: { projection: 'perspective' },
|
|
558
|
+
});
|
|
559
|
+
expect(frame.value.barrelDistortion?.strength).toBeCloseTo(0.2, 6);
|
|
560
|
+
expect(
|
|
561
|
+
renderer.perFramePassNames.filter((name) => name === 'barrel-distortion'),
|
|
562
|
+
).toHaveLength(1);
|
|
563
|
+
expect(
|
|
564
|
+
renderer.perFramePassNames.filter((name) => name.startsWith('post-effect-')),
|
|
565
|
+
).toHaveLength(0);
|
|
566
|
+
}
|
|
567
|
+
await renderer.dispose();
|
|
568
|
+
});
|
|
569
|
+
|
|
447
570
|
it('keeps the active graph as LKG while a feature candidate is pending', async () => {
|
|
448
571
|
let invalid = false;
|
|
449
572
|
let featurePlanCalls = 0;
|
|
@@ -679,7 +802,7 @@ describe('factory contract', () => {
|
|
|
679
802
|
|
|
680
803
|
it('attaches derived-state systems once without putting writes in draw', async () => {
|
|
681
804
|
const renderer = await constructRenderer(
|
|
682
|
-
{ getContext: () => null },
|
|
805
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
683
806
|
{ rhi },
|
|
684
807
|
{ shaderManifestUrl: manifestUrl() },
|
|
685
808
|
);
|
|
@@ -695,12 +818,12 @@ describe('factory contract', () => {
|
|
|
695
818
|
|
|
696
819
|
it('releases one World without disposing the shared Renderer', async () => {
|
|
697
820
|
const first = await constructRenderer(
|
|
698
|
-
{ getContext: () => null },
|
|
821
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
699
822
|
{ rhi },
|
|
700
823
|
{ shaderManifestUrl: manifestUrl() },
|
|
701
824
|
);
|
|
702
825
|
const second = await constructRenderer(
|
|
703
|
-
{ getContext: () => null },
|
|
826
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
704
827
|
{ rhi },
|
|
705
828
|
{ shaderManifestUrl: manifestUrl() },
|
|
706
829
|
);
|
|
@@ -717,7 +840,11 @@ describe('factory contract', () => {
|
|
|
717
840
|
it('resolves a renderer for a host canvas and rejects missing input', async () => {
|
|
718
841
|
const manifest = `data:application/json,${encodeURIComponent(JSON.stringify({ schemaVersion: '1.0.0', entries: [] }))}`;
|
|
719
842
|
await expect(
|
|
720
|
-
constructRenderer(
|
|
843
|
+
constructRenderer(
|
|
844
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
845
|
+
{ rhi },
|
|
846
|
+
{ shaderManifestUrl: manifest },
|
|
847
|
+
),
|
|
721
848
|
).resolves.toMatchObject({
|
|
722
849
|
attach: expect.any(Function),
|
|
723
850
|
draw: expect.any(Function),
|
|
@@ -728,7 +855,7 @@ describe('factory contract', () => {
|
|
|
728
855
|
it('temporarily releases presentation while preserving the Renderer identity', async () => {
|
|
729
856
|
const manifest = `data:application/json,${encodeURIComponent(JSON.stringify({ schemaVersion: '1.0.0', entries: [] }))}`;
|
|
730
857
|
const renderer = await constructRenderer(
|
|
731
|
-
{ getContext: () => null },
|
|
858
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
732
859
|
{ rhi },
|
|
733
860
|
{ shaderManifestUrl: manifest },
|
|
734
861
|
);
|
|
@@ -744,7 +871,7 @@ describe('factory contract', () => {
|
|
|
744
871
|
it('does not unconfigure a surface after its ownership was released', async () => {
|
|
745
872
|
let unconfigureCalls = 0;
|
|
746
873
|
const renderer = await constructRenderer(
|
|
747
|
-
{ getContext: () => null },
|
|
874
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
748
875
|
{
|
|
749
876
|
rhi: {
|
|
750
877
|
...rhi,
|
|
@@ -773,19 +900,70 @@ describe('factory contract', () => {
|
|
|
773
900
|
expect(unconfigureCalls).toBe(1);
|
|
774
901
|
});
|
|
775
902
|
|
|
903
|
+
it('keeps direct RHI instrumentation explicit-only at the factory boundary', async () => {
|
|
904
|
+
const drawOneFrame = (renderer: Awaited<ReturnType<typeof constructRenderer>>) => {
|
|
905
|
+
const world = new World();
|
|
906
|
+
const attached = renderer.attach(world);
|
|
907
|
+
expect(attached.ok).toBe(true);
|
|
908
|
+
if (!attached.ok) return;
|
|
909
|
+
expect(world.update().ok).toBe(true);
|
|
910
|
+
const frame = renderer.draw({
|
|
911
|
+
leases: [attached.value],
|
|
912
|
+
camera: { lease: attached.value },
|
|
913
|
+
environment: { lease: attached.value },
|
|
914
|
+
});
|
|
915
|
+
expect(frame.ok, frame.ok ? '' : JSON.stringify(frame.error)).toBe(true);
|
|
916
|
+
};
|
|
917
|
+
const moduleBoundary = vi.fn();
|
|
918
|
+
const implicit = await constructRenderer(
|
|
919
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
920
|
+
{
|
|
921
|
+
rhi: {
|
|
922
|
+
...rhi,
|
|
923
|
+
instrumentation: { onFrameBoundary: moduleBoundary },
|
|
924
|
+
} as never,
|
|
925
|
+
},
|
|
926
|
+
{ shaderManifestUrl: manifestUrl() },
|
|
927
|
+
);
|
|
928
|
+
expect((await implicit.initialization).ok).toBe(true);
|
|
929
|
+
drawOneFrame(implicit);
|
|
930
|
+
expect(moduleBoundary).not.toHaveBeenCalled();
|
|
931
|
+
expect((await implicit.dispose()).ok).toBe(true);
|
|
932
|
+
|
|
933
|
+
const explicitBoundary = vi.fn();
|
|
934
|
+
const explicit = await constructRenderer(
|
|
935
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
936
|
+
{
|
|
937
|
+
rhi: {
|
|
938
|
+
...rhi,
|
|
939
|
+
instrumentation: { onFrameBoundary: moduleBoundary },
|
|
940
|
+
} as never,
|
|
941
|
+
rhiInstrumentation: { onFrameBoundary: explicitBoundary },
|
|
942
|
+
},
|
|
943
|
+
{ shaderManifestUrl: manifestUrl() },
|
|
944
|
+
);
|
|
945
|
+
expect((await explicit.initialization).ok).toBe(true);
|
|
946
|
+
drawOneFrame(explicit);
|
|
947
|
+
expect(explicitBoundary).toHaveBeenCalled();
|
|
948
|
+
expect(moduleBoundary).not.toHaveBeenCalled();
|
|
949
|
+
expect((await explicit.dispose()).ok).toBe(true);
|
|
950
|
+
});
|
|
951
|
+
|
|
776
952
|
it('retains the device-owned prewarmed TAA shader across off and on', async () => {
|
|
777
953
|
const pending: Array<{
|
|
778
954
|
readonly label: string;
|
|
779
955
|
readonly promise: Promise<ReturnType<typeof ok<ShaderModule>>>;
|
|
780
956
|
readonly resolve: (value: ReturnType<typeof ok<ShaderModule>>) => void;
|
|
781
957
|
}> = [];
|
|
782
|
-
const
|
|
958
|
+
const moduleSources: string[] = [];
|
|
959
|
+
const frameBoundary = vi.fn();
|
|
783
960
|
const backend: RhiBackendPack = {
|
|
784
961
|
rhi,
|
|
962
|
+
instrumentation: { onFrameBoundary: frameBoundary },
|
|
785
963
|
createShaderModule: (_device, desc) => {
|
|
786
964
|
const label = desc.label ?? '<unlabeled>';
|
|
787
|
-
|
|
788
|
-
if (!
|
|
965
|
+
moduleSources.push(desc.code);
|
|
966
|
+
if (!desc.code.includes('fs_taa_resolve')) {
|
|
789
967
|
return Promise.resolve(ok({} as ShaderModule));
|
|
790
968
|
}
|
|
791
969
|
let resolve!: (value: ReturnType<typeof ok<ShaderModule>>) => void;
|
|
@@ -836,7 +1014,8 @@ describe('factory contract', () => {
|
|
|
836
1014
|
});
|
|
837
1015
|
|
|
838
1016
|
const first = renderer.draw(frameInput());
|
|
839
|
-
expect(first.ok).toBe(true);
|
|
1017
|
+
expect(first.ok, first.ok ? '' : JSON.stringify(first.error)).toBe(true);
|
|
1018
|
+
expect(frameBoundary).toHaveBeenCalled();
|
|
840
1019
|
expect(pending).toHaveLength(1);
|
|
841
1020
|
|
|
842
1021
|
world.set(camera, LocalCamera, { antialias: ANTIALIAS_NONE }).unwrap();
|
|
@@ -844,14 +1023,12 @@ describe('factory contract', () => {
|
|
|
844
1023
|
const off = renderer.draw(frameInput());
|
|
845
1024
|
expect(off.ok).toBe(true);
|
|
846
1025
|
|
|
847
|
-
expect(
|
|
848
|
-
moduleCalls.filter((label) => label.startsWith('post-process-forgeax.taa-resolve-pso-')),
|
|
849
|
-
).toHaveLength(1);
|
|
1026
|
+
expect(moduleSources.filter((source) => source.includes('fs_taa_resolve'))).toHaveLength(1);
|
|
850
1027
|
|
|
851
1028
|
world.set(camera, LocalCamera, { antialias: ANTIALIAS_TAA }).unwrap();
|
|
852
1029
|
expect(world.update().ok).toBe(true);
|
|
853
1030
|
const second = renderer.draw(frameInput());
|
|
854
|
-
expect(second.ok).toBe(true);
|
|
1031
|
+
expect(second.ok, second.ok ? '' : JSON.stringify(second.error)).toBe(true);
|
|
855
1032
|
expect(pending).toHaveLength(1);
|
|
856
1033
|
expect(renderer.draw(frameInput()).ok).toBe(true);
|
|
857
1034
|
world.set(camera, LocalCamera, { antialias: ANTIALIAS_NONE }).unwrap();
|
|
@@ -865,13 +1042,11 @@ describe('factory contract', () => {
|
|
|
865
1042
|
|
|
866
1043
|
expect((await renderer.dispose()).ok).toBe(true);
|
|
867
1044
|
expect((await renderer.dispose()).ok).toBe(true);
|
|
868
|
-
expect(
|
|
869
|
-
moduleCalls.filter((label) => label.startsWith('post-process-forgeax.taa-resolve-pso-')),
|
|
870
|
-
).toHaveLength(1);
|
|
1045
|
+
expect(moduleSources.filter((source) => source.includes('fs_taa_resolve'))).toHaveLength(1);
|
|
871
1046
|
});
|
|
872
1047
|
|
|
873
1048
|
it('rebuilds a TAA graph for a same-mode target resize', async () => {
|
|
874
|
-
const
|
|
1049
|
+
const moduleSources: string[] = [];
|
|
875
1050
|
const created = new Map<object, string>();
|
|
876
1051
|
const destroyed = new Set<object>();
|
|
877
1052
|
let wrappedDevice: object | undefined;
|
|
@@ -914,7 +1089,7 @@ describe('factory contract', () => {
|
|
|
914
1089
|
const backend: RhiBackendPack = {
|
|
915
1090
|
rhi: instrumentedRhi,
|
|
916
1091
|
createShaderModule: async (_device, desc) => {
|
|
917
|
-
|
|
1092
|
+
moduleSources.push(desc.code);
|
|
918
1093
|
return ok({} as ShaderModule);
|
|
919
1094
|
},
|
|
920
1095
|
};
|
|
@@ -953,14 +1128,12 @@ describe('factory contract', () => {
|
|
|
953
1128
|
await Promise.resolve();
|
|
954
1129
|
first = renderer.draw(frameInput());
|
|
955
1130
|
}
|
|
956
|
-
expect(first.ok).toBe(true);
|
|
1131
|
+
expect(first.ok, first.ok ? '' : JSON.stringify(first.error)).toBe(true);
|
|
957
1132
|
const firstGeneration = [...created.entries()]
|
|
958
1133
|
.filter(([_, label]) => label.startsWith('taa-history-'))
|
|
959
1134
|
.slice(-4);
|
|
960
1135
|
expect(firstGeneration).toHaveLength(4);
|
|
961
|
-
expect(
|
|
962
|
-
moduleCalls.filter((label) => label.startsWith('post-process-forgeax.taa-resolve-pso-')),
|
|
963
|
-
).toHaveLength(1);
|
|
1136
|
+
expect(moduleSources.filter((source) => source.includes('fs_taa_resolve'))).toHaveLength(1);
|
|
964
1137
|
const firstFrame = renderer.inspect().frame.frameId;
|
|
965
1138
|
|
|
966
1139
|
canvas.width = 96;
|
|
@@ -982,9 +1155,7 @@ describe('factory contract', () => {
|
|
|
982
1155
|
expect(replacementGeneration.every(([handle]) => !destroyed.has(handle))).toBe(true);
|
|
983
1156
|
expect(renderer.inspect().frame.frameId).toBe(firstFrame + 1);
|
|
984
1157
|
expect(renderer.inspect().state).toBe('alive');
|
|
985
|
-
expect(
|
|
986
|
-
moduleCalls.filter((label) => label.startsWith('post-process-forgeax.taa-resolve-pso-')),
|
|
987
|
-
).toHaveLength(1);
|
|
1158
|
+
expect(moduleSources.filter((source) => source.includes('fs_taa_resolve'))).toHaveLength(1);
|
|
988
1159
|
world.set(camera, LocalCamera, { antialias: ANTIALIAS_NONE }).unwrap();
|
|
989
1160
|
expect(world.update().ok).toBe(true);
|
|
990
1161
|
expect(renderer.draw(frameInput()).ok).toBe(true);
|
|
@@ -1165,6 +1336,86 @@ describe('factory contract', () => {
|
|
|
1165
1336
|
await renderer.dispose();
|
|
1166
1337
|
});
|
|
1167
1338
|
|
|
1339
|
+
it('projects generic post work once and keeps Motion Blur independent across Standard lanes', async () => {
|
|
1340
|
+
for (const renderPath of ['forward', 'deferred'] as const) {
|
|
1341
|
+
for (const taa of [false, true]) {
|
|
1342
|
+
const renderer = await constructRenderer(
|
|
1343
|
+
{ width: 64, height: 64, getContext: () => null },
|
|
1344
|
+
{ rhi, features: [createGenericPostProbeFeature()] },
|
|
1345
|
+
{ shaderManifestUrl: renderLifecycleManifestUrl() },
|
|
1346
|
+
);
|
|
1347
|
+
try {
|
|
1348
|
+
expect((await renderer.initialization).ok).toBe(true);
|
|
1349
|
+
expect(renderer.setProfile({ ...DEFAULT_STANDARD_PROFILE, renderPath }).ok).toBe(true);
|
|
1350
|
+
const world = new World();
|
|
1351
|
+
const attached = renderer.attach(world);
|
|
1352
|
+
expect(attached.ok).toBe(true);
|
|
1353
|
+
if (!attached.ok) continue;
|
|
1354
|
+
registerPropagateTransforms(world);
|
|
1355
|
+
const camera = world
|
|
1356
|
+
.spawn(
|
|
1357
|
+
{ component: Transform, data: { pos: [0, 0, 4] } },
|
|
1358
|
+
{
|
|
1359
|
+
component: LocalCamera,
|
|
1360
|
+
data: {
|
|
1361
|
+
fov: 1,
|
|
1362
|
+
aspect: 1,
|
|
1363
|
+
near: 0.1,
|
|
1364
|
+
far: 100,
|
|
1365
|
+
antialias: taa ? ANTIALIAS_TAA : ANTIALIAS_NONE,
|
|
1366
|
+
tonemap: TONEMAP_ACES_FILMIC,
|
|
1367
|
+
},
|
|
1368
|
+
},
|
|
1369
|
+
)
|
|
1370
|
+
.unwrap();
|
|
1371
|
+
world
|
|
1372
|
+
.addComponent(camera, {
|
|
1373
|
+
component: MotionBlur,
|
|
1374
|
+
data: { shutterAngle: 180, maxRadiusPixels: 8, sampleCount: 4, targetFps: 60 },
|
|
1375
|
+
})
|
|
1376
|
+
.unwrap();
|
|
1377
|
+
expect(world.update().ok).toBe(true);
|
|
1378
|
+
const draw = renderer.draw({
|
|
1379
|
+
leases: [attached.value],
|
|
1380
|
+
camera: { lease: attached.value },
|
|
1381
|
+
environment: { lease: attached.value },
|
|
1382
|
+
});
|
|
1383
|
+
expect(draw.ok).toBe(true);
|
|
1384
|
+
if (!draw.ok || draw.value === undefined) continue;
|
|
1385
|
+
const completed = await draw.value.completed;
|
|
1386
|
+
expect(completed.ok).toBe(true);
|
|
1387
|
+
if (!completed.ok) continue;
|
|
1388
|
+
const inspection = renderer.inspect();
|
|
1389
|
+
const names = inspection.perFramePassNames;
|
|
1390
|
+
const genericIndex = names.indexOf('generic-post-probe');
|
|
1391
|
+
const motionSummaryIndex = names.indexOf('motion-blur-tile-summary');
|
|
1392
|
+
const motionIndex = names.indexOf('motion-blur');
|
|
1393
|
+
const outputIndex = names.indexOf('output-transform');
|
|
1394
|
+
expect(names.filter((name) => name === 'generic-post-probe')).toHaveLength(1);
|
|
1395
|
+
expect(names.filter((name) => name === 'motion-blur-tile-summary')).toHaveLength(1);
|
|
1396
|
+
expect(names.filter((name) => name === 'motion-blur')).toHaveLength(1);
|
|
1397
|
+
expect(genericIndex).toBeGreaterThanOrEqual(0);
|
|
1398
|
+
expect(motionSummaryIndex).toBeGreaterThanOrEqual(0);
|
|
1399
|
+
expect(motionIndex).toBeGreaterThan(motionSummaryIndex);
|
|
1400
|
+
expect(outputIndex).toBeGreaterThan(motionIndex);
|
|
1401
|
+
if (taa) expect(names.indexOf('taa-resolve')).toBeLessThan(motionSummaryIndex);
|
|
1402
|
+
else expect(names).not.toContain('taa-resolve');
|
|
1403
|
+
expect(inspection.motionBlur).toMatchObject({
|
|
1404
|
+
enabled: true,
|
|
1405
|
+
passCount: 2,
|
|
1406
|
+
execution: { passes: [{ name: 'motion-blur-tile-summary' }, { name: 'motion-blur' }] },
|
|
1407
|
+
});
|
|
1408
|
+
// A completed two-pass execution is the public Renderer proof that
|
|
1409
|
+
// the named motion-blurred-color target had a writer and was then
|
|
1410
|
+
// consumed by the shared output chain.
|
|
1411
|
+
expect(inspection.featureGraph?.compileSuccesses ?? 0).toBeGreaterThan(0);
|
|
1412
|
+
} finally {
|
|
1413
|
+
await renderer.dispose();
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
});
|
|
1418
|
+
|
|
1168
1419
|
it('publishes invalid MotionBlur parameters through renderer inspection', async () => {
|
|
1169
1420
|
const renderer = await constructRenderer(
|
|
1170
1421
|
{ width: 64, height: 64, getContext: () => null },
|
|
@@ -1320,7 +1571,7 @@ describe('factory contract', () => {
|
|
|
1320
1571
|
await Promise.resolve();
|
|
1321
1572
|
first = renderer.draw(frameInput());
|
|
1322
1573
|
}
|
|
1323
|
-
expect(first.ok).toBe(true);
|
|
1574
|
+
expect(first.ok, first.ok ? '' : JSON.stringify(first.error)).toBe(true);
|
|
1324
1575
|
const historyHandles = [...created.entries()].filter(([_, label]) =>
|
|
1325
1576
|
label.startsWith('taa-history-'),
|
|
1326
1577
|
);
|
|
@@ -1701,11 +1952,11 @@ describe('factory contract', () => {
|
|
|
1701
1952
|
});
|
|
1702
1953
|
|
|
1703
1954
|
it('aggregates active and fence-retiring Bloom bundles through Renderer.inspect', async () => {
|
|
1955
|
+
const scenario = await createBloomScenario();
|
|
1704
1956
|
const fence = deferred<undefined>();
|
|
1705
1957
|
const onSubmittedWorkDone = vi
|
|
1706
1958
|
.spyOn(RhiNullQueue.prototype, 'onSubmittedWorkDone')
|
|
1707
1959
|
.mockReturnValue(fence.promise);
|
|
1708
|
-
const scenario = await createBloomScenario();
|
|
1709
1960
|
try {
|
|
1710
1961
|
expect(scenario.draw().ok).toBe(true);
|
|
1711
1962
|
scenario.setBloom('off');
|
|
@@ -1751,11 +2002,11 @@ describe('factory contract', () => {
|
|
|
1751
2002
|
});
|
|
1752
2003
|
|
|
1753
2004
|
it('settles Bloom off to exact zero without re-enabling it', async () => {
|
|
2005
|
+
const scenario = await createBloomScenario();
|
|
1754
2006
|
const fence = deferred<undefined>();
|
|
1755
2007
|
const onSubmittedWorkDone = vi
|
|
1756
2008
|
.spyOn(RhiNullQueue.prototype, 'onSubmittedWorkDone')
|
|
1757
2009
|
.mockReturnValue(fence.promise);
|
|
1758
|
-
const scenario = await createBloomScenario();
|
|
1759
2010
|
try {
|
|
1760
2011
|
expect(scenario.draw().ok).toBe(true);
|
|
1761
2012
|
scenario.setBloom('off');
|
|
@@ -1788,11 +2039,11 @@ describe('factory contract', () => {
|
|
|
1788
2039
|
});
|
|
1789
2040
|
|
|
1790
2041
|
it('reports one structured Bloom fence rejection and drains late-retiring resources', async () => {
|
|
2042
|
+
const scenario = await createBloomScenario();
|
|
1791
2043
|
const fence = deferred<undefined>();
|
|
1792
2044
|
const onSubmittedWorkDone = vi
|
|
1793
2045
|
.spyOn(RhiNullQueue.prototype, 'onSubmittedWorkDone')
|
|
1794
2046
|
.mockReturnValue(fence.promise);
|
|
1795
|
-
const scenario = await createBloomScenario();
|
|
1796
2047
|
const errors: unknown[] = [];
|
|
1797
2048
|
let errorSnapshot: ReturnType<typeof scenario.renderer.inspect> | undefined;
|
|
1798
2049
|
const unsubscribe = scenario.renderer.onError((error) => {
|
|
@@ -1838,6 +2089,7 @@ describe('factory contract', () => {
|
|
|
1838
2089
|
});
|
|
1839
2090
|
|
|
1840
2091
|
it('keeps drained Bloom fence rejection callbacks inert', async () => {
|
|
2092
|
+
const scenario = await createBloomScenario();
|
|
1841
2093
|
const callbacks: Array<{
|
|
1842
2094
|
readonly resolve: (value: undefined) => unknown;
|
|
1843
2095
|
readonly reject: ((reason: unknown) => unknown) | undefined;
|
|
@@ -1852,7 +2104,6 @@ describe('factory contract', () => {
|
|
|
1852
2104
|
const onSubmittedWorkDone = vi
|
|
1853
2105
|
.spyOn(RhiNullQueue.prototype, 'onSubmittedWorkDone')
|
|
1854
2106
|
.mockReturnValue(lateFence);
|
|
1855
|
-
const scenario = await createBloomScenario();
|
|
1856
2107
|
const errors: unknown[] = [];
|
|
1857
2108
|
const unsubscribe = scenario.renderer.onError((error) => errors.push(error));
|
|
1858
2109
|
try {
|
|
@@ -2129,10 +2380,9 @@ describe('factory contract', () => {
|
|
|
2129
2380
|
staleLossEvents: 0,
|
|
2130
2381
|
});
|
|
2131
2382
|
expect(renderer.inspect().recovery.rehydratedRoots).toBeGreaterThan(0);
|
|
2132
|
-
//
|
|
2133
|
-
// the
|
|
2134
|
-
|
|
2135
|
-
expect(renderer.inspect().perFramePassNames.length).toBeGreaterThan(0);
|
|
2383
|
+
// Publication retires the graph bound to the previous canvas context;
|
|
2384
|
+
// the first recovered draw acquires the replacement presentation target.
|
|
2385
|
+
expect(renderer.inspect().perFramePassNames).toHaveLength(0);
|
|
2136
2386
|
expect(renderer.inspect().standardLighting).toBeDefined();
|
|
2137
2387
|
expect(world.update().ok).toBe(true);
|
|
2138
2388
|
expect(renderer.draw(input()).ok).toBe(true);
|