@forgeax/engine-render 0.1.23 → 0.1.25
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 +231 -10
- package/dist/assembly/bundler-contract.d.ts +9 -0
- package/dist/assembly/bundler-contract.d.ts.map +1 -0
- package/dist/assembly/device-feature-admission.d.ts +8 -0
- package/dist/assembly/device-feature-admission.d.ts.map +1 -1
- package/dist/assembly/extended-lighting-fallback.d.ts +13 -0
- package/dist/assembly/extended-lighting-fallback.d.ts.map +1 -0
- package/dist/assembly/factory.d.ts +7 -243
- package/dist/assembly/factory.d.ts.map +1 -1
- package/dist/assembly/material/assembly.d.ts +3 -2
- package/dist/assembly/material/assembly.d.ts.map +1 -1
- package/dist/assembly/material/standard-layer-projection.d.ts +10 -0
- package/dist/assembly/material/standard-layer-projection.d.ts.map +1 -0
- package/dist/assembly/material/surface-projection.d.ts +24 -0
- package/dist/assembly/material/surface-projection.d.ts.map +1 -0
- package/dist/assembly/material-shader-policy.d.ts +188 -0
- package/dist/assembly/material-shader-policy.d.ts.map +1 -0
- package/dist/assembly/material-shader-prewarm.d.ts +21 -0
- package/dist/assembly/material-shader-prewarm.d.ts.map +1 -0
- package/dist/assembly/mesh-ssbo-grow.d.ts +88 -0
- package/dist/assembly/mesh-ssbo-grow.d.ts.map +1 -0
- package/dist/assembly/recovery/device-loss-fanout.d.ts +14 -0
- package/dist/assembly/recovery/device-loss-fanout.d.ts.map +1 -0
- package/dist/assembly/recovery/generation.d.ts +46 -0
- package/dist/assembly/recovery/generation.d.ts.map +1 -0
- package/dist/assembly/recovery/recovery-attempt.d.ts +63 -0
- package/dist/assembly/recovery/recovery-attempt.d.ts.map +1 -0
- package/dist/assembly/recovery/renderer-recover.d.ts +115 -0
- package/dist/assembly/recovery/renderer-recover.d.ts.map +1 -0
- package/dist/assembly/renderer-facade.d.ts +10 -0
- package/dist/assembly/renderer-facade.d.ts.map +1 -0
- package/dist/assembly/renderer-frame-transaction.d.ts +17 -0
- package/dist/assembly/renderer-frame-transaction.d.ts.map +1 -1
- package/dist/assembly/renderer-helpers.d.ts +19 -0
- package/dist/assembly/renderer-helpers.d.ts.map +1 -0
- package/dist/assembly/renderer-lifecycle.d.ts +34 -0
- package/dist/assembly/renderer-lifecycle.d.ts.map +1 -1
- package/dist/assembly/shader-prewarm-policy.d.ts +15 -0
- package/dist/assembly/shader-prewarm-policy.d.ts.map +1 -0
- package/dist/assembly/webgpu-ready-contract.d.ts +9 -0
- package/dist/assembly/webgpu-ready-contract.d.ts.map +1 -0
- package/dist/assembly/webgpu-ready.d.ts +55 -0
- package/dist/assembly/webgpu-ready.d.ts.map +1 -0
- package/dist/assembly/webgpu-renderer.d.ts +152 -0
- package/dist/assembly/webgpu-renderer.d.ts.map +1 -0
- package/dist/assembly/webgpu-vertex-layouts.d.ts +89 -0
- package/dist/assembly/webgpu-vertex-layouts.d.ts.map +1 -0
- package/dist/assets/asset-decoders.d.ts.map +1 -1
- package/dist/authoring.mjs +1 -1
- package/dist/{chunk-FF7K3FSO.mjs → chunk-ADHHVYLW.mjs} +89 -89
- package/dist/chunk-ADHHVYLW.mjs.map +1 -0
- package/dist/{chunk-YALPS44A.mjs → chunk-E34VL5VI.mjs} +47 -47
- package/dist/chunk-E34VL5VI.mjs.map +1 -0
- package/dist/{chunk-4L3P6DT5.mjs → chunk-GE3SDD72.mjs} +37 -5
- package/dist/chunk-GE3SDD72.mjs.map +1 -0
- package/dist/{chunk-HZUPSYW7.mjs → chunk-HKXTW355.mjs} +105 -15
- package/dist/chunk-HKXTW355.mjs.map +1 -0
- package/dist/chunk-JSEDTZYS.mjs +413 -0
- package/dist/chunk-JSEDTZYS.mjs.map +1 -0
- package/dist/{chunk-FBC4R44J.mjs → chunk-KM2NOX2I.mjs} +57 -57
- package/dist/chunk-KM2NOX2I.mjs.map +1 -0
- package/dist/{chunk-DIYW3M5D.mjs → chunk-N3RT2EUR.mjs} +2288 -2238
- package/dist/chunk-N3RT2EUR.mjs.map +1 -0
- package/dist/{chunk-ZUWKAZ2I.mjs → chunk-TCLDX7SZ.mjs} +1167 -368
- package/dist/chunk-TCLDX7SZ.mjs.map +1 -0
- package/dist/{chunk-QODA5UKU.mjs → chunk-ZZ4YQ474.mjs} +2 -2
- package/dist/chunk-ZZ4YQ474.mjs.map +1 -0
- package/dist/components/instances.d.ts +13 -31
- package/dist/components/instances.d.ts.map +1 -1
- package/dist/construct-renderer.mjs +20688 -16314
- package/dist/construct-renderer.mjs.map +1 -1
- package/dist/device/device-scope.d.ts +2 -0
- package/dist/device/device-scope.d.ts.map +1 -1
- package/dist/device/gpu-residency.d.ts +24 -4
- package/dist/device/gpu-residency.d.ts.map +1 -1
- package/dist/environment/frame.d.ts +5 -0
- package/dist/environment/frame.d.ts.map +1 -1
- package/dist/environment/inspection.d.ts +7 -0
- package/dist/environment/inspection.d.ts.map +1 -1
- package/dist/environment/lifecycle.d.ts +20 -2
- package/dist/environment/lifecycle.d.ts.map +1 -1
- package/dist/errors/recover.d.ts +58 -2
- package/dist/errors/recover.d.ts.map +1 -1
- package/dist/errors/render.d.ts +13 -0
- package/dist/errors/render.d.ts.map +1 -1
- package/dist/extract/contracts.d.ts +899 -0
- package/dist/extract/contracts.d.ts.map +1 -0
- package/dist/features/host.d.ts +2 -0
- package/dist/features/host.d.ts.map +1 -1
- package/dist/features/prepared-gpu-work.d.ts +3 -0
- package/dist/features/prepared-gpu-work.d.ts.map +1 -1
- package/dist/features/prepared-graphics-store.d.ts +2 -0
- package/dist/features/prepared-graphics-store.d.ts.map +1 -1
- package/dist/gpu-driven/production-raster.d.ts +34 -1
- package/dist/gpu-driven/production-raster.d.ts.map +1 -1
- package/dist/gpu-scene.d.ts +5 -0
- package/dist/gpu-scene.d.ts.map +1 -1
- package/dist/ibl/IblPipelineCache.d.ts +7 -6
- package/dist/ibl/IblPipelineCache.d.ts.map +1 -1
- package/dist/ibl/skylight-bind-group.d.ts +7 -1
- package/dist/ibl/skylight-bind-group.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +27 -9
- package/dist/index.mjs.map +1 -1
- package/dist/instance-buffer-cache.d.ts +7 -1
- package/dist/instance-buffer-cache.d.ts.map +1 -1
- package/dist/instances.d.ts +101 -0
- package/dist/instances.d.ts.map +1 -0
- package/dist/internal.mjs +6 -6
- package/dist/light-buffer-layout.d.ts +3 -0
- package/dist/light-buffer-layout.d.ts.map +1 -1
- package/dist/materials.d.ts +96 -11
- package/dist/materials.d.ts.map +1 -1
- package/dist/mesh-material-bindings.d.ts +56 -0
- package/dist/mesh-material-bindings.d.ts.map +1 -1
- package/dist/occlusion-proxy.d.ts +4 -0
- package/dist/occlusion-proxy.d.ts.map +1 -0
- package/dist/pbr-pipeline.d.ts +32 -9
- package/dist/pbr-pipeline.d.ts.map +1 -1
- package/dist/pipeline-builder.d.ts.map +1 -1
- package/dist/pipeline-spec.d.ts.map +1 -1
- package/dist/points-lines/prepare.d.ts +3 -0
- package/dist/points-lines/prepare.d.ts.map +1 -1
- package/dist/points-lines/standard-owner.d.ts +33 -0
- package/dist/points-lines/standard-owner.d.ts.map +1 -0
- package/dist/record/frame-snapshot.d.ts +18 -2
- package/dist/record/frame-snapshot.d.ts.map +1 -1
- package/dist/record/frame-targets.d.ts.map +1 -1
- package/dist/record/frame.d.ts +14 -2
- package/dist/record/frame.d.ts.map +1 -1
- package/dist/record/main-pass-geometry.d.ts +36 -4
- package/dist/record/main-pass-geometry.d.ts.map +1 -1
- package/dist/record/main-pass-material.d.ts +7 -17
- package/dist/record/main-pass-material.d.ts.map +1 -1
- package/dist/record/main-pass.d.ts.map +1 -1
- package/dist/record/mesh-ssbo.d.ts +11 -3
- package/dist/record/mesh-ssbo.d.ts.map +1 -1
- package/dist/record/recovery-pipeline.d.ts +30 -0
- package/dist/record/recovery-pipeline.d.ts.map +1 -0
- package/dist/record/render-context.d.ts +28 -5
- package/dist/record/render-context.d.ts.map +1 -1
- package/dist/record/shadow-pass.d.ts +11 -1
- package/dist/record/shadow-pass.d.ts.map +1 -1
- package/dist/record/typed-frame-graph.d.ts +1 -1
- package/dist/record/typed-frame-graph.d.ts.map +1 -1
- package/dist/recovery/render-system-candidate.d.ts +65 -0
- package/dist/recovery/render-system-candidate.d.ts.map +1 -0
- package/dist/render-contract.d.ts +68 -7
- package/dist/render-contract.d.ts.map +1 -1
- package/dist/render-system-extract-tail.d.ts +16 -0
- package/dist/render-system-extract-tail.d.ts.map +1 -0
- package/dist/render-system-extract.d.ts +180 -22
- package/dist/render-system-extract.d.ts.map +1 -1
- package/dist/render-system.d.ts +131 -4
- package/dist/render-system.d.ts.map +1 -1
- package/dist/scene/render-scene-types.d.ts +2 -0
- package/dist/scene/render-scene-types.d.ts.map +1 -1
- package/dist/scene/render-scene.d.ts +31 -1
- package/dist/scene/render-scene.d.ts.map +1 -1
- package/dist/systems/skin-palette-allocator.d.ts +6 -0
- package/dist/systems/skin-palette-allocator.d.ts.map +1 -1
- package/dist/temporal/frame-coordinator.d.ts.map +1 -1
- package/dist/temporal/index.mjs +6 -6
- package/dist/temporal/taa-history-store.d.ts +15 -1
- package/dist/temporal/taa-history-store.d.ts.map +1 -1
- package/dist/temporal/transaction.d.ts +5 -0
- package/dist/temporal/transaction.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/__tests__/device-feature-admission.unit.test.ts +6 -0
- package/src/__tests__/device-loss-fanout.unit.test.ts +107 -0
- package/src/__tests__/device-scope-lifecycle.unit.test.ts +21 -0
- package/src/__tests__/environment-generation.integration.test.ts +23 -0
- package/src/__tests__/expose-renderer-errors.unit.test.ts +34 -0
- package/src/__tests__/factory-contract.integration.test.ts +122 -7
- package/src/__tests__/fallback-row-stride-surface.unit.test.ts +4 -1
- package/src/__tests__/gpu-scene.unit.test.ts +38 -2
- package/src/__tests__/ibl/face-uniforms.unit.test.ts +2 -0
- package/src/__tests__/ibl-residency-publication.unit.test.ts +113 -0
- package/src/__tests__/instances-store.unit.test.ts +46 -0
- package/src/__tests__/instances-world-ownership.integration.test.ts +62 -0
- package/src/__tests__/material-contract-inventory.unit.test.ts +29 -22
- package/src/__tests__/material-cooked-projection.unit.test.ts +19 -1
- package/src/__tests__/material-pass-policy.unit.test.ts +69 -0
- package/src/__tests__/material-snapshot-mutation.integration.test.ts +69 -0
- package/src/__tests__/material-static-dynamic-route.unit.test.ts +29 -0
- package/src/__tests__/material-stride-surface.unit.test.ts +7 -3
- package/src/__tests__/material-surface-authoring.test-d.ts +62 -0
- package/src/__tests__/materials-standard-contract.unit.test.ts +104 -0
- package/src/__tests__/materials-transmission-validation.unit.test.ts +24 -0
- package/src/__tests__/mesh-buffer-usage-surface.unit.test.ts +1 -5
- package/src/__tests__/physical-clearcoat.integration.test.ts +89 -0
- package/src/__tests__/prepared-gpu-driven-pbr.integration.test.ts +1 -1
- package/src/__tests__/prepared-graphics-pipeline-warmup.unit.test.ts +1 -1
- package/src/__tests__/recover-error-policy-owner.unit.test.ts +6 -3
- package/src/__tests__/recovery-candidate-prepare.contract.test.ts +140 -0
- package/src/__tests__/renderer-factory-material-contract.unit.test.ts +127 -18
- package/src/__tests__/renderer-frame-generation-fence.integration.test.ts +47 -0
- package/src/__tests__/renderer-generation-assembly.unit.test.ts +77 -0
- package/src/__tests__/renderer-generation-failure.unit.test.ts +108 -0
- package/src/__tests__/renderer-producer-root-matrix.integration.test.ts +33 -0
- package/src/__tests__/renderer-recovery-capability-matrix.unit.test.ts +59 -0
- package/src/__tests__/renderer-recovery-contract.unit.test.ts +73 -0
- package/src/__tests__/renderer-recovery-lifecycle.unit.test.ts +216 -0
- package/src/__tests__/renderer-target-history-recovery.integration.test.ts +80 -0
- package/src/__tests__/shader-manifest-fixture.ts +13 -16
- package/src/__tests__/shader-stage-surface.unit.test.ts +1 -1
- package/src/__tests__/skin-motion-regression.unit.test.ts +33 -0
- package/src/__tests__/skinned-shadow-caster.test.ts +30 -2
- package/src/__tests__/standard-layer-projection.unit.test.ts +23 -0
- package/src/__tests__/surface-adjacent-regressions.integration.test.ts +60 -0
- package/src/__tests__/surface-standard-pipeline.browser.test.ts +20 -0
- package/src/__tests__/surface-standard-pipeline.dawn.test.ts +20 -0
- package/src/__tests__/surface-standard-pipeline.fixture.ts +132 -0
- package/src/__tests__/surface-variant-provenance.integration.test.ts +33 -0
- package/src/__tests__/transmission-prewarm.unit.test.ts +95 -85
- package/src/__tests__/volumetric-fog-budget-recovery.integration.test.ts +1 -1
- package/src/__tests__/volumetric-fog-topology.unit.test.ts +3 -1
- package/src/assembly/bundler-contract.ts +9 -0
- package/src/assembly/device-feature-admission.ts +15 -5
- package/src/assembly/extended-lighting-fallback.ts +216 -0
- package/src/assembly/factory.ts +83 -10088
- package/src/assembly/material/__tests__/standard-layer-plan-projection.integration.test.ts +18 -0
- package/src/assembly/material/__tests__/surface-pass-projection.integration.test.ts +62 -0
- package/src/assembly/material/assembly.ts +18 -2
- package/src/assembly/material/standard-layer-projection.ts +16 -0
- package/src/assembly/material/surface-projection.ts +90 -0
- package/src/assembly/material-shader-policy.ts +932 -0
- package/src/assembly/material-shader-prewarm.ts +88 -0
- package/src/assembly/mesh-ssbo-grow.ts +270 -0
- package/src/assembly/recovery/device-loss-fanout.ts +89 -0
- package/src/assembly/recovery/generation.ts +141 -0
- package/src/assembly/recovery/recovery-attempt.ts +800 -0
- package/src/assembly/recovery/renderer-recover.ts +906 -0
- package/src/assembly/renderer-facade.ts +342 -0
- package/src/assembly/renderer-frame-transaction.ts +45 -0
- package/src/assembly/renderer-helpers.ts +99 -0
- package/src/assembly/renderer-lifecycle.ts +159 -0
- package/src/assembly/shader-prewarm-policy.ts +157 -0
- package/src/assembly/webgpu-ready-contract.ts +14 -0
- package/src/assembly/webgpu-ready.ts +4066 -0
- package/src/assembly/webgpu-renderer.ts +4027 -0
- package/src/assembly/webgpu-vertex-layouts.ts +132 -0
- package/src/assets/asset-decoders.ts +27 -4
- package/src/components/camera.ts +1 -1
- package/src/components/instances.ts +14 -197
- package/src/debug-draw-glue.ts +1 -1
- package/src/device/device-scope.ts +35 -6
- package/src/device/gpu-residency.ts +194 -26
- package/src/environment/frame.ts +6 -0
- package/src/environment/inspection.ts +10 -0
- package/src/environment/lifecycle.ts +114 -8
- package/src/errors/recover.ts +76 -5
- package/src/errors/render.ts +17 -0
- package/src/extract/contracts.ts +974 -0
- package/src/features/host.ts +16 -0
- package/src/features/prepared-gpu-work.ts +20 -2
- package/src/features/prepared-graphics-store.ts +17 -0
- package/src/gpu-driven/production-raster.ts +131 -3
- package/src/gpu-scene.ts +87 -31
- package/src/ibl/IblPipelineCache.ts +134 -50
- package/src/ibl/skylight-bind-group.ts +26 -0
- package/src/index.ts +10 -1
- package/src/instance-buffer-cache.ts +14 -1
- package/src/instances.ts +288 -0
- package/src/light-buffer-layout.ts +3 -0
- package/src/materials.ts +365 -53
- package/src/mesh-material-bindings.ts +59 -0
- package/src/occlusion-proxy.ts +64 -0
- package/src/pbr-pipeline.ts +139 -15
- package/src/pipeline-builder.ts +14 -10
- package/src/pipeline-spec.ts +6 -14
- package/src/points-lines/__tests__/cache-recovery.unit.test.ts +22 -0
- package/src/points-lines/prepare.ts +9 -0
- package/src/points-lines/standard-owner.ts +403 -0
- package/src/record/__tests__/frame-targets-recovery.unit.test.ts +60 -0
- package/src/record/__tests__/main-pass-geometry.unit.test.ts +26 -1
- package/src/record/__tests__/mesh-ssbo.unit.test.ts +38 -0
- package/src/record/__tests__/recovery-pipeline.unit.test.ts +124 -0
- package/src/record/__tests__/sprite-material-abi.unit.test.ts +28 -13
- package/src/record/__tests__/standard-pbr-ubo-layout.unit.test.ts +47 -4
- package/src/record/__tests__/temporal-payload.unit.test.ts +22 -43
- package/src/record/__tests__/typed-frame-graph-plan.unit.test.ts +1 -1
- package/src/record/frame-snapshot.ts +34 -2
- package/src/record/frame-targets.ts +11 -1
- package/src/record/frame.ts +37 -4
- package/src/record/helpers.ts +1 -1
- package/src/record/main-pass-geometry.ts +727 -63
- package/src/record/main-pass-material.ts +316 -209
- package/src/record/main-pass-sprite-draws.ts +7 -8
- package/src/record/main-pass.ts +94 -6
- package/src/record/mesh-ssbo.ts +32 -10
- package/src/record/recovery-pipeline.ts +695 -0
- package/src/record/render-context.ts +39 -4
- package/src/record/shadow-pass.ts +46 -99
- package/src/record/typed-frame-graph.ts +45 -1
- package/src/record/view-ubo.ts +3 -3
- package/src/recovery/render-system-candidate.ts +876 -0
- package/src/render-contract.ts +69 -7
- package/src/render-system-extract-tail.ts +3039 -0
- package/src/render-system-extract.ts +177 -3003
- package/src/render-system.ts +906 -662
- package/src/scene/render-scene-types.ts +2 -0
- package/src/scene/render-scene.ts +703 -37
- package/src/systems/skin-palette-allocator.ts +129 -7
- package/src/temporal/frame-coordinator.ts +4 -1
- package/src/temporal/taa-history-store.ts +46 -2
- package/src/temporal/temporal-view.ts +1 -1
- package/src/temporal/transaction.ts +9 -0
- package/src/tilemap-chunk-extract-system.ts +1 -1
- package/src/transmission/__tests__/standard-transmission.dawn.test.ts +19 -12
- package/src/transmission/__tests__/surface-compatibility.integration.test.ts +32 -0
- package/dist/chunk-4L3P6DT5.mjs.map +0 -1
- package/dist/chunk-4NPUASZR.mjs +0 -203
- package/dist/chunk-4NPUASZR.mjs.map +0 -1
- package/dist/chunk-DIYW3M5D.mjs.map +0 -1
- package/dist/chunk-FBC4R44J.mjs.map +0 -1
- package/dist/chunk-FF7K3FSO.mjs.map +0 -1
- package/dist/chunk-HZUPSYW7.mjs.map +0 -1
- package/dist/chunk-QODA5UKU.mjs.map +0 -1
- package/dist/chunk-YALPS44A.mjs.map +0 -1
- package/dist/chunk-ZUWKAZ2I.mjs.map +0 -1
package/src/render-contract.ts
CHANGED
|
@@ -26,6 +26,7 @@ import type { ImageError } from '@forgeax/engine-types';
|
|
|
26
26
|
import type { RhiBackendInstrumentation } from './assembly/backend-contract';
|
|
27
27
|
import type { Antialias, BloomEnabled, Tonemap } from './components/camera';
|
|
28
28
|
import type { EnvironmentInspection } from './environment/inspection';
|
|
29
|
+
import type { RecoveryOutcome, RecoveryPhase } from './errors/recover';
|
|
29
30
|
import type { RenderError } from './errors/render';
|
|
30
31
|
import type { RenderFeature, RenderFeatureDiagnostics } from './features/types';
|
|
31
32
|
import type { PostProcessShaderEntry } from './fullscreen-post-process-pass';
|
|
@@ -41,6 +42,7 @@ import type {
|
|
|
41
42
|
TemporalTargetInspection,
|
|
42
43
|
TransmissionInspection,
|
|
43
44
|
} from './inspection-types';
|
|
45
|
+
import type { InstanceCollectionInspection } from './instances';
|
|
44
46
|
import type { SsrAdmissionIdentity } from './ssr/identity';
|
|
45
47
|
import type {
|
|
46
48
|
RenderTarget,
|
|
@@ -56,7 +58,10 @@ import type { TemporalInspection } from './temporal/inspection';
|
|
|
56
58
|
export type { TransmissionInspection } from './inspection-types';
|
|
57
59
|
export type { PointsLinesInspection } from './points-lines/inspection';
|
|
58
60
|
|
|
59
|
-
import type {
|
|
61
|
+
import type {
|
|
62
|
+
IblBindingInspection,
|
|
63
|
+
MeshMaterialBindingObservation,
|
|
64
|
+
} from './mesh-material-bindings';
|
|
60
65
|
import type { StandardLightingInspection } from './pipeline/standard-lighting/inspection';
|
|
61
66
|
import type { StandardProfile } from './pipeline/standard-profile';
|
|
62
67
|
import type { PointShadowInspection } from './point-shadow-inspection';
|
|
@@ -284,10 +289,13 @@ export interface SpotLightProjectorFrameContext {
|
|
|
284
289
|
}
|
|
285
290
|
|
|
286
291
|
/**
|
|
287
|
-
* The sole public renderer contract.
|
|
288
|
-
*
|
|
292
|
+
* The sole public renderer contract. Consume it in this order:
|
|
293
|
+
* `state()` -> `inspect()` -> `recover()` when degraded -> `draw()` and its
|
|
294
|
+
* `FrameReceipt`. Concrete assembly stays behind the host; callers retain only
|
|
295
|
+
* leases, receipts, inspection PODs, and recovery Result values.
|
|
289
296
|
*/
|
|
290
297
|
export interface Renderer {
|
|
298
|
+
/** Renderer-owned authoring and update path for large instance collections. */
|
|
291
299
|
attach(world: World): RenderResult<RenderWorldLease, RenderError>;
|
|
292
300
|
draw(input: RenderFrameInput): RenderResult<FrameReceipt, RenderError>;
|
|
293
301
|
createRenderTarget(descriptor: RenderTargetDescriptor): RenderResult<RenderTarget, RenderError>;
|
|
@@ -319,7 +327,12 @@ export interface Renderer {
|
|
|
319
327
|
dispose(): Promise<RenderResult<void, RenderError>>;
|
|
320
328
|
}
|
|
321
329
|
|
|
322
|
-
/**
|
|
330
|
+
/**
|
|
331
|
+
* The single public renderer lifecycle authority. This closed union is the
|
|
332
|
+
* frame gate: only `alive` admits World update and draw; `device-lost` and
|
|
333
|
+
* `recovering` are explicit recovery states; `faulted` requires recreation;
|
|
334
|
+
* `disposed` is terminal.
|
|
335
|
+
*/
|
|
323
336
|
export type RendererState = 'alive' | 'device-lost' | 'recovering' | 'faulted' | 'disposed';
|
|
324
337
|
|
|
325
338
|
/** Immutable, inspectable quality and budget policy for the Standard pipeline. */
|
|
@@ -374,8 +387,9 @@ export interface FrameObservationRequest {
|
|
|
374
387
|
|
|
375
388
|
/**
|
|
376
389
|
* Immutable synchronous proof that the sole host-owned submit reached the
|
|
377
|
-
* queue. It is the only successful synchronous draw signal
|
|
378
|
-
* every observation request
|
|
390
|
+
* queue. It is the only successful synchronous draw signal. Its
|
|
391
|
+
* `deviceGeneration` fences stale work, and every observation request must use
|
|
392
|
+
* this exact receipt; a recovery retry must obtain a new one.
|
|
379
393
|
*/
|
|
380
394
|
export interface FrameReceipt {
|
|
381
395
|
readonly frameId: number;
|
|
@@ -463,10 +477,26 @@ export interface RenderObservationInspection {
|
|
|
463
477
|
* Detached renderer facts for host diagnostics and capability selection.
|
|
464
478
|
*
|
|
465
479
|
* The snapshot contains only POD values. It never exposes a device, queue,
|
|
466
|
-
* registry, encoder, or live renderer-owned collection.
|
|
480
|
+
* registry, encoder, or live renderer-owned collection. Read `state` and the
|
|
481
|
+
* bounded `recovery` detail before choosing to wait, retry, repair an owner,
|
|
482
|
+
* or recreate the Renderer; this projection is not a proof of Browser/Dawn
|
|
483
|
+
* execution.
|
|
467
484
|
*/
|
|
468
485
|
export interface RenderInspection {
|
|
469
486
|
readonly state: RendererState;
|
|
487
|
+
/** Bounded detached facts for the current or last recovery attempt. */
|
|
488
|
+
readonly recovery: {
|
|
489
|
+
readonly phase: RecoveryPhase | null;
|
|
490
|
+
readonly fromGeneration: number;
|
|
491
|
+
readonly candidateGeneration: number;
|
|
492
|
+
readonly attempt: number;
|
|
493
|
+
readonly elapsedMs: number;
|
|
494
|
+
readonly lastOutcome: RecoveryOutcome;
|
|
495
|
+
readonly failedOwner?: string;
|
|
496
|
+
readonly failedResourceKind?: string;
|
|
497
|
+
readonly rehydratedRoots: number;
|
|
498
|
+
readonly staleLossEvents: number;
|
|
499
|
+
};
|
|
470
500
|
readonly surface: 'available' | 'released';
|
|
471
501
|
readonly profile: RenderProfile;
|
|
472
502
|
readonly capabilities: Readonly<RhiCaps>;
|
|
@@ -481,6 +511,8 @@ export interface RenderInspection {
|
|
|
481
511
|
readonly featureDiagnostics: readonly RenderFeatureDiagnostics[];
|
|
482
512
|
readonly frustumStats: { readonly culled: number; readonly total: number };
|
|
483
513
|
readonly visibilityStats: { readonly explicitlyHidden: number };
|
|
514
|
+
/** Renderer-owned large-instance residency and upload facts. */
|
|
515
|
+
readonly instanceCollections: readonly InstanceCollectionInspection[];
|
|
484
516
|
readonly renderScene: RenderSceneInspection;
|
|
485
517
|
readonly reflectionProbes: ReflectionProbeInspection;
|
|
486
518
|
/** Renderer-owned SSR dependency seam; consumer facts are projected from live owners. */
|
|
@@ -492,11 +524,41 @@ export interface RenderInspection {
|
|
|
492
524
|
/** Renderer-owned point-shadow atlas budget facts from the last frame. */
|
|
493
525
|
readonly pointShadow?: PointShadowInspection;
|
|
494
526
|
readonly meshMaterialBindings: readonly MeshMaterialBindingObservation[];
|
|
527
|
+
/** Final-submit Standard IBL binding-chain receipt, when diagnostics ran. */
|
|
528
|
+
readonly iblBinding?: IblBindingInspection;
|
|
495
529
|
readonly perFramePassNames: readonly string[];
|
|
496
530
|
readonly bindGroupCounts: {
|
|
497
531
|
readonly createBindGroup: number;
|
|
498
532
|
readonly keys: readonly string[];
|
|
499
533
|
};
|
|
534
|
+
/**
|
|
535
|
+
* Recovery evidence projected from production owners. Graph, residency,
|
|
536
|
+
* submit, and receipt fields are observations, not recovery test fixtures.
|
|
537
|
+
*/
|
|
538
|
+
readonly recoveryEvidence: {
|
|
539
|
+
readonly producerRoots: readonly {
|
|
540
|
+
readonly kind: string;
|
|
541
|
+
readonly owner: string;
|
|
542
|
+
readonly candidateScope: 'device-scope';
|
|
543
|
+
readonly visibility: 'visible-workset' | 'non-visible-lazy';
|
|
544
|
+
readonly disabledWork: 'zero' | 'lazy';
|
|
545
|
+
}[];
|
|
546
|
+
readonly graph: {
|
|
547
|
+
readonly ready: boolean;
|
|
548
|
+
readonly generation: number;
|
|
549
|
+
readonly passCount: number;
|
|
550
|
+
readonly resourceCount: number;
|
|
551
|
+
};
|
|
552
|
+
readonly residency: { readonly meshResidencyEpoch: number };
|
|
553
|
+
readonly submissions: {
|
|
554
|
+
readonly count: number;
|
|
555
|
+
readonly lastGeneration: number | undefined;
|
|
556
|
+
};
|
|
557
|
+
readonly receipts: {
|
|
558
|
+
readonly count: number;
|
|
559
|
+
readonly lastGeneration: number | undefined;
|
|
560
|
+
};
|
|
561
|
+
};
|
|
500
562
|
/** Output transform facts; never includes fixture metrics or pixel bytes. */
|
|
501
563
|
readonly outputTransform?: typeof STANDARD_OUTPUT_TRANSFORM_FEATURE_ID;
|
|
502
564
|
readonly displayEncoded: boolean;
|