@carbonenginejs/runtime-resource 0.11.1 → 0.12.1
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/dist/CjsResMan.js +4 -4
- package/dist/CjsResMan.js.map +1 -1
- package/dist/_virtual/_rollupPluginBabelHelpers.js +1 -4
- package/dist/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/dist/format/CjsByteReader.js +310 -0
- package/dist/format/CjsByteReader.js.map +1 -0
- package/dist/format/CjsByteWriter.js +242 -0
- package/dist/format/CjsByteWriter.js.map +1 -0
- package/dist/format/CjsFormatError.js +41 -0
- package/dist/format/CjsFormatError.js.map +1 -0
- package/dist/format/CjsStringTable.js +268 -0
- package/dist/format/CjsStringTable.js.map +1 -0
- package/dist/format/carbonEffect/CjsCarbonEffectReader.js +361 -0
- package/dist/format/carbonEffect/CjsCarbonEffectReader.js.map +1 -0
- package/dist/format/carbonEffect/CjsCarbonEffectWriter.js +373 -0
- package/dist/format/carbonEffect/CjsCarbonEffectWriter.js.map +1 -0
- package/dist/format/carbonEffect/carbonDescriptionFromPortable.js +372 -0
- package/dist/format/carbonEffect/carbonDescriptionFromPortable.js.map +1 -0
- package/dist/format/carbonEffect/carbonEffectBackendBlock.js +427 -0
- package/dist/format/carbonEffect/carbonEffectBackendBlock.js.map +1 -0
- package/dist/format/carbonEffect/carbonEffectRecords.js +955 -0
- package/dist/format/carbonEffect/carbonEffectRecords.js.map +1 -0
- package/dist/format/compareUtf8.js +36 -0
- package/dist/format/compareUtf8.js.map +1 -0
- package/dist/format/index.js +11 -0
- package/dist/format/index.js.map +1 -0
- package/dist/formats/bnk/CjsBnkFormat.js +18 -2
- package/dist/formats/bnk/CjsBnkFormat.js.map +1 -1
- package/dist/formats/bnk/core/eventAction.js +305 -0
- package/dist/formats/bnk/core/eventAction.js.map +1 -0
- package/dist/formats/bnk/core/graph.js +3 -6
- package/dist/formats/bnk/core/graph.js.map +1 -1
- package/dist/formats/bnk/core/helpers.js +62 -11
- package/dist/formats/bnk/core/helpers.js.map +1 -1
- package/dist/formats/bnk/core/nodeBase.js +532 -0
- package/dist/formats/bnk/core/nodeBase.js.map +1 -0
- package/dist/formats/bnk/core/sfxNodes.js +632 -0
- package/dist/formats/bnk/core/sfxNodes.js.map +1 -0
- package/dist/formats/bnk/core/soundbanksInfo.js +59 -51
- package/dist/formats/bnk/core/soundbanksInfo.js.map +1 -1
- package/dist/formats/gr2/CjsGr2Format.js +256 -13
- package/dist/formats/gr2/CjsGr2Format.js.map +1 -1
- package/dist/formats/gr2/core/helpers.js +15 -15
- package/dist/formats/gr2/core/helpers.js.map +1 -1
- package/dist/formats/gr2/core/json.js +1 -1
- package/dist/formats/gr2/core/json.js.map +1 -1
- package/dist/formats/gr2/core/targets.js +1 -1
- package/dist/formats/gr2/core/targets.js.map +1 -1
- package/dist/formats/gr2/index.js +0 -1
- package/dist/formats/gr2/index.js.map +1 -1
- package/dist/formats/hlsl/core/HlslReader.js +7 -257
- package/dist/formats/hlsl/core/HlslReader.js.map +1 -1
- package/dist/formats/hlsl/core/analysis.js +1 -1
- package/dist/formats/hlsl/core/carbonDescriptionToRuntime.js +781 -0
- package/dist/formats/hlsl/core/carbonDescriptionToRuntime.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/resources/HlslEffectRes.js +21 -1
- package/dist/formats/hlsl/core/tr2/resources/HlslEffectRes.js.map +1 -1
- package/dist/formats/hlsl/index.js +1 -0
- package/dist/formats/hlsl/index.js.map +1 -1
- package/dist/formats/index.js +3 -6
- package/dist/formats/index.js.map +1 -1
- package/dist/formats/webgl/core/cewg/CewgPackage.js +2 -1
- package/dist/formats/webgl/core/cewg/CewgPackage.js.map +1 -1
- package/dist/formats/webgl/core/cewg/binary.js +11 -93
- package/dist/formats/webgl/core/cewg/binary.js.map +1 -1
- package/dist/formats/webgl/core/effectPackage.js +4 -1
- package/dist/formats/webgl/core/effectPackage.js.map +1 -1
- package/dist/formats/webgl/core/errors.js +3 -3
- package/dist/formats/webgl/core/errors.js.map +1 -1
- package/dist/formats/webgpu/CjsWebgpuFormat.js +4 -23
- package/dist/formats/webgpu/CjsWebgpuFormat.js.map +1 -1
- package/dist/formats/webgpu/core/buildCarbonEffectContainer.js +197 -0
- package/dist/formats/webgpu/core/buildCarbonEffectContainer.js.map +1 -0
- package/dist/formats/webgpu/core/cewgpu/CewgpuContainer.js +368 -0
- package/dist/formats/webgpu/core/cewgpu/CewgpuContainer.js.map +1 -0
- package/dist/formats/webgpu/core/cewgpu/containerViews.js +355 -0
- package/dist/formats/webgpu/core/cewgpu/containerViews.js.map +1 -0
- package/dist/formats/webgpu/core/cewgpu/validateContainer.js +90 -0
- package/dist/formats/webgpu/core/cewgpu/validateContainer.js.map +1 -0
- package/dist/formats/webgpu/core/effectBackendBodySet.js +21 -20
- package/dist/formats/webgpu/core/effectBackendBodySet.js.map +1 -1
- package/dist/formats/webgpu/core/helpers.js +87 -92
- package/dist/formats/webgpu/core/helpers.js.map +1 -1
- package/dist/formats/webgpu/core/ir/analyzeRegisterValues.js +14 -13
- package/dist/formats/webgpu/core/ir/analyzeRegisterValues.js.map +1 -1
- package/dist/formats/webgpu/core/ir/inferValueTypes.js +10 -8
- package/dist/formats/webgpu/core/ir/inferValueTypes.js.map +1 -1
- package/dist/formats/webgpu/core/packageEffect.js +94 -9
- package/dist/formats/webgpu/core/packageEffect.js.map +1 -1
- package/dist/formats/webgpu/core/packageMetadata.js +10 -1
- package/dist/formats/webgpu/core/packageMetadata.js.map +1 -1
- package/dist/formats/webgpu/core/wgsl/buildResourceTransformPlan.js +17 -15
- package/dist/formats/webgpu/core/wgsl/buildResourceTransformPlan.js.map +1 -1
- package/dist/formats/webgpu/core/wgsl/buildWgslBindingPlan.js +13 -12
- package/dist/formats/webgpu/core/wgsl/buildWgslBindingPlan.js.map +1 -1
- package/dist/formats/webgpu/core/wgsl/buildWgslSet.js +9 -8
- package/dist/formats/webgpu/core/wgsl/buildWgslSet.js.map +1 -1
- package/dist/formats/webgpu/core/wgsl/lowerComputeProgram.js +23 -22
- package/dist/formats/webgpu/core/wgsl/lowerComputeProgram.js.map +1 -1
- package/dist/formats/webgpu/core/wgsl/selectionPlans.js +46 -44
- package/dist/formats/webgpu/core/wgsl/selectionPlans.js.map +1 -1
- package/dist/resource/CjsResource.js +700 -684
- package/dist/resource/CjsResource.js.map +1 -1
- package/dist/resource/Tr2LightProfileRes.js +18 -27
- package/dist/resource/Tr2LightProfileRes.js.map +1 -1
- package/dist/resource/audio/CjsAudioBufferRes.js +2 -2
- package/dist/resource/audio/CjsAudioBufferRes.js.map +1 -1
- package/dist/resource/audio/CjsAudioRes.js +2 -2
- package/dist/resource/audio/CjsAudioRes.js.map +1 -1
- package/dist/resource/geometry/TriGeometryRes.js +605 -586
- package/dist/resource/geometry/TriGeometryRes.js.map +1 -1
- package/dist/resource/geometry/granny/Tr2GrannyStateRes.js +21 -30
- package/dist/resource/geometry/granny/Tr2GrannyStateRes.js.map +1 -1
- package/dist/resource/geometry/granny/TriGrannyRes.js +21 -30
- package/dist/resource/geometry/granny/TriGrannyRes.js.map +1 -1
- package/dist/resource/shader/Tr2EffectRes.js +9 -7
- package/dist/resource/shader/Tr2EffectRes.js.map +1 -1
- package/dist/resource/shader/Tr2MaterialArea.js +5 -3
- package/dist/resource/shader/Tr2MaterialArea.js.map +1 -1
- package/dist/resource/shader/Tr2MaterialMesh.js +4 -2
- package/dist/resource/shader/Tr2MaterialMesh.js.map +1 -1
- package/dist/resource/shader/Tr2MaterialRes.js +5 -3
- package/dist/resource/shader/Tr2MaterialRes.js.map +1 -1
- package/dist/resource/shader/Tr2Shader.js +26 -21
- package/dist/resource/shader/Tr2Shader.js.map +1 -1
- package/dist/resource/shader/Tr2ShaderPermutation.js +8 -6
- package/dist/resource/shader/Tr2ShaderPermutation.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectDefine.js +5 -3
- package/dist/resource/shader/reflection/Tr2EffectDefine.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectDescription.js +5 -3
- package/dist/resource/shader/reflection/Tr2EffectDescription.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js +17 -15
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js +11 -9
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectResource.js +8 -6
- package/dist/resource/shader/reflection/Tr2EffectResource.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js +15 -13
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js +7 -5
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2Pass.js +11 -9
- package/dist/resource/shader/reflection/Tr2Pass.js.map +1 -1
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js +8 -6
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js.map +1 -1
- package/dist/resource/texture/CjsTextureArrayRes.js +400 -411
- package/dist/resource/texture/CjsTextureArrayRes.js.map +1 -1
- package/dist/resource/texture/Tr2ImageRes.js +99 -95
- package/dist/resource/texture/Tr2ImageRes.js.map +1 -1
- package/dist/resource/texture/TriTextureRes.js +312 -273
- package/dist/resource/texture/TriTextureRes.js.map +1 -1
- package/docs/README.md +13 -1
- package/docs/architecture.md +3 -3
- package/docs/concepts/resource-lifecycle.md +9 -2
- package/docs/concepts/shader-resource-model.md +114 -0
- package/docs/concepts/writing-an-engine-adapter.md +115 -0
- package/docs/formats/README.md +24 -1
- package/docs/formats/carbon-effect-container.md +452 -0
- package/docs/formats/dxbc/README.md +68 -0
- package/docs/formats/dxbc/architecture.md +80 -0
- package/docs/formats/dxbc/reference/api.md +77 -0
- package/docs/formats/dxbc/reference/classes/README.md +9 -0
- package/docs/formats/dxbc/reference/decoded-output.md +122 -0
- package/docs/formats/gr2.md +3 -4
- package/docs/formats/hlsl/README.md +54 -0
- package/docs/formats/hlsl/architecture.md +67 -0
- package/docs/formats/hlsl/guides/hydrating-json-output.md +62 -0
- package/docs/formats/hlsl/guides/reading-effects.md +64 -0
- package/docs/formats/hlsl/reference/advanced-analysis.md +66 -0
- package/docs/formats/hlsl/reference/api.md +98 -0
- package/docs/formats/hlsl/reference/classes/README.md +11 -0
- package/docs/formats/hlsl/reference/json-graph.md +100 -0
- package/docs/formats/hlsl/reference/portable-reflection.md +141 -0
- package/docs/formats/provenance.md +32 -17
- package/docs/formats/webgl/README.md +57 -0
- package/docs/formats/webgl/architecture.md +70 -0
- package/docs/formats/webgl/carbon-constant-layouts.md +326 -0
- package/docs/formats/webgl/decl-io.md +1234 -0
- package/docs/formats/webgl/effect-reflection.md +127 -0
- package/docs/formats/webgl/memory-structured.md +871 -0
- package/docs/formats/webgl/reference/classes/README.md +9 -0
- package/docs/formats/webgl/texture-sample.md +964 -0
- package/docs/formats/webgpu/README.md +84 -0
- package/docs/formats/webgpu/architecture.md +96 -0
- package/docs/formats/webgpu/formats/cewgpu.md +216 -0
- package/docs/formats/webgpu/guides/effect-packaging.md +191 -0
- package/docs/formats/webgpu/reference/api.md +197 -0
- package/docs/formats/webgpu/reference/classes/README.md +9 -0
- package/docs/formats/webgpu/reference/wgsl-compatibility.md +1543 -0
- package/docs/formats/wwise.md +45 -4
- package/docs/reference/classes/core.md +80 -0
- package/docs/reference/classes/formats.md +24 -34
- package/docs/reference/events.md +25 -0
- package/docs/reference/motherlode-cache.md +22 -8
- package/docs/reference/workers.md +5 -5
- package/docs/roadmap.md +61 -41
- package/format-notices/bnk/NOTICE +5 -4
- package/format-notices/webgl/NOTICE +1 -1
- package/package.json +2 -1
- package/dist/formats/gr2/core/CjsFormatGr2.js +0 -273
- package/dist/formats/gr2/core/CjsFormatGr2.js.map +0 -1
- package/dist/formats/webgpu/core/cewgpu/CewgpuPackage.js +0 -415
- package/dist/formats/webgpu/core/cewgpu/CewgpuPackage.js.map +0 -1
- package/dist/formats/webgpu/core/cewgpu/CewgpuPackageBuilder.js +0 -100
- package/dist/formats/webgpu/core/cewgpu/CewgpuPackageBuilder.js.map +0 -1
- package/dist/formats/webgpu/core/cewgpu/binary.js +0 -93
- package/dist/formats/webgpu/core/cewgpu/binary.js.map +0 -1
- package/dist/formats/webgpu/core/cewgpu/tags.js +0 -17
- package/dist/formats/webgpu/core/cewgpu/tags.js.map +0 -1
- package/dist/formats/webgpu/core/effectPackageValidation.js +0 -1078
- package/dist/formats/webgpu/core/effectPackageValidation.js.map +0 -1
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Public API reference
|
|
2
|
+
|
|
3
|
+
Status: Evolving
|
|
4
|
+
Scope: `@carbonenginejs/runtime-resource/formats/webgpu`
|
|
5
|
+
Audience: Shader-tool authors and engine integrators
|
|
6
|
+
Summary: Lists the public WebGPU format profile, byte-oriented helpers, options, and output contracts.
|
|
7
|
+
|
|
8
|
+
## Import
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
import CjsWebgpuFormat, {
|
|
12
|
+
CjsWebgpuFormat as WebgpuFormat
|
|
13
|
+
} from "@carbonenginejs/runtime-resource/formats/webgpu";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The default and named exports refer to the same class.
|
|
17
|
+
|
|
18
|
+
## Reusable profile
|
|
19
|
+
|
|
20
|
+
Construct a profile when several operations share output, source, schema, or
|
|
21
|
+
class-registration options. `permutation` is also reusable by `AnalyzeEffect`
|
|
22
|
+
and `BuildEffect`; current `Read` and `Inspect` derive the translated body or
|
|
23
|
+
Carbon defaults and do not consume that profile field:
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
const reader = new WebgpuFormat({
|
|
27
|
+
emit: "json",
|
|
28
|
+
source: "res:/graphics/effect.webgpu/example.sm_hi",
|
|
29
|
+
decodeInstructions: true,
|
|
30
|
+
permutation: null
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
| Instance method | Purpose |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| `SetValues(options)` | Merges reusable profile defaults. |
|
|
37
|
+
| `GetValues(options?)` | Returns effective values with optional overrides. |
|
|
38
|
+
| `SetClasses(classes)` | Registers several package-shape constructors. |
|
|
39
|
+
| `SetClass(type, Class)` | Registers or removes one constructor. |
|
|
40
|
+
| `GetClass(type)` | Returns one registered constructor. |
|
|
41
|
+
| `HasClass(type)` | Reports whether a constructor is registered. |
|
|
42
|
+
| `Read(bytes, options?)` | Reads Carbon-record CEWGPU bytes. |
|
|
43
|
+
| `Inspect(bytes, options?)` | Returns a compact container summary. |
|
|
44
|
+
| `AnalyzeEffect(bytes, options?)` | Analyzes compiled-effect bytes without packaging. |
|
|
45
|
+
| `BuildEffect(bytes, options?)` | Translates a version-15 effect to CEWGPU bytes. |
|
|
46
|
+
| `BuildShaderIr(input, options?)` | Builds validated shader IR from DXBC or decoded input. |
|
|
47
|
+
| `BuildWgsl(input, options?)` | Emits supported shader IR as WGSL. |
|
|
48
|
+
| `BuildWgslBindingPlan(programs, options?)` | Allocates one binding layout across a pass. |
|
|
49
|
+
| `BuildWgslSet(entries)` | Assembles emitted shaders and pass layouts. |
|
|
50
|
+
| `ToJSON(value)` | Converts format output to JSON-compatible data. |
|
|
51
|
+
|
|
52
|
+
There is no `Build(chunks)` method. The current wire is a Carbon record tree,
|
|
53
|
+
not a generic chunk container.
|
|
54
|
+
|
|
55
|
+
## Static helpers
|
|
56
|
+
|
|
57
|
+
| Static helper | Purpose |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| `isCewgpu(bytes)` | Reports whether bytes have the Carbon-v15 shape. |
|
|
60
|
+
| `read(bytes, options?)` | Reads one container. |
|
|
61
|
+
| `inspect(bytes, options?)` | Inspects one container. |
|
|
62
|
+
| `analyzeEffect(bytes, options?)` | Analyzes one compiled effect. |
|
|
63
|
+
| `buildEffect(bytes, options?)` | Builds CEWGPU bytes from a version-15 effect. |
|
|
64
|
+
| `buildShaderIr(input, options?)` | Builds shader IR. |
|
|
65
|
+
| `buildWgsl(input, options?)` | Emits WGSL. |
|
|
66
|
+
| `buildWgslBindingPlan(programs, options?)` | Allocates a pass binding plan. |
|
|
67
|
+
| `buildWgslSet(entries)` | Builds a portable WGSL set. |
|
|
68
|
+
| `toJSON(value)` | Converts output to JSON-compatible data. |
|
|
69
|
+
|
|
70
|
+
`isCewgpu` checks the first dword for Carbon version 15. CEWGPU has no private
|
|
71
|
+
magic or payload tag, so this is a shape check rather than backend identity.
|
|
72
|
+
Callers establish identity through the resource path that supplied the bytes.
|
|
73
|
+
|
|
74
|
+
## Profile options
|
|
75
|
+
|
|
76
|
+
| Option | Meaning |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| `emit` | `"json"` by default or `"raw"` for the internal container reader. |
|
|
79
|
+
| `source` | Caller-owned diagnostic label; it is never opened. |
|
|
80
|
+
| `decodeInstructions` | Includes decoded instruction and IR detail during analysis. |
|
|
81
|
+
| `permutation` | Exact `NAME=VALUE` assertions for `AnalyzeEffect` and `BuildEffect`; ignored by current `Read` and `Inspect`. |
|
|
82
|
+
| `schema` | Optional caller schema record retained by the profile. |
|
|
83
|
+
| `classes` | Optional constructor registrations keyed by `CLASS_KEYS`. |
|
|
84
|
+
|
|
85
|
+
Class registrations are validated and stored for forward compatibility.
|
|
86
|
+
Current JSON reads return plain data rather than hydrated package classes.
|
|
87
|
+
|
|
88
|
+
Raw output is an internal reader over the same bytes. It is not a second wire
|
|
89
|
+
format and should not be persisted.
|
|
90
|
+
|
|
91
|
+
## Read result
|
|
92
|
+
|
|
93
|
+
JSON `Read` returns:
|
|
94
|
+
|
|
95
|
+
- `format`, Carbon `version`, and `sourcePath`;
|
|
96
|
+
- derived `info` and `metadata`;
|
|
97
|
+
- the complete derived `permutationGraph`;
|
|
98
|
+
- derived `analysis`, `wgsl`, and `backendBodySet`;
|
|
99
|
+
- convenience `stages`, `shaders`, and `layouts` arrays.
|
|
100
|
+
|
|
101
|
+
These records are computed from the Carbon header, descriptions, WGSL program
|
|
102
|
+
slots, and backend blocks. They are not stored chunks. The old `chunks` field
|
|
103
|
+
is intentionally absent.
|
|
104
|
+
|
|
105
|
+
`Inspect` reports the source label, Carbon version, compiler-version bytes,
|
|
106
|
+
permutation count, distinct-body count, and resolved stage/shader/layout
|
|
107
|
+
counts.
|
|
108
|
+
|
|
109
|
+
## Effect analysis
|
|
110
|
+
|
|
111
|
+
`AnalyzeEffect` accepts supported compiled-effect versions for diagnostic
|
|
112
|
+
analysis. It resolves exact permutation assertions and may include decoded
|
|
113
|
+
DXBC instructions and compiler IR.
|
|
114
|
+
|
|
115
|
+
`BuildEffect` is narrower: current packaging requires the version-15 record
|
|
116
|
+
layout. The wire retains every permutation row and non-program description
|
|
117
|
+
field that the mapping can represent; non-dynamic sampler names are
|
|
118
|
+
unrecoverable and stage order is canonicalized. Source-stage DXBC and the
|
|
119
|
+
caller's source hash are not retained in the wire. The build result retains
|
|
120
|
+
full portable source reflection, including source program bytes. Compiler IR
|
|
121
|
+
is transient and is neither stored in the wire nor returned by `BuildEffect`.
|
|
122
|
+
|
|
123
|
+
Unknown, duplicate, or unresolved permutation assertions fail closed.
|
|
124
|
+
|
|
125
|
+
## Effect-package options
|
|
126
|
+
|
|
127
|
+
`mode: "selected"` is the default. It translates the resolved body's
|
|
128
|
+
requested complete passes while keeping every permutation row and
|
|
129
|
+
representable non-program description fields in the container.
|
|
130
|
+
|
|
131
|
+
`mode: "all"` first lowers the resolved selection, so an unsupported resolved
|
|
132
|
+
body aborts the build. After that gate succeeds, unsupported later bodies
|
|
133
|
+
remain in the container with empty program slots and appear as unsupported in
|
|
134
|
+
the in-memory body-set view. `allPermutations: true` is a compatibility
|
|
135
|
+
spelling for all mode.
|
|
136
|
+
|
|
137
|
+
`selection` can name a technique, pass index, and complete stage list.
|
|
138
|
+
`bindingPolicy.sharedIdentities` may name compatible cross-stage resources
|
|
139
|
+
that are allowed to share one physical binding.
|
|
140
|
+
|
|
141
|
+
`source` remains a diagnostic label. `sourceIdentity` and `outputPath` are
|
|
142
|
+
returned build provenance; the wire's backend identity still comes from the
|
|
143
|
+
consumer's resource path.
|
|
144
|
+
|
|
145
|
+
## Build result and qualification
|
|
146
|
+
|
|
147
|
+
`BuildEffect` returns:
|
|
148
|
+
|
|
149
|
+
- `bytes`;
|
|
150
|
+
- build-time `info` and `metadata`;
|
|
151
|
+
- `permutationGraph`, portable `reflection`, and `reflectionBlobs`;
|
|
152
|
+
- selected `analysis` and `wgsl`;
|
|
153
|
+
- `backendBodySet` for all mode;
|
|
154
|
+
- an `inspection` obtained by rereading the emitted bytes; and
|
|
155
|
+
- `qualification`.
|
|
156
|
+
|
|
157
|
+
The richer fields are caller evidence and are not separately stored in the
|
|
158
|
+
container.
|
|
159
|
+
|
|
160
|
+
`qualification.packageValid` reports structural construction. It does not
|
|
161
|
+
claim that every body translated, that a pipeline was prepared, or that a
|
|
162
|
+
draw succeeded. `backendComplete` and `runtimeComplete` retain those broader
|
|
163
|
+
boundaries.
|
|
164
|
+
|
|
165
|
+
## Binding-plan and WGSL-set helpers
|
|
166
|
+
|
|
167
|
+
`BuildWgslBindingPlan` takes the complete program set for one pass.
|
|
168
|
+
Unshared D3D tuples receive stage-qualified `scopeIdentity` values. A tuple is
|
|
169
|
+
shared only when its base identity appears in `sharedIdentities` and the
|
|
170
|
+
declarations are compatible.
|
|
171
|
+
|
|
172
|
+
`BuildWgslSet` validates shader keys, layouts, numeric slots, and resource
|
|
173
|
+
transforms. Ordinary sets use version 2. A proven physical-resource
|
|
174
|
+
coalescing uses version 3 and carries an explicit transform recipe.
|
|
175
|
+
|
|
176
|
+
## Static metadata
|
|
177
|
+
|
|
178
|
+
The class exposes `OUTPUT_JSON`, `OUTPUT_RAW`, `CLASS_KEYS`, `type`,
|
|
179
|
+
`mediaTypes`, `inputTypes`, `outputTypes`, `debugOutputTypes`,
|
|
180
|
+
`implementationStatus`, `format`, `analysisFormat`, and `packageVersion`.
|
|
181
|
+
|
|
182
|
+
## Errors
|
|
183
|
+
|
|
184
|
+
Reads fail closed on malformed Carbon records, sparse or misordered
|
|
185
|
+
permutation tables, out-of-range arena references, trailing record bytes, or a
|
|
186
|
+
program-bearing stage WebGPU cannot express.
|
|
187
|
+
|
|
188
|
+
Builds additionally fail on unsupported source versions, invalid selection,
|
|
189
|
+
unsupported compiler semantics, ambiguous binding plans, non-`main` entry
|
|
190
|
+
points, and malformed backend blocks.
|
|
191
|
+
|
|
192
|
+
## Related documentation
|
|
193
|
+
|
|
194
|
+
- [Effect packaging guide](../guides/effect-packaging.md)
|
|
195
|
+
- [CEWGPU effect container](../formats/cewgpu.md)
|
|
196
|
+
- [WGSL compatibility](wgsl-compatibility.md)
|
|
197
|
+
- [Class-purpose catalog](classes/README.md)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# WebGPU class catalog
|
|
2
|
+
|
|
3
|
+
Status: Deprecated
|
|
4
|
+
Scope: `@carbonenginejs/runtime-resource/formats/webgpu` maintained classes
|
|
5
|
+
Audience: Users, maintainers, and automated readers
|
|
6
|
+
Summary: Points to the canonical package-wide class catalog after format-package consolidation.
|
|
7
|
+
|
|
8
|
+
The maintained WebGPU entries now live in the
|
|
9
|
+
[package-wide formats class catalog](../../../../reference/classes/formats.md#webgpu).
|