@carbonenginejs/runtime-resource 0.13.0 → 0.14.0
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/LICENSE +21 -21
- package/NOTICE +32 -32
- package/README.md +129 -129
- package/dist/CjsMotherLode.js +1271 -1271
- package/dist/CjsResMan.js +3858 -3858
- package/dist/CjsResManFetchProvider.js +94 -94
- package/dist/CjsResManWorkQueue.js +301 -301
- package/dist/_virtual/_rollupPluginBabelHelpers.js +150 -150
- package/dist/format/CjsBlueReader.js +358 -358
- package/dist/format/CjsByteReader.js +310 -310
- package/dist/format/CjsByteWriter.js +242 -242
- package/dist/format/CjsFormat.js +223 -223
- package/dist/format/CjsFormatError.js +41 -41
- package/dist/format/CjsReader.js +22 -22
- package/dist/format/CjsResourceProbe.js +279 -279
- package/dist/format/CjsStringTable.js +268 -268
- package/dist/format/carbonEffect/CjsCarbonEffectReader.js +265 -265
- package/dist/format/carbonEffect/CjsCarbonEffectWriter.js +373 -373
- package/dist/format/carbonEffect/buildCarbonEffectContainer.js +182 -182
- package/dist/format/carbonEffect/carbonEffectBackendBlock.js +321 -321
- package/dist/format/carbonEffect/carbonEffectRecords.js +1147 -1147
- package/dist/format/carbonEffect/carbonEffectResourceTransform.js +197 -197
- package/dist/format/compareUtf8.js +36 -36
- package/dist/format/effect/effectBodyInventory.js +146 -146
- package/dist/format/effect/effectPermutationGraph.js +257 -257
- package/dist/format/effect/sha256.js +114 -114
- package/dist/format/index.js +11 -11
- package/dist/format/payloadContract.js +193 -193
- package/dist/formats/black/CjsBlackFormat.js +310 -310
- package/dist/formats/black/core/CjsBlackBinaryReader.js +260 -260
- package/dist/formats/black/core/CjsBlackPropertyReaders.js +448 -448
- package/dist/formats/black/core/CjsBlackReader.js +764 -764
- package/dist/formats/black/core/CjsBlackSchemaRegistry.js +540 -540
- package/dist/formats/black/core/black-schema-v1-2026-07-23.json.js +4 -4
- package/dist/formats/black/core/blackConstants.js +7 -7
- package/dist/formats/black/core/blackDefinitions.js +10 -10
- package/dist/formats/black/core/blackEnums.js +6 -6
- package/dist/formats/black/core/blackSchema.js +3 -3
- package/dist/formats/black/core/blackVersion.js +22 -22
- package/dist/formats/black/core/helpers.js +199 -199
- package/dist/formats/black/core/schema.js +4 -4
- package/dist/formats/black/index.js +2 -2
- package/dist/formats/bnk/CjsBnkFormat.js +175 -175
- package/dist/formats/bnk/core/busNodes.js +252 -252
- package/dist/formats/bnk/core/effectNodes.js +147 -147
- package/dist/formats/bnk/core/eventAction.js +416 -416
- package/dist/formats/bnk/core/globalSettings.js +215 -215
- package/dist/formats/bnk/core/graph.js +137 -137
- package/dist/formats/bnk/core/helpers.js +512 -512
- package/dist/formats/bnk/core/musicNodes.js +540 -540
- package/dist/formats/bnk/core/nodeBase.js +553 -553
- package/dist/formats/bnk/core/sfxNodes.js +632 -632
- package/dist/formats/bnk/core/soundbanksInfo.js +209 -209
- package/dist/formats/bnk/index.js +2 -2
- package/dist/formats/cmf/CjsCmfFormat.js +497 -497
- package/dist/formats/cmf/core/binary.js +194 -194
- package/dist/formats/cmf/core/buffers.js +237 -237
- package/dist/formats/cmf/core/constants.js +47 -47
- package/dist/formats/cmf/core/gr2Anim.js +453 -453
- package/dist/formats/cmf/core/helpers.js +318 -318
- package/dist/formats/cmf/core/pack.js +276 -276
- package/dist/formats/cmf/core/schema.js +374 -374
- package/dist/formats/cmf/core/shared.js +277 -277
- package/dist/formats/cmf/core/writer.js +571 -571
- package/dist/formats/cmf/index.js +2 -2
- package/dist/formats/dds/CjsDdsFormat.js +200 -200
- package/dist/formats/dds/core/bc6h.js +298 -298
- package/dist/formats/dds/core/bc7.js +272 -272
- package/dist/formats/dds/core/helpers.js +901 -862
- package/dist/formats/dds/core/helpers.js.map +1 -1
- package/dist/formats/dds/index.js +2 -2
- package/dist/formats/dxbc/CjsDxbcFormat.js +187 -142
- package/dist/formats/dxbc/CjsDxbcFormat.js.map +1 -1
- package/dist/formats/dxbc/core/DxbcReader.js +266 -266
- package/dist/formats/dxbc/core/container.js +169 -169
- package/dist/formats/dxbc/core/decoder.js +789 -789
- package/dist/formats/dxbc/core/disassemble.js +240 -0
- package/dist/formats/dxbc/core/disassemble.js.map +1 -0
- package/dist/formats/dxbc/core/errors.js +19 -19
- package/dist/formats/dxbc/core/helpers.js +220 -220
- package/dist/formats/dxbc/core/opcodes.js +45 -45
- package/dist/formats/dxbc/core/program.js +91 -91
- package/dist/formats/dxbc/core/signature.js +172 -172
- package/dist/formats/dxbc/index.js +2 -2
- package/dist/formats/fbx/CjsFbxFormat.js +266 -266
- package/dist/formats/fbx/core/helpers.js +3932 -3932
- package/dist/formats/fbx/index.js +2 -2
- package/dist/formats/flac/CjsFlacFormat.js +142 -142
- package/dist/formats/flac/core/helpers.js +315 -315
- package/dist/formats/flac/index.js +2 -2
- package/dist/formats/gif/CjsGifFormat.js +141 -141
- package/dist/formats/gif/core/helpers.js +380 -380
- package/dist/formats/gif/index.js +2 -2
- package/dist/formats/gltf/CjsGltfFormat.js +252 -290
- package/dist/formats/gltf/CjsGltfFormat.js.map +1 -1
- package/dist/formats/gltf/core/helpers.js +287 -307
- package/dist/formats/gltf/core/helpers.js.map +1 -1
- package/dist/formats/gltf/core/json.js +79 -79
- package/dist/formats/gltf/core/parser.js +679 -679
- package/dist/formats/gltf/core/targets.js +173 -173
- package/dist/formats/gltf/index.js +2 -2
- package/dist/formats/gr2/CjsGr2Format.js +289 -289
- package/dist/formats/gr2/core/bitknit2.js +282 -282
- package/dist/formats/gr2/core/curves.js +1047 -1047
- package/dist/formats/gr2/core/gsf.js +72 -72
- package/dist/formats/gr2/core/helpers.js +352 -352
- package/dist/formats/gr2/core/json.js +622 -622
- package/dist/formats/gr2/core/oodle1.js +388 -388
- package/dist/formats/gr2/core/tangents.js +48 -48
- package/dist/formats/gr2/core/targets.js +361 -361
- package/dist/formats/gr2/index.js +2 -2
- package/dist/formats/hlsl/CjsHlslFormat.js +233 -254
- package/dist/formats/hlsl/CjsHlslFormat.js.map +1 -1
- package/dist/formats/hlsl/core/HlslBinaryUtils.js +15 -15
- package/dist/formats/hlsl/core/HlslEffectReadError.js +19 -19
- package/dist/formats/hlsl/core/HlslEffectStateManager.js +130 -130
- package/dist/formats/hlsl/core/HlslRenderStateSetup.js +37 -37
- package/dist/formats/hlsl/core/HlslResourceSetDescription.js +94 -94
- package/dist/formats/hlsl/core/HlslShaderBytecode.js +44 -44
- package/dist/formats/hlsl/core/analysis.js +51 -51
- package/dist/formats/hlsl/core/carbonDescriptionToRuntime.js +850 -850
- package/dist/formats/hlsl/core/detailMapFamily.js +128 -128
- package/dist/formats/hlsl/core/helpers.js +270 -270
- package/dist/formats/hlsl/core/json.js +284 -284
- package/dist/formats/hlsl/core/localLightFamily.js +133 -133
- package/dist/formats/hlsl/core/metadata.js +327 -327
- package/dist/formats/hlsl/core/render-states.js +280 -280
- package/dist/formats/hlsl/core/tr2/HlslRenderContextEnum.js +43 -43
- package/dist/formats/hlsl/core/tr2/resources/HlslEffectRes.js +320 -320
- package/dist/formats/hlsl/core/tr2/resources/HlslShaderPermutation.js +33 -33
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js +423 -416
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js.map +1 -1
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectConstant.js +40 -40
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectDescription.js +62 -62
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectLibrary.js +52 -52
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectParameterAnnotation.js +38 -38
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectResource.js +50 -50
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js +86 -86
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectTechnique.js +31 -31
- package/dist/formats/hlsl/core/tr2/shader/HlslPass.js +42 -42
- package/dist/formats/hlsl/core/tr2/shader/HlslSamplerDescription.js +55 -55
- package/dist/formats/hlsl/core/tr2/shader/HlslSamplerSetup.js +29 -29
- package/dist/formats/hlsl/core/tr2/shader/HlslShader.js +220 -220
- package/dist/formats/hlsl/core/tr2/shader/HlslShaderOption.js +30 -30
- package/dist/formats/hlsl/index.js +3 -3
- package/dist/formats/index.js +33 -33
- package/dist/formats/jpeg/CjsJpegFormat.js +212 -212
- package/dist/formats/jpeg/core/helpers.js +402 -402
- package/dist/formats/jpeg/core/jpeg.js +480 -480
- package/dist/formats/jpeg/index.js +2 -2
- package/dist/formats/mp3/CjsMp3Format.js +197 -197
- package/dist/formats/mp3/core/helpers.js +375 -375
- package/dist/formats/mp3/index.js +2 -2
- package/dist/formats/mp4/CjsMp4Format.js +197 -197
- package/dist/formats/mp4/core/helpers.js +484 -484
- package/dist/formats/mp4/index.js +2 -2
- package/dist/formats/obj/CjsObjFormat.js +232 -253
- package/dist/formats/obj/CjsObjFormat.js.map +1 -1
- package/dist/formats/obj/core/helpers.js +553 -573
- package/dist/formats/obj/core/helpers.js.map +1 -1
- package/dist/formats/obj/core/json.js +64 -64
- package/dist/formats/obj/core/parser.js +321 -321
- package/dist/formats/obj/index.js +2 -2
- package/dist/formats/ogg/CjsOggFormat.js +143 -143
- package/dist/formats/ogg/core/helpers.js +410 -410
- package/dist/formats/ogg/core/imdct.js +178 -178
- package/dist/formats/ogg/core/vorbis.js +1017 -1017
- package/dist/formats/ogg/index.js +2 -2
- package/dist/formats/pickle/CjsPickleFormat.js +214 -214
- package/dist/formats/pickle/core/CjsPickleProtocol0Reader.js +551 -551
- package/dist/formats/pickle/index.js +2 -2
- package/dist/formats/png/CjsPngFormat.js +201 -201
- package/dist/formats/png/core/helpers.js +635 -635
- package/dist/formats/png/index.js +2 -2
- package/dist/formats/red/CjsRedFormat.js +263 -263
- package/dist/formats/red/core/CjsRedReader.js +246 -246
- package/dist/formats/red/core/blackDefinitions.js +3 -3
- package/dist/formats/red/core/helpers.js +158 -158
- package/dist/formats/red/core/redGraph.js +71 -71
- package/dist/formats/red/core/schema.js +4 -4
- package/dist/formats/red/index.js +2 -2
- package/dist/formats/stl/CjsStlFormat.js +320 -365
- package/dist/formats/stl/CjsStlFormat.js.map +1 -1
- package/dist/formats/stl/core/helpers.js +241 -261
- package/dist/formats/stl/core/helpers.js.map +1 -1
- package/dist/formats/stl/core/json.js +51 -51
- package/dist/formats/stl/core/stl.js +642 -642
- package/dist/formats/stl/core/targets.js +173 -173
- package/dist/formats/stl/index.js +2 -2
- package/dist/formats/tga/CjsTgaFormat.js +197 -197
- package/dist/formats/tga/core/helpers.js +493 -493
- package/dist/formats/tga/index.js +2 -2
- package/dist/formats/wav/CjsWavFormat.js +198 -198
- package/dist/formats/wav/core/helpers.js +365 -365
- package/dist/formats/wav/index.js +2 -2
- package/dist/formats/webgl/CjsWebglFormat.js +199 -199
- package/dist/formats/webgl/core/buildGlslEffectContainer.js +70 -70
- package/dist/formats/webgl/core/effectPackage.js +900 -900
- package/dist/formats/webgl/core/errors.js +27 -27
- package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js +2820 -2820
- package/dist/formats/webgl/core/glsl/DxbcGlslHelpers.js +89 -89
- package/dist/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js +486 -486
- package/dist/formats/webgl/core/glsl/packedLightFixups.js +98 -98
- package/dist/formats/webgl/core/glslBackendBlock.js +552 -552
- package/dist/formats/webgl/core/glslBackendBodySet.js +243 -243
- package/dist/formats/webgl/core/glslEffectCompleteness.js +85 -85
- package/dist/formats/webgl/core/glslEffectCompleteness.js.map +1 -1
- package/dist/formats/webgl/core/helpers.js +167 -167
- package/dist/formats/webgl/core/inspectGlslEffectContainer.js +122 -122
- package/dist/formats/webgl/core/readGlslEffectContainer.js +202 -256
- package/dist/formats/webgl/core/readGlslEffectContainer.js.map +1 -1
- package/dist/formats/webgl/index.js +2 -2
- package/dist/formats/webgpu/CjsWebgpuFormat.js +357 -357
- package/dist/formats/webgpu/core/buildCarbonEffectContainer.js +89 -89
- package/dist/formats/webgpu/core/carbonWebgpu/CarbonWebgpuContainer.js +354 -354
- package/dist/formats/webgpu/core/carbonWebgpu/containerViews.js +355 -355
- package/dist/formats/webgpu/core/carbonWebgpu/validateContainer.js +90 -90
- package/dist/formats/webgpu/core/effectAnalysis.js +82 -82
- package/dist/formats/webgpu/core/effectBackendBodySet.js +306 -306
- package/dist/formats/webgpu/core/errors.js +20 -20
- package/dist/formats/webgpu/core/helpers.js +443 -443
- package/dist/formats/webgpu/core/ir/analyzeRegisterValues.js +212 -212
- package/dist/formats/webgpu/core/ir/buildControlFlow.js +220 -220
- package/dist/formats/webgpu/core/ir/indexableTemps.js +137 -137
- package/dist/formats/webgpu/core/ir/inferValueTypes.js +449 -449
- package/dist/formats/webgpu/core/ir/lowerDxbcToIr.js +494 -494
- package/dist/formats/webgpu/core/ir/resolveRegisterFlow.js +177 -177
- package/dist/formats/webgpu/core/ir/sourceLanes.js +61 -61
- package/dist/formats/webgpu/core/packageEffect.js +381 -381
- package/dist/formats/webgpu/core/packageEffectSelection.js +164 -164
- package/dist/formats/webgpu/core/packageMetadata.js +17 -17
- package/dist/formats/webgpu/core/schema.js +4 -4
- package/dist/formats/webgpu/core/wgsl/buildResourceTransformPlan.js +263 -263
- package/dist/formats/webgpu/core/wgsl/buildWgslBindingPlan.js +172 -172
- package/dist/formats/webgpu/core/wgsl/buildWgslSet.js +325 -325
- package/dist/formats/webgpu/core/wgsl/emitWgsl.js +356 -356
- package/dist/formats/webgpu/core/wgsl/hoistEscapingValues.js +77 -77
- package/dist/formats/webgpu/core/wgsl/lowerBindingLayout.js +451 -451
- package/dist/formats/webgpu/core/wgsl/lowerComputeProgram.js +735 -735
- package/dist/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js +457 -457
- package/dist/formats/webgpu/core/wgsl/lowerFragmentProgram.js +1572 -1572
- package/dist/formats/webgpu/core/wgsl/lowerMergeHistogramsComputeProgram.js +659 -659
- package/dist/formats/webgpu/core/wgsl/lowerParticleClearComputePrograms.js +734 -734
- package/dist/formats/webgpu/core/wgsl/lowerParticleEmitComputeProgram.js +583 -583
- package/dist/formats/webgpu/core/wgsl/lowerSkinVerticesComputeProgram.js +621 -621
- package/dist/formats/webgpu/core/wgsl/lowerSortComputeProgram.js +824 -824
- package/dist/formats/webgpu/core/wgsl/lowerSortInnerComputeProgram.js +697 -697
- package/dist/formats/webgpu/core/wgsl/lowerSortStepComputeProgram.js +559 -559
- package/dist/formats/webgpu/core/wgsl/lowerVertexProgram.js +1328 -1328
- package/dist/formats/webgpu/core/wgsl/particleEmitSemanticDigest.js +110 -110
- package/dist/formats/webgpu/core/wgsl/precisionControls.js +55 -55
- package/dist/formats/webgpu/core/wgsl/selectionPlans.js +717 -717
- package/dist/formats/webgpu/core/wgsl/uniformity.js +78 -78
- package/dist/formats/webgpu/core/wgsl/validateExactComputeIr.js +196 -196
- package/dist/formats/webgpu/core/wgsl/validateHandleOperand.js +37 -37
- package/dist/formats/webgpu/index.js +2 -2
- package/dist/formats/webm/CjsWebmFormat.js +197 -197
- package/dist/formats/webm/core/helpers.js +572 -572
- package/dist/formats/webm/index.js +2 -2
- package/dist/formats/webp/CjsWebpFormat.js +140 -140
- package/dist/formats/webp/core/helpers.js +237 -237
- package/dist/formats/webp/index.js +2 -2
- package/dist/formats/wem/CjsWemFormat.js +250 -250
- package/dist/formats/wem/core/bitStream.js +261 -261
- package/dist/formats/wem/core/codebookLibrary.js +164 -164
- package/dist/formats/wem/core/helpers.js +437 -437
- package/dist/formats/wem/core/packedCodebooksAotuv603.js +30 -30
- package/dist/formats/wem/core/ptadpcm.js +77 -77
- package/dist/formats/wem/core/resolve.js +121 -121
- package/dist/formats/wem/core/wemToOgg.js +485 -485
- package/dist/formats/wem/index.js +2 -2
- package/dist/formats/yaml/CjsYamlFormat.js +134 -134
- package/dist/formats/yaml/core/CjsYamlReader.js +400 -400
- package/dist/formats/yaml/core/helpers.js +196 -196
- package/dist/formats/yaml/index.js +2 -2
- package/dist/index.js +64 -64
- package/dist/resource/CjsLoadingObject.js +19 -19
- package/dist/resource/CjsResource.js +801 -801
- package/dist/resource/ResourceHandlerMode.js +14 -14
- package/dist/resource/Tr2LightProfileRes.js +32 -32
- package/dist/resource/audio/AudioGeometryResData.js +47 -47
- package/dist/resource/audio/CjsAudioBufferRes.js +86 -86
- package/dist/resource/audio/CjsAudioRes.js +213 -213
- package/dist/resource/audio/index.js +4 -4
- package/dist/resource/geometry/MeshDecalData.js +37 -37
- package/dist/resource/geometry/MeshDecalLodData.js +34 -34
- package/dist/resource/geometry/TriGeometryRes.js +675 -675
- package/dist/resource/geometry/TriGeometryResAreaData.js +59 -59
- package/dist/resource/geometry/TriGeometryResJointData.js +38 -38
- package/dist/resource/geometry/TriGeometryResLodData.js +88 -88
- package/dist/resource/geometry/TriGeometryResMeshData.js +63 -63
- package/dist/resource/geometry/TriGeometryResSkeletonData.js +34 -34
- package/dist/resource/geometry/TriJointBinding.js +38 -38
- package/dist/resource/geometry/TriMorphTargetGeometryConstants.js +46 -46
- package/dist/resource/geometry/TriRtGeometryConstants.js +88 -88
- package/dist/resource/geometry/granny/GStateBindingCallbackData.js +31 -31
- package/dist/resource/geometry/granny/Tr2GrannyIntersectionResult.js +60 -60
- package/dist/resource/geometry/granny/Tr2GrannyStateRes.js +36 -36
- package/dist/resource/geometry/granny/TriGrannyRes.js +35 -35
- package/dist/resource/geometry/granny/enums.js +10 -10
- package/dist/resource/geometry/granny/index.js +6 -6
- package/dist/resource/geometry/index.js +17 -17
- package/dist/resource/index.js +54 -54
- package/dist/resource/resourceBoundary.js +64 -64
- package/dist/resource/shader/Tr2EffectRes.js +336 -336
- package/dist/resource/shader/Tr2MaterialArea.js +31 -31
- package/dist/resource/shader/Tr2MaterialMesh.js +27 -27
- package/dist/resource/shader/Tr2MaterialRes.js +31 -31
- package/dist/resource/shader/Tr2Shader.js +283 -283
- package/dist/resource/shader/Tr2ShaderPermutation.js +43 -43
- package/dist/resource/shader/index.js +17 -17
- package/dist/resource/shader/reflection/Tr2EffectConstant.js +143 -143
- package/dist/resource/shader/reflection/Tr2EffectDefine.js +30 -30
- package/dist/resource/shader/reflection/Tr2EffectDescription.js +114 -114
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js +168 -168
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js +125 -125
- package/dist/resource/shader/reflection/Tr2EffectResource.js +120 -120
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js +372 -372
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js +78 -78
- package/dist/resource/shader/reflection/Tr2Pass.js +168 -168
- package/dist/resource/shader/reflection/carbonRecordFields.js +159 -159
- package/dist/resource/shader/reflection/shaderStage.js +22 -22
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js +135 -135
- package/dist/resource/texture/CjsTextureArrayRes.js +472 -472
- package/dist/resource/texture/CjsTextureArrayResParameterProxy.js +179 -179
- package/dist/resource/texture/Tr2ImageRes.js +120 -120
- package/dist/resource/texture/Tr2TextureLodManager.js +82 -82
- package/dist/resource/texture/Tr2TextureLodUpdateRequest.js +37 -37
- package/dist/resource/texture/Tr2TexturePackChannel.js +37 -37
- package/dist/resource/texture/Tr2TexturePipeline.js +54 -54
- package/dist/resource/texture/Tr2TexturePipelineParams.js +34 -34
- package/dist/resource/texture/Tr2TexturePipelineStepCompress.js +40 -40
- package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js +22 -22
- package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js +34 -34
- package/dist/resource/texture/Tr2TexturePipelineStepLoad.js +31 -31
- package/dist/resource/texture/Tr2TexturePipelineStepPack.js +43 -43
- package/dist/resource/texture/TriTextureRes.js +359 -359
- package/dist/resource/texture/index.js +15 -15
- package/dist/resource/texture/texturePipelineBehavior.js +308 -308
- package/dist/worker/CjsResManMainThreadLoader.js +89 -89
- package/dist/worker/CjsResManWorker.js +218 -218
- package/dist/worker/CjsResManWorkerLoader.js +437 -437
- package/dist/worker/protocol.js +12 -12
- package/docs/README.md +98 -98
- package/docs/architecture.md +118 -118
- package/docs/concepts/resource-lifecycle.md +226 -226
- package/docs/concepts/shader-resource-model.md +111 -111
- package/docs/concepts/writing-an-engine-adapter.md +115 -115
- package/docs/formats/README.md +138 -138
- package/docs/formats/carbon-effect-container.md +553 -553
- package/docs/formats/dxbc/README.md +68 -68
- package/docs/formats/dxbc/architecture.md +80 -80
- package/docs/formats/dxbc/reference/api.md +105 -77
- package/docs/formats/dxbc/reference/classes/README.md +9 -9
- package/docs/formats/dxbc/reference/decoded-output.md +122 -122
- package/docs/formats/gr2.md +160 -160
- package/docs/formats/hlsl/README.md +54 -54
- package/docs/formats/hlsl/architecture.md +66 -65
- package/docs/formats/hlsl/guides/hydrating-json-output.md +60 -60
- package/docs/formats/hlsl/guides/reading-effects.md +68 -64
- package/docs/formats/hlsl/reference/advanced-analysis.md +61 -61
- package/docs/formats/hlsl/reference/api.md +91 -92
- package/docs/formats/hlsl/reference/classes/README.md +11 -11
- package/docs/formats/hlsl/reference/json-graph.md +97 -97
- package/docs/formats/pickle.md +82 -82
- package/docs/formats/provenance.md +196 -196
- package/docs/formats/stl.md +37 -37
- package/docs/formats/webgl/README.md +115 -115
- package/docs/formats/webgl/architecture.md +69 -69
- package/docs/formats/webgl/carbon-constant-layouts.md +326 -326
- package/docs/formats/webgl/decl-io.md +1234 -1234
- package/docs/formats/webgl/memory-structured.md +890 -890
- package/docs/formats/webgl/reference/classes/README.md +9 -9
- package/docs/formats/webgl/texture-sample.md +964 -964
- package/docs/formats/webgpu/README.md +84 -84
- package/docs/formats/webgpu/architecture.md +95 -95
- package/docs/formats/webgpu/formats/carbon-webgpu.md +215 -215
- package/docs/formats/webgpu/guides/effect-packaging.md +189 -189
- package/docs/formats/webgpu/reference/api.md +196 -196
- package/docs/formats/webgpu/reference/classes/README.md +9 -9
- package/docs/formats/webgpu/reference/wgsl-compatibility.md +1546 -1546
- package/docs/formats/wwise.md +146 -146
- package/docs/reference/classes/README.md +35 -35
- package/docs/reference/classes/audio.md +30 -30
- package/docs/reference/classes/core.md +216 -216
- package/docs/reference/classes/dropped.md +46 -46
- package/docs/reference/classes/formats.md +944 -944
- package/docs/reference/classes/resources.md +456 -456
- package/docs/reference/classes/texture.md +26 -26
- package/docs/reference/events.md +117 -117
- package/docs/reference/motherlode-cache.md +275 -275
- package/docs/reference/queues.md +194 -194
- package/docs/reference/reload.md +107 -107
- package/docs/reference/texture-arrays.md +113 -113
- package/docs/reference/texture-pipeline.md +53 -53
- package/docs/reference/workers.md +142 -142
- package/docs/roadmap.md +150 -150
- package/format-notices/black/LICENSE +21 -21
- package/format-notices/black/NOTICE +47 -47
- package/format-notices/bnk/LICENSE +21 -21
- package/format-notices/bnk/NOTICE +21 -21
- package/format-notices/cmf/LICENSE +21 -21
- package/format-notices/cmf/NOTICE +36 -36
- package/format-notices/dds/LICENSE +21 -21
- package/format-notices/dds/NOTICE +14 -14
- package/format-notices/dxbc/LICENSE +21 -21
- package/format-notices/dxbc/NOTICE +20 -20
- package/format-notices/fbx/LICENSE +21 -21
- package/format-notices/fbx/NOTICE +14 -14
- package/format-notices/flac/LICENSE +21 -21
- package/format-notices/flac/NOTICE +14 -14
- package/format-notices/gif/LICENSE +21 -21
- package/format-notices/gif/NOTICE +14 -14
- package/format-notices/gltf/LICENSE +21 -21
- package/format-notices/gltf/NOTICE +27 -27
- package/format-notices/gr2/LICENSE +21 -21
- package/format-notices/gr2/NOTICE +60 -60
- package/format-notices/gr2/THIRD-PARTY-NOTICES.md +93 -93
- package/format-notices/hlsl/LICENSE +21 -21
- package/format-notices/hlsl/NOTICE +25 -25
- package/format-notices/jpeg/LICENSE +21 -21
- package/format-notices/jpeg/NOTICE +14 -14
- package/format-notices/mp3/LICENSE +21 -21
- package/format-notices/mp3/NOTICE +14 -14
- package/format-notices/mp4/LICENSE +21 -21
- package/format-notices/mp4/NOTICE +14 -14
- package/format-notices/obj/LICENSE +21 -21
- package/format-notices/obj/NOTICE +26 -26
- package/format-notices/ogg/LICENSE +21 -21
- package/format-notices/ogg/NOTICE +28 -28
- package/format-notices/png/LICENSE +21 -21
- package/format-notices/png/NOTICE +14 -14
- package/format-notices/red/LICENSE +21 -21
- package/format-notices/red/NOTICE +31 -31
- package/format-notices/stl/LICENSE +21 -21
- package/format-notices/stl/NOTICE +21 -21
- package/format-notices/tga/LICENSE +21 -21
- package/format-notices/tga/NOTICE +14 -14
- package/format-notices/wav/LICENSE +21 -21
- package/format-notices/wav/NOTICE +14 -14
- package/format-notices/webgl/LICENSE +21 -21
- package/format-notices/webgl/NOTICE +35 -35
- package/format-notices/webgpu/LICENSE +21 -21
- package/format-notices/webgpu/NOTICE +31 -31
- package/format-notices/webm/LICENSE +21 -21
- package/format-notices/webm/NOTICE +14 -14
- package/format-notices/webp/LICENSE +21 -21
- package/format-notices/webp/NOTICE +14 -14
- package/format-notices/wem/LICENSE +57 -57
- package/format-notices/wem/NOTICE +33 -33
- package/format-notices/yaml/LICENSE +21 -21
- package/format-notices/yaml/NOTICE +44 -44
- package/package.json +63 -63
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HlslEffectBindingManifest.js","sources":["../../../../../../../src/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js"],"sourcesContent":["import { HlslRenderContextEnum, hlslShaderStageName } from \"../HlslRenderContextEnum.js\";\n\n/**\n * Carbon-backed binding manifest for register-named shader outputs.\n *\n * This maps generated fallback symbols such as `cb0`, `t3`, `s0`, and `u1`\n * back to the exact stage metadata read from Trinity effect data.\n */\nexport class HlslEffectBindingManifest\n{\n /**\n * Builds a manifest from a loaded `HlslEffectRes`.\n *\n * @param {object} effectRes Loaded effect resource with `GetShader()`.\n * @param {object} [options] Manifest options.\n * @returns {HlslEffectBindingManifest} Carbon binding manifest.\n */\n static fromTr2EffectRes(effectRes, options = {})\n {\n const shader = effectRes.GetShader();\n return HlslEffectBindingManifest.fromEffectDescription(shader.GetEffectDescription(), options);\n }\n\n /**\n * Builds a manifest from a decoded `HlslEffectDescription`.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {object} [options] Manifest options.\n * @returns {HlslEffectBindingManifest} Carbon binding manifest.\n */\n static fromEffectDescription(effectDescription, options = {})\n {\n return new HlslEffectBindingManifest(effectDescription, options);\n }\n\n /**\n * Creates a binding manifest.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {object} [options] Manifest options.\n */\n constructor(effectDescription, options = {})\n {\n this.effectName = effectDescription?.effectName || options.effectName || \"\";\n this.version = effectDescription?.version || 0;\n this.passes = buildPasses(effectDescription);\n this.stages = buildStages(effectDescription);\n }\n\n /**\n * Resolves a generated binding symbol for one stage.\n *\n * @param {object} query Stage and symbol query.\n * @param {string} query.techniqueName Technique name.\n * @param {number} query.passIndex Pass index.\n * @param {number} [query.stageType] Trinity stage enum value.\n * @param {string} [query.stageName] Stage name.\n * @param {string} query.symbol Generated symbol such as `cb0` or `t3`.\n * @param {number} [query.registerSpace] Optional D3D register-space disambiguator.\n * @returns {object|null} Matching binding record, or null.\n */\n resolve(query)\n {\n const stage = this.stages.find((entry) =>\n entry.techniqueName === query.techniqueName &&\n entry.passIndex === query.passIndex &&\n (Number.isInteger(query.stageType) ? entry.stageType === query.stageType : entry.stageName === query.stageName)\n );\n if (!stage) return null;\n return stage.bindings.find((entry) =>\n entry.generatedSymbol === query.symbol &&\n (!Number.isInteger(query.registerSpace) || entry.registerSpace === query.registerSpace)\n ) || null;\n }\n\n /**\n * Returns a JSON-safe manifest snapshot.\n *\n * @returns {object} Serializable binding manifest.\n */\n toJSON()\n {\n return {\n effectName: this.effectName,\n version: this.version,\n passes: this.passes.map((entry) => cloneJson(entry)),\n stages: this.stages.map((entry) => cloneJson(entry))\n };\n }\n}\n\n/**\n * Builds pass render-state records from the decoded effect description.\n *\n * @param {object} effectDescription Decoded effect description.\n * @returns {object[]} Pass render-state manifest records.\n */\nfunction buildPasses(effectDescription)\n{\n const passes = [];\n for (const technique of effectDescription?.techniques || [])\n {\n for (let passIndex = 0; passIndex < technique.passes.length; passIndex += 1)\n {\n const pass = technique.passes[passIndex];\n passes.push({\n techniqueName: technique.name,\n passIndex,\n renderStates: pass.renderStates,\n states: (pass.cjsRenderStateSetup?.entries || []).map(({ key, value }) => ({\n state: key,\n value\n }))\n });\n }\n }\n return passes;\n}\n\n/**\n * Builds all stage records from the decoded effect description.\n *\n * @param {object} effectDescription Decoded effect description.\n * @returns {object[]} Stage binding manifest records.\n */\nfunction buildStages(effectDescription)\n{\n const stages = [];\n for (const technique of effectDescription?.techniques || [])\n {\n for (let passIndex = 0; passIndex < technique.passes.length; passIndex += 1)\n {\n const pass = technique.passes[passIndex];\n for (let stageType = 0; stageType < HlslRenderContextEnum.SHADER_TYPE_COUNT; stageType += 1)\n {\n const stage = pass.stageInputs[stageType];\n if (!stage?.m_exists) continue;\n stages.push(buildStage(effectDescription, technique.name, passIndex, pass, stageType, stage));\n }\n }\n }\n return stages;\n}\n\n/**\n * Builds one stage binding manifest record.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {string} techniqueName Technique name.\n * @param {number} passIndex Pass index.\n * @param {object} pass Pass metadata.\n * @param {number} stageType Stage enum value.\n * @param {object} stage Stage input metadata.\n * @returns {object} Stage binding record.\n */\nfunction buildStage(effectDescription, techniqueName, passIndex, pass, stageType, stage)\n{\n const bindings = [];\n const seen = new Set();\n\n for (const register of stage.signature?.registers || [])\n {\n const binding = buildRegisterBinding(effectDescription, pass, stageType, stage, register);\n if (!binding) continue;\n const identity = bindingIdentity(binding.kind, binding.registerSpace, binding.registerIndex);\n if (seen.has(identity)) continue;\n seen.add(identity);\n bindings.push(binding);\n }\n\n addSignatureSamplerBindings(effectDescription, pass, stageType, stage, bindings, seen);\n\n addMapBindings(effectDescription, pass, stageType, stage, bindings, seen, \"resource\", \"t\", stage.resources);\n addMapBindings(effectDescription, pass, stageType, stage, bindings, seen, \"sampler\", \"s\", stage.samplers);\n addMapBindings(effectDescription, pass, stageType, stage, bindings, seen, \"uav\", \"u\", stage.uavs);\n\n return {\n techniqueName,\n passIndex,\n stageType,\n stageName: hlslShaderStageName(stageType),\n shaderHandle: stage.m_shader,\n shaderBytecode: stage.cjsShaderBytecode?.toJSON?.() ?? stage.cjsShaderBytecode,\n pipelineInputs: cloneJson(stage.signature?.pipelineInputs || []),\n threadGroupSize: cloneJson(stage.signature?.threadGroupSize || null),\n bindings\n };\n}\n\n/**\n * Adds v13+ static samplers, which Carbon stores separately from the general\n * signature register list. In particular, SM 5.1 effects may declare `s0`\n * only in `signature.samplers`.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {object} pass Pass metadata.\n * @param {number} stageType Stage enum value.\n * @param {object} stage Stage input metadata.\n * @param {object[]} bindings Destination bindings.\n * @param {Set<string>} seen Class/space/register identities already added.\n */\nfunction addSignatureSamplerBindings(effectDescription, pass, stageType, stage, bindings, seen)\n{\n for (const sampler of stage.signature?.samplers || [])\n {\n if (!Number.isInteger(sampler?.registerIndex)) continue;\n const registerSpace = Number.isInteger(sampler.registerSpace) ? sampler.registerSpace : stageType;\n const identity = bindingIdentity(\"sampler\", registerSpace, sampler.registerIndex);\n if (seen.has(identity)) continue;\n const mapMetadata = stage.samplers.get(sampler.registerIndex) || null;\n const name = metadataName(\"sampler\", mapMetadata || sampler, stage, sampler.registerIndex);\n bindings.push({\n kind: \"sampler\",\n generatedSymbol: `s${sampler.registerIndex}`,\n registerIndex: sampler.registerIndex,\n registerType: 1,\n registerSpace,\n registerCount: 1,\n arrayCount: 1,\n dynamic: Boolean(mapMetadata?.sampler?.isDynamic),\n metadataName: name,\n carbon: {\n name: mapMetadata?.name || null,\n sampler: cloneJson(sampler.sampler)\n },\n annotations: annotationsFor(effectDescription, name),\n heapView: isHeapView(pass, \"sampler\", stageType, sampler.registerIndex),\n sourceTruth: \"carbon-signature-sampler\"\n });\n seen.add(identity);\n }\n}\n\n/**\n * Builds one binding from a Carbon register declaration.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {object} pass Pass metadata.\n * @param {number} stageType Stage enum value.\n * @param {object} stage Stage input metadata.\n * @param {object} register Carbon register declaration.\n * @returns {object|null} Binding record.\n */\nfunction buildRegisterBinding(effectDescription, pass, stageType, stage, register)\n{\n const classification = classifyRegister(register.registerType);\n if (!classification) return null;\n const metadata = metadataForBinding(stage, classification.kind, register.registerIndex);\n const generatedSymbol = `${classification.prefix}${register.registerIndex}`;\n return {\n kind: classification.kind,\n generatedSymbol,\n registerIndex: register.registerIndex,\n registerType: register.registerType,\n registerSpace: register.registerSpace,\n registerCount: register.registerCount,\n arrayCount: register.arrayCount,\n dynamic: Boolean(register.dynamic),\n metadataName: metadataName(classification.kind, metadata, stage, register.registerIndex),\n carbon: carbonPayload(classification.kind, metadata, stage, register.registerIndex),\n annotations: annotationsFor(effectDescription, metadataName(classification.kind, metadata, stage, register.registerIndex)),\n heapView: isHeapView(pass, classification.kind, stageType, register.registerIndex),\n sourceTruth: \"carbon-stage-register\"\n };\n}\n\n/**\n * Adds bindings found in Carbon maps but absent from the signature register list.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {object} pass Pass metadata.\n * @param {number} stageType Stage enum value.\n * @param {object} stage Stage input metadata.\n * @param {object[]} bindings Destination bindings.\n * @param {Set<string>} seen Generated symbols already added.\n * @param {string} kind Binding kind.\n * @param {string} prefix Generated symbol prefix.\n * @param {Map<number, object>} map Carbon register map.\n */\nfunction addMapBindings(effectDescription, pass, stageType, stage, bindings, seen, kind, prefix, map)\n{\n for (const [ registerIndex, metadata ] of map.entries())\n {\n // Carbon register maps do not carry a register space. When an exact\n // signature source already names this class/index, it wins regardless\n // of space; treating stageType as an additional exact space would\n // manufacture duplicate SM 5.1 bindings.\n if (bindings.some((entry) => entry.kind === kind && entry.registerIndex === registerIndex)) continue;\n const registerSpace = stageType;\n const identity = bindingIdentity(kind, registerSpace, registerIndex);\n const generatedSymbol = `${prefix}${registerIndex}`;\n if (seen.has(identity)) continue;\n bindings.push({\n kind,\n generatedSymbol,\n registerIndex,\n registerType: null,\n registerSpace,\n registerCount: metadata?.arrayElements || 1,\n arrayCount: metadata?.arrayElements || 1,\n dynamic: true,\n metadataName: metadataName(kind, metadata, stage, registerIndex),\n carbon: carbonPayload(kind, metadata, stage, registerIndex),\n annotations: annotationsFor(effectDescription, metadataName(kind, metadata, stage, registerIndex)),\n heapView: isHeapView(pass, kind, stageType, registerIndex),\n sourceTruth: \"carbon-register-map\"\n });\n seen.add(identity);\n }\n}\n\n/**\n * Builds a class-aware identity for one D3D register binding.\n *\n * @param {string} kind Binding class.\n * @param {number} registerSpace D3D register space.\n * @param {number} registerIndex D3D register index.\n * @returns {string} Stable identity.\n */\nfunction bindingIdentity(kind, registerSpace, registerIndex)\n{\n return `${kind}:${registerSpace}:${registerIndex}`;\n}\n\n/**\n * Classifies a Carbon register type into generated-symbol kind.\n *\n * @param {number} registerType Carbon register type.\n * @returns {{kind:string,prefix:string}|null} Binding classification.\n */\nfunction classifyRegister(registerType)\n{\n if (registerType === 0) return { kind: \"constantBuffer\", prefix: \"cb\" };\n if (registerType === 1) return { kind: \"sampler\", prefix: \"s\" };\n if (registerType >= 32 && registerType <= 63) return { kind: \"resource\", prefix: \"t\" };\n if (registerType >= 64 && registerType <= 95) return { kind: \"uav\", prefix: \"u\" };\n return null;\n}\n\n/**\n * Gets register metadata for a classified binding.\n *\n * @param {object} stage Stage input metadata.\n * @param {string} kind Binding kind.\n * @param {number} registerIndex Register index.\n * @returns {object|null} Carbon metadata object.\n */\nfunction metadataForBinding(stage, kind, registerIndex)\n{\n if (kind === \"resource\") return stage.resources.get(registerIndex) || null;\n if (kind === \"sampler\") return stage.samplers.get(registerIndex) || null;\n if (kind === \"uav\") return stage.uavs.get(registerIndex) || null;\n return null;\n}\n\n/**\n * Gets the best Carbon metadata name for one binding.\n *\n * @param {string} kind Binding kind.\n * @param {object|null} metadata Carbon metadata object.\n * @param {object} stage Stage input metadata.\n * @param {number} registerIndex Register index.\n * @returns {string|null} Metadata name.\n */\nfunction metadataName(kind, metadata, stage, registerIndex)\n{\n if (metadata?.name) return metadata.name;\n if (kind === \"constantBuffer\" && registerIndex === 0 && stage.constants.length) return \"$LocalConstants\";\n return null;\n}\n\n/**\n * Builds the Carbon metadata payload for one binding.\n *\n * @param {string} kind Binding kind.\n * @param {object|null} metadata Carbon metadata object.\n * @param {object} stage Stage input metadata.\n * @param {number} registerIndex Register index.\n * @returns {object|null} JSON-safe Carbon payload.\n */\nfunction carbonPayload(kind, metadata, stage, registerIndex)\n{\n if (kind === \"constantBuffer\")\n {\n const hasLocalConstants = registerIndex === 0 && stage.constants.length > 0;\n return {\n hasLocalConstants,\n constantValueSize: hasLocalConstants ? stage.m_constantValueSize : 0,\n constants: hasLocalConstants ? stage.constants.map((entry) => entry?.toJSON?.() ?? entry) : []\n };\n }\n return metadata?.toJSON?.() ?? cloneJson(metadata);\n}\n\n/**\n * Gets top-level annotations for a named parameter.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {string|null} name Parameter name.\n * @returns {object[]} JSON-safe annotations.\n */\nfunction annotationsFor(effectDescription, name)\n{\n if (!name) return [];\n const annotations = effectDescription.annotations?.get(name) || [];\n return annotations.map((entry) => entry?.toJSON?.() ?? entry);\n}\n\n/**\n * Checks whether a binding is marked as a heap view in the resource-set description.\n *\n * @param {object} pass Pass metadata.\n * @param {string} kind Binding kind.\n * @param {number} stageType Stage enum value.\n * @param {number} registerIndex Register index.\n * @returns {boolean} True when the binding is a heap view.\n */\nfunction isHeapView(pass, kind, stageType, registerIndex)\n{\n const heapKind = kind === \"resource\" ? \"srv\" : kind === \"sampler\" ? \"sampler\" : kind === \"uav\" ? \"uav\" : null;\n if (!heapKind) return false;\n return Boolean(pass.resourceSetDesc?.heapViews?.some((entry) =>\n entry.kind === heapKind &&\n entry.stageType === stageType &&\n entry.registerIndex === registerIndex\n ));\n}\n\n/**\n * Deep-clones JSON-like values.\n *\n * @param {*} value Value to clone.\n * @returns {*} JSON-like clone.\n */\nfunction cloneJson(value)\n{\n if (Array.isArray(value)) return value.map(cloneJson);\n if (value && typeof value === \"object\")\n {\n return Object.fromEntries(Object.entries(value).map(([ key, entry ]) => [ key, cloneJson(entry) ]));\n }\n return value;\n}\n"],"names":["HlslEffectBindingManifest","fromTr2EffectRes","effectRes","options","shader","GetShader","fromEffectDescription","GetEffectDescription","effectDescription","constructor","effectName","version","passes","buildPasses","stages","buildStages","resolve","query","stage","find","entry","techniqueName","passIndex","Number","isInteger","stageType","stageName","bindings","generatedSymbol","symbol","registerSpace","toJSON","map","cloneJson","technique","techniques","length","pass","push","name","renderStates","states","cjsRenderStateSetup","entries","key","value","state","HlslRenderContextEnum","SHADER_TYPE_COUNT","stageInputs","m_exists","buildStage","seen","Set","register","signature","registers","binding","buildRegisterBinding","identity","bindingIdentity","kind","registerIndex","has","add","addSignatureSamplerBindings","addMapBindings","resources","samplers","uavs","hlslShaderStageName","shaderHandle","m_shader","shaderBytecode","cjsShaderBytecode","pipelineInputs","threadGroupSize","sampler","mapMetadata","get","metadataName","registerType","registerCount","arrayCount","dynamic","Boolean","isDynamic","carbon","annotations","annotationsFor","heapView","isHeapView","sourceTruth","classification","classifyRegister","metadata","metadataForBinding","prefix","carbonPayload","some","arrayElements","constants","hasLocalConstants","constantValueSize","m_constantValueSize","heapKind","resourceSetDesc","heapViews","Array","isArray","Object","fromEntries"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,yBAAyB,CACtC;AACI;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,OAAOC,gBAAgBA,CAACC,SAAS,EAAEC,OAAO,GAAG,EAAE,EAC/C;AACI,IAAA,MAAMC,MAAM,GAAGF,SAAS,CAACG,SAAS,EAAE;IACpC,OAAOL,yBAAyB,CAACM,qBAAqB,CAACF,MAAM,CAACG,oBAAoB,EAAE,EAAEJ,OAAO,CAAC;AAClG,EAAA;;AAEA;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,OAAOG,qBAAqBA,CAACE,iBAAiB,EAAEL,OAAO,GAAG,EAAE,EAC5D;AACI,IAAA,OAAO,IAAIH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AAI,IAAIX,KAAK,CAAC;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASuE,UAAUA,CAACtD,IAAI,EAAEwB,IAAI,EAAEpC,SAAS,EAAEqC,aAAa,EACxD;EACI,MAAM2C,QAAQ,GAAG5C,IAAI,KAAK,UAAU,GAAG,KAAK,GAAGA,IAAI,KAAK,SAAS,GAAG,SAAS,GAAGA,IAAI,KAAK,KAAK,GAAG,KAAK,GAAG,IAAI;AAC7G,EAAA,IAAI,CAAC4C,QAAQ,EAAE,OAAO,KAAK;AAC3B,EAAA,OAAOpB,OAAO,CAAChD,IAAI,CAACqE,eAAe,EAAEC,SAAS,EAAER,IAAI,CAAE/E,KAAK,IACvDA,KAAK,CAACyC,IAAI,KAAK4C,QAAQ,IAC3BrF,KAAK,CAACK,SAAS,KAAKA,SAAS,IAC7BL,KAAK,CAAC0C,aAAa,KAAKA,aACxB,CAAC,CAAC;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS7B,SAASA,CAACY,KAAK,EACxB;AACI,EAAA,IAAI+D,KAAK,CAACC,OAAO,CAAChE,KAAK,CAAC,EAAE,OAAOA,KAAK,CAACb,GAAG,CAACC,SAAS,CAAC;AACrD,EAAA,IAAIY,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EACtC;AACI,IAAA,OAAOiE,MAAM,CAACC,WAAW,CAACD,MAAM,CAACnE,OAAO,CAACE,KAAK,CAAC,CAACb,GAAG,CAAC,CAAC,CAAEY,GAAG,EAAExB,KAAK,CAAE,KAAK,CAAEwB,GAAG,EAAEX,SAAS,CAACb,KAAK,CAAC,CAAE,CAAC,CAAC;AACvG,EAAA;AACA,EAAA,OAAOyB,KAAK;AAChB;;;;"}
|
|
1
|
+
{"version":3,"file":"HlslEffectBindingManifest.js","sources":["../../../../../../../src/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js"],"sourcesContent":["import { HlslRenderContextEnum, hlslShaderStageName } from \"../HlslRenderContextEnum.js\";\n\n/**\n * Carbon-backed binding manifest for register-named shader outputs.\n *\n * This maps generated fallback symbols such as `cb0`, `t3`, `s0`, and `u1`\n * back to the exact stage metadata read from Trinity effect data.\n */\nexport class HlslEffectBindingManifest\n{\n /**\n * Builds a manifest from a loaded `HlslEffectRes`.\n *\n * @param {object} effectRes Loaded effect resource with `GetShader()`.\n * @param {object} [options] Manifest options.\n * @returns {HlslEffectBindingManifest} Carbon binding manifest.\n */\n static fromTr2EffectRes(effectRes, options = {})\n {\n const shader = effectRes.GetShader();\n return HlslEffectBindingManifest.fromEffectDescription(shader.GetEffectDescription(), options);\n }\n\n /**\n * Builds a manifest from a decoded `HlslEffectDescription`.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {object} [options] Manifest options.\n * @returns {HlslEffectBindingManifest} Carbon binding manifest.\n */\n static fromEffectDescription(effectDescription, options = {})\n {\n return new HlslEffectBindingManifest(effectDescription, options);\n }\n\n /**\n * Creates a binding manifest.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {object} [options] Manifest options.\n */\n constructor(effectDescription, options = {})\n {\n this.effectName = effectDescription?.effectName || options.effectName || \"\";\n this.version = effectDescription?.version || 0;\n this.passes = buildPasses(effectDescription);\n this.stages = buildStages(effectDescription);\n }\n\n /**\n * Resolves a generated binding symbol for one stage.\n *\n * @param {object} query Stage and symbol query.\n * @param {string} query.techniqueName Technique name.\n * @param {number} query.passIndex Pass index.\n * @param {number} [query.stageType] Trinity stage enum value.\n * @param {string} [query.stageName] Stage name.\n * @param {string} query.symbol Generated symbol such as `cb0` or `t3`.\n * @param {number} [query.registerSpace] Optional D3D register-space disambiguator.\n * @returns {object|null} Matching binding record, or null.\n */\n resolve(query)\n {\n const stage = this.stages.find((entry) =>\n entry.techniqueName === query.techniqueName &&\n entry.passIndex === query.passIndex &&\n (Number.isInteger(query.stageType) ? entry.stageType === query.stageType : entry.stageName === query.stageName)\n );\n if (!stage) return null;\n return stage.bindings.find((entry) =>\n entry.generatedSymbol === query.symbol &&\n (!Number.isInteger(query.registerSpace) || entry.registerSpace === query.registerSpace)\n ) || null;\n }\n\n /**\n * Returns a JSON-safe manifest snapshot.\n *\n * @returns {object} Serializable binding manifest.\n */\n toJSON()\n {\n return {\n effectName: this.effectName,\n version: this.version,\n passes: this.passes.map((entry) => cloneJson(entry)),\n stages: this.stages.map((entry) => cloneJson(entry))\n };\n }\n}\n\n/**\n * Builds pass render-state records from the decoded effect description.\n *\n * @param {object} effectDescription Decoded effect description.\n * @returns {object[]} Pass render-state manifest records.\n */\nfunction buildPasses(effectDescription)\n{\n const passes = [];\n for (const technique of effectDescription?.techniques || [])\n {\n for (let passIndex = 0; passIndex < technique.passes.length; passIndex += 1)\n {\n const pass = technique.passes[passIndex];\n passes.push({\n techniqueName: technique.name,\n passIndex,\n renderStates: pass.renderStates,\n states: (pass.cjsRenderStateSetup?.entries || []).map(({ key, value }) => ({\n state: key,\n value\n }))\n });\n }\n }\n return passes;\n}\n\n/**\n * Builds all stage records from the decoded effect description.\n *\n * @param {object} effectDescription Decoded effect description.\n * @returns {object[]} Stage binding manifest records.\n */\nfunction buildStages(effectDescription)\n{\n const stages = [];\n for (const technique of effectDescription?.techniques || [])\n {\n for (let passIndex = 0; passIndex < technique.passes.length; passIndex += 1)\n {\n const pass = technique.passes[passIndex];\n for (let stageType = 0; stageType < HlslRenderContextEnum.SHADER_TYPE_COUNT; stageType += 1)\n {\n const stage = pass.stageInputs[stageType];\n if (!stage?.m_exists) continue;\n stages.push(buildStage(effectDescription, technique.name, passIndex, pass, stageType, stage));\n }\n }\n }\n return stages;\n}\n\n/**\n * Builds one stage binding manifest record.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {string} techniqueName Technique name.\n * @param {number} passIndex Pass index.\n * @param {object} pass Pass metadata.\n * @param {number} stageType Stage enum value.\n * @param {object} stage Stage input metadata.\n * @returns {object} Stage binding record.\n */\nfunction buildStage(effectDescription, techniqueName, passIndex, pass, stageType, stage)\n{\n const bindings = [];\n const seen = new Set();\n\n for (const register of stage.signature?.registers || [])\n {\n const binding = buildRegisterBinding(effectDescription, pass, stageType, stage, register);\n if (!binding) continue;\n const identity = bindingIdentity(binding.kind, binding.registerSpace, binding.registerIndex);\n if (seen.has(identity)) continue;\n seen.add(identity);\n bindings.push(binding);\n }\n\n addSignatureSamplerBindings(effectDescription, pass, stageType, stage, bindings, seen);\n\n addMapBindings(effectDescription, pass, stageType, stage, bindings, seen, \"resource\", \"t\", stage.resources);\n addMapBindings(effectDescription, pass, stageType, stage, bindings, seen, \"sampler\", \"s\", stage.samplers);\n addMapBindings(effectDescription, pass, stageType, stage, bindings, seen, \"uav\", \"u\", stage.uavs);\n\n return {\n techniqueName,\n passIndex,\n stageType,\n stageName: hlslShaderStageName(stageType),\n shaderHandle: stage.m_shader,\n shaderBytecode: stage.cjsShaderBytecode?.toJSON?.() ?? stage.cjsShaderBytecode,\n pipelineInputs: cloneJson(stage.signature?.pipelineInputs || []),\n threadGroupSize: cloneJson(stage.signature?.threadGroupSize || null),\n bindings\n };\n}\n\n/**\n * Adds v13+ static samplers, which Carbon stores separately from the general\n * signature register list. In particular, SM 5.1 effects may declare `s0`\n * only in `signature.samplers`.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {object} pass Pass metadata.\n * @param {number} stageType Stage enum value.\n * @param {object} stage Stage input metadata.\n * @param {object[]} bindings Destination bindings.\n * @param {Set<string>} seen Class/space/register identities already added.\n */\nfunction addSignatureSamplerBindings(effectDescription, pass, stageType, stage, bindings, seen)\n{\n for (const sampler of stage.signature?.samplers || [])\n {\n if (!Number.isInteger(sampler?.registerIndex)) continue;\n const registerSpace = Number.isInteger(sampler.registerSpace) ? sampler.registerSpace : stageType;\n const identity = bindingIdentity(\"sampler\", registerSpace, sampler.registerIndex);\n if (seen.has(identity)) continue;\n const mapMetadata = stage.samplers.get(sampler.registerIndex) || null;\n const name = metadataName(\"sampler\", mapMetadata || sampler, stage, sampler.registerIndex);\n bindings.push({\n kind: \"sampler\",\n generatedSymbol: `s${sampler.registerIndex}`,\n registerIndex: sampler.registerIndex,\n registerType: 1,\n registerSpace,\n registerCount: 1,\n arrayCount: 1,\n dynamic: Boolean(mapMetadata?.sampler?.isDynamic),\n metadataName: name,\n carbon: {\n name: mapMetadata?.name || null,\n sampler: cloneJson(sampler.sampler)\n },\n annotations: annotationsFor(effectDescription, name),\n heapView: isHeapView(pass, \"sampler\", stageType, sampler.registerIndex),\n sourceTruth: \"carbon-signature-sampler\"\n });\n seen.add(identity);\n }\n}\n\n/**\n * Builds one binding from a Carbon register declaration.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {object} pass Pass metadata.\n * @param {number} stageType Stage enum value.\n * @param {object} stage Stage input metadata.\n * @param {object} register Carbon register declaration.\n * @returns {object|null} Binding record.\n */\nfunction buildRegisterBinding(effectDescription, pass, stageType, stage, register)\n{\n const classification = classifyRegister(register.registerType);\n if (!classification) return null;\n const metadata = metadataForBinding(stage, classification.kind, register.registerIndex);\n const generatedSymbol = `${classification.prefix}${register.registerIndex}`;\n return {\n kind: classification.kind,\n generatedSymbol,\n registerIndex: register.registerIndex,\n registerType: register.registerType,\n registerSpace: register.registerSpace,\n registerCount: register.registerCount,\n arrayCount: register.arrayCount,\n dynamic: Boolean(register.dynamic),\n metadataName: metadataName(classification.kind, metadata, stage, register.registerIndex),\n carbon: carbonPayload(classification.kind, metadata, stage, register.registerIndex),\n annotations: annotationsFor(effectDescription, metadataName(classification.kind, metadata, stage, register.registerIndex)),\n heapView: isHeapView(pass, classification.kind, stageType, register.registerIndex),\n sourceTruth: \"carbon-stage-register\"\n };\n}\n\n/**\n * Adds bindings found in Carbon maps but absent from the signature register list.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {object} pass Pass metadata.\n * @param {number} stageType Stage enum value.\n * @param {object} stage Stage input metadata.\n * @param {object[]} bindings Destination bindings.\n * @param {Set<string>} seen Generated symbols already added.\n * @param {string} kind Binding kind.\n * @param {string} prefix Generated symbol prefix.\n * @param {Map<number, object>} map Carbon register map.\n */\nfunction addMapBindings(effectDescription, pass, stageType, stage, bindings, seen, kind, prefix, map)\n{\n for (const [ registerIndex, metadata ] of map.entries())\n {\n // Carbon register maps do not carry a register space. When an exact\n // signature source already names this class/index, it wins regardless\n // of space; treating stageType as an additional exact space would\n // manufacture duplicate SM 5.1 bindings.\n if (bindings.some((entry) => entry.kind === kind && entry.registerIndex === registerIndex)) continue;\n const registerSpace = stageType;\n const identity = bindingIdentity(kind, registerSpace, registerIndex);\n const generatedSymbol = `${prefix}${registerIndex}`;\n if (seen.has(identity)) continue;\n bindings.push({\n kind,\n generatedSymbol,\n registerIndex,\n registerType: null,\n registerSpace,\n registerCount: metadata?.arrayElements || 1,\n arrayCount: metadata?.arrayElements || 1,\n dynamic: true,\n metadataName: metadataName(kind, metadata, stage, registerIndex),\n carbon: carbonPayload(kind, metadata, stage, registerIndex),\n annotations: annotationsFor(effectDescription, metadataName(kind, metadata, stage, registerIndex)),\n heapView: isHeapView(pass, kind, stageType, registerIndex),\n sourceTruth: \"carbon-register-map\"\n });\n seen.add(identity);\n }\n}\n\n/**\n * Builds a class-aware identity for one D3D register binding.\n *\n * @param {string} kind Binding class.\n * @param {number} registerSpace D3D register space.\n * @param {number} registerIndex D3D register index.\n * @returns {string} Stable identity.\n */\nfunction bindingIdentity(kind, registerSpace, registerIndex)\n{\n return `${kind}:${registerSpace}:${registerIndex}`;\n}\n\n/**\n * Classifies a Carbon register type into generated-symbol kind.\n *\n * @param {number} registerType Carbon register type.\n * @returns {{kind:string,prefix:string}|null} Binding classification.\n */\nfunction classifyRegister(registerType)\n{\n if (registerType === 0) return { kind: \"constantBuffer\", prefix: \"cb\" };\n if (registerType === 1) return { kind: \"sampler\", prefix: \"s\" };\n if (registerType >= 32 && registerType <= 63) return { kind: \"resource\", prefix: \"t\" };\n if (registerType >= 64 && registerType <= 95) return { kind: \"uav\", prefix: \"u\" };\n return null;\n}\n\n/**\n * Gets register metadata for a classified binding.\n *\n * @param {object} stage Stage input metadata.\n * @param {string} kind Binding kind.\n * @param {number} registerIndex Register index.\n * @returns {object|null} Carbon metadata object.\n */\nfunction metadataForBinding(stage, kind, registerIndex)\n{\n if (kind === \"resource\") return stage.resources.get(registerIndex) || null;\n if (kind === \"sampler\") return stage.samplers.get(registerIndex) || null;\n if (kind === \"uav\") return stage.uavs.get(registerIndex) || null;\n return null;\n}\n\n/**\n * Gets the best Carbon metadata name for one binding.\n *\n * @param {string} kind Binding kind.\n * @param {object|null} metadata Carbon metadata object.\n * @param {object} stage Stage input metadata.\n * @param {number} registerIndex Register index.\n * @returns {string|null} Metadata name.\n */\nfunction metadataName(kind, metadata, stage, registerIndex)\n{\n if (metadata?.name) return metadata.name;\n if (kind === \"constantBuffer\" && registerIndex === 0 && stage.constants.length) return \"$LocalConstants\";\n return null;\n}\n\n/**\n * Builds the Carbon metadata payload for one binding.\n *\n * @param {string} kind Binding kind.\n * @param {object|null} metadata Carbon metadata object.\n * @param {object} stage Stage input metadata.\n * @param {number} registerIndex Register index.\n * @returns {object|null} JSON-safe Carbon payload.\n */\nfunction carbonPayload(kind, metadata, stage, registerIndex)\n{\n if (kind === \"constantBuffer\")\n {\n const hasLocalConstants = registerIndex === 0 && stage.constants.length > 0;\n return {\n hasLocalConstants,\n constantValueSize: hasLocalConstants ? stage.m_constantValueSize : 0,\n constants: hasLocalConstants ? stage.constants.map((entry) => entry?.toJSON?.() ?? entry) : [],\n // The exact authored default bytes for the stage's local constant\n // buffer. A consumer that zero-fills instead of using these\n // changes every authored default the scene does not override -\n // the effect-resource contract calls the bytes mandatory, and a\n // background effect whose Tint and intensity read zero renders\n // pure black while drawing \"correctly\".\n constantValues: hasLocalConstants && stage.constantValues ? Array.from(stage.constantValues) : []\n };\n }\n return metadata?.toJSON?.() ?? cloneJson(metadata);\n}\n\n/**\n * Gets top-level annotations for a named parameter.\n *\n * @param {object} effectDescription Decoded effect description.\n * @param {string|null} name Parameter name.\n * @returns {object[]} JSON-safe annotations.\n */\nfunction annotationsFor(effectDescription, name)\n{\n if (!name) return [];\n const annotations = effectDescription.annotations?.get(name) || [];\n return annotations.map((entry) => entry?.toJSON?.() ?? entry);\n}\n\n/**\n * Checks whether a binding is marked as a heap view in the resource-set description.\n *\n * @param {object} pass Pass metadata.\n * @param {string} kind Binding kind.\n * @param {number} stageType Stage enum value.\n * @param {number} registerIndex Register index.\n * @returns {boolean} True when the binding is a heap view.\n */\nfunction isHeapView(pass, kind, stageType, registerIndex)\n{\n const heapKind = kind === \"resource\" ? \"srv\" : kind === \"sampler\" ? \"sampler\" : kind === \"uav\" ? \"uav\" : null;\n if (!heapKind) return false;\n return Boolean(pass.resourceSetDesc?.heapViews?.some((entry) =>\n entry.kind === heapKind &&\n entry.stageType === stageType &&\n entry.registerIndex === registerIndex\n ));\n}\n\n/**\n * Deep-clones JSON-like values.\n *\n * @param {*} value Value to clone.\n * @returns {*} JSON-like clone.\n */\nfunction cloneJson(value)\n{\n if (Array.isArray(value)) return value.map(cloneJson);\n if (value && typeof value === \"object\")\n {\n return Object.fromEntries(Object.entries(value).map(([ key, entry ]) => [ key, cloneJson(entry) ]));\n }\n return value;\n}\n"],"names":["HlslEffectBindingManifest","fromTr2EffectRes","effectRes","options","shader","GetShader","fromEffectDescription","GetEffectDescription","effectDescription","constructor","effectName","version","passes","buildPasses","stages","buildStages","resolve","query","stage","find","entry","techniqueName","passIndex","Number","isInteger","stageType","stageName","bindings","generatedSymbol","symbol","registerSpace","toJSON","map","cloneJson","technique","techniques","length","pass","push","name","renderStates","states","cjsRenderStateSetup","entries","key","value","state","HlslRenderContextEnum","SHADER_TYPE_COUNT","stageInputs","m_exists","buildStage","seen","Set","register","signature","registers","binding","buildRegisterBinding","identity","bindingIdentity","kind","registerIndex","has","add","addSignatureSamplerBindings","addMapBindings","resources","samplers","uavs","hlslShaderStageName","shaderHandle","m_shader","shaderBytecode","cjsShaderBytecode","pipelineInputs","threadGroupSize","sampler","mapMetadata","get","metadataName","registerType","registerCount","arrayCount","dynamic","Boolean","isDynamic","carbon","annotations","annotationsFor","heapView","isHeapView","sourceTruth","classification","classifyRegister","metadata","metadataForBinding","prefix","carbonPayload","some","arrayElements","constants","hasLocalConstants","constantValueSize","m_constantValueSize","constantValues","Array","from","heapKind","resourceSetDesc","heapViews","isArray","Object","fromEntries"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,yBAAyB,CACtC;AACI;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,OAAOC,gBAAgBA,CAACC,SAAS,EAAEC,OAAO,GAAG,EAAE,EAC/C;AACI,IAAA,MAAMC,MAAM,GAAGF,SAAS,CAACG,SAAS,EAAE;IACpC,OAAOL,yBAAyB,CAACM,qBAAqB,CAACF,MAAM,CAACG,oBAAoB,EAAE,EAAEJ,OAAO,CAAC;AAClG,EAAA;;AAEA;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,OAAOG,qBAAqBA,CAACE,iBAAiB,EAAEL,OAAO,GAAG,EAAE,EAC5D;AACI,IAAA,OAAO,IAAIH,yBAAyB,CAACQ,iBAAiB,EAAEL,OAAO,CAAC;AACpE,EAAA;;AAEA;AACJ;AACA;AACA;AACA;AACA;AACIM,EAAAA,WAAWA,CAACD,iBAAiB,EAAEL,OAAO,GAAG,EAAE,EAC3C;IACI,IAAI,CAACO,UAAU,GAAGF,iBAAiB,EAAEE,UAAU,IAAIP,OAAO,CAACO,UAAU,IAAI,EAAE;AAC3E,IAAA,IAAI,CAACC,OAAO,GAAGH,iBAAiB,EAAEG,OAAO,IAAI,CAAC;AAC9C,IAAA,IAAI,CAACC,MAAM,GAAGC,WAAW,CAACL,iBAAiB,CAAC;AAC5C,IAAA,IAAI,CAACM,MAAM,GAAGC,WAAW,CAACP,iBAAiB,CAAC;AAChD,EAAA;;AAEA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACIQ,OAAOA,CAACC,KAAK,EACb;IACI,MAAMC,KAAK,GAAG,IAAI,CAACJ,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I,CAAE/E,KAAK,IACvDA,KAAK,CAACyC,IAAI,KAAK+C,QAAQ,IAC3BxF,KAAK,CAACK,SAAS,KAAKA,SAAS,IAC7BL,KAAK,CAAC0C,aAAa,KAAKA,aACxB,CAAC,CAAC;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS7B,SAASA,CAACY,KAAK,EACxB;AACI,EAAA,IAAI6D,KAAK,CAACK,OAAO,CAAClE,KAAK,CAAC,EAAE,OAAOA,KAAK,CAACb,GAAG,CAACC,SAAS,CAAC;AACrD,EAAA,IAAIY,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EACtC;AACI,IAAA,OAAOmE,MAAM,CAACC,WAAW,CAACD,MAAM,CAACrE,OAAO,CAACE,KAAK,CAAC,CAACb,GAAG,CAAC,CAAC,CAAEY,GAAG,EAAExB,KAAK,CAAE,KAAK,CAAEwB,GAAG,EAAEX,SAAS,CAACb,KAAK,CAAC,CAAE,CAAC,CAAC;AACvG,EAAA;AACA,EAAA,OAAOyB,KAAK;AAChB;;;;"}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Constant-buffer parameter metadata read from a Trinity effect body.
|
|
3
|
-
*/
|
|
4
|
-
class HlslEffectConstant {
|
|
5
|
-
static Type = Object.freeze({
|
|
6
|
-
FLOAT: 0,
|
|
7
|
-
INT: 1,
|
|
8
|
-
UINT: 2,
|
|
9
|
-
BOOL: 3,
|
|
10
|
-
OTHER: 4
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Creates an empty constant record with Carbon-compatible defaults.
|
|
15
|
-
*/
|
|
16
|
-
constructor() {
|
|
17
|
-
this.name = "";
|
|
18
|
-
this.offset = 0;
|
|
19
|
-
this.size = 0;
|
|
20
|
-
this.type = HlslEffectConstant.Type.FLOAT;
|
|
21
|
-
this.dimension = 0;
|
|
22
|
-
this.elements = 0;
|
|
23
|
-
this.isSRGB = false;
|
|
24
|
-
this.isAutoregister = false;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Returns a JSON-safe constant metadata snapshot.
|
|
29
|
-
*
|
|
30
|
-
* @returns {object} Serializable constant metadata.
|
|
31
|
-
*/
|
|
32
|
-
toJSON() {
|
|
33
|
-
return {
|
|
34
|
-
...this
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { HlslEffectConstant };
|
|
40
|
-
//# sourceMappingURL=HlslEffectConstant.js.map
|
|
1
|
+
/**
|
|
2
|
+
* Constant-buffer parameter metadata read from a Trinity effect body.
|
|
3
|
+
*/
|
|
4
|
+
class HlslEffectConstant {
|
|
5
|
+
static Type = Object.freeze({
|
|
6
|
+
FLOAT: 0,
|
|
7
|
+
INT: 1,
|
|
8
|
+
UINT: 2,
|
|
9
|
+
BOOL: 3,
|
|
10
|
+
OTHER: 4
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Creates an empty constant record with Carbon-compatible defaults.
|
|
15
|
+
*/
|
|
16
|
+
constructor() {
|
|
17
|
+
this.name = "";
|
|
18
|
+
this.offset = 0;
|
|
19
|
+
this.size = 0;
|
|
20
|
+
this.type = HlslEffectConstant.Type.FLOAT;
|
|
21
|
+
this.dimension = 0;
|
|
22
|
+
this.elements = 0;
|
|
23
|
+
this.isSRGB = false;
|
|
24
|
+
this.isAutoregister = false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns a JSON-safe constant metadata snapshot.
|
|
29
|
+
*
|
|
30
|
+
* @returns {object} Serializable constant metadata.
|
|
31
|
+
*/
|
|
32
|
+
toJSON() {
|
|
33
|
+
return {
|
|
34
|
+
...this
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { HlslEffectConstant };
|
|
40
|
+
//# sourceMappingURL=HlslEffectConstant.js.map
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
const ANY_TECHNIQUE = "";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Trinity effect-description body decoded from one compiled permutation record.
|
|
5
|
-
*
|
|
6
|
-
* This class no longer reads bytes. The single byte-reading implementation is
|
|
7
|
-
* `CjsCarbonEffectReader` (`src/format/carbonEffect/`), which decodes a body
|
|
8
|
-
* into a record tree; `runtimeDescriptionFromCarbon`
|
|
9
|
-
* (`../../carbonDescriptionToRuntime.js`) maps those records onto this shape,
|
|
10
|
-
* and `HlslEffectRes.GetShaderByIndex` assembles the result onto an instance.
|
|
11
|
-
* The byte walk that used to live here — one of two hand-written copies of
|
|
12
|
-
* Carbon's description layout — was deleted when the read paths converged;
|
|
13
|
-
* its version branches (8..15) moved into the shared reader.
|
|
14
|
-
*/
|
|
15
|
-
class HlslEffectDescription {
|
|
16
|
-
/**
|
|
17
|
-
* Creates an empty decoded effect description.
|
|
18
|
-
*/
|
|
19
|
-
constructor() {
|
|
20
|
-
this.techniques = [];
|
|
21
|
-
this.annotations = new Map();
|
|
22
|
-
this.version = 0;
|
|
23
|
-
this.effectName = "";
|
|
24
|
-
this.readError = null;
|
|
25
|
-
this.effectStateManager = null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Returns a JSON-safe summary of decoded techniques and annotations.
|
|
30
|
-
*
|
|
31
|
-
* @returns {object} Serializable effect-description summary.
|
|
32
|
-
*/
|
|
33
|
-
toJSON() {
|
|
34
|
-
return {
|
|
35
|
-
version: this.version,
|
|
36
|
-
effectName: this.effectName,
|
|
37
|
-
techniques: this.techniques.map(entry => entry.toJSON()),
|
|
38
|
-
annotations: mapAnnotationToJson(this.annotations),
|
|
39
|
-
readError: this.readError ? {
|
|
40
|
-
name: this.readError.name,
|
|
41
|
-
message: this.readError.message,
|
|
42
|
-
details: this.readError.details || null
|
|
43
|
-
} : null
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Serializes a map of parameter names to annotation arrays.
|
|
50
|
-
*
|
|
51
|
-
* @param {Map<string, object[]>} map Annotation map.
|
|
52
|
-
* @returns {object[]} JSON-safe annotation groups.
|
|
53
|
-
*/
|
|
54
|
-
function mapAnnotationToJson(map) {
|
|
55
|
-
return Array.from(map.entries()).map(([name, annotations]) => ({
|
|
56
|
-
name,
|
|
57
|
-
annotations: annotations.map(entry => entry.toJSON())
|
|
58
|
-
}));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export { ANY_TECHNIQUE, HlslEffectDescription };
|
|
62
|
-
//# sourceMappingURL=HlslEffectDescription.js.map
|
|
1
|
+
const ANY_TECHNIQUE = "";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Trinity effect-description body decoded from one compiled permutation record.
|
|
5
|
+
*
|
|
6
|
+
* This class no longer reads bytes. The single byte-reading implementation is
|
|
7
|
+
* `CjsCarbonEffectReader` (`src/format/carbonEffect/`), which decodes a body
|
|
8
|
+
* into a record tree; `runtimeDescriptionFromCarbon`
|
|
9
|
+
* (`../../carbonDescriptionToRuntime.js`) maps those records onto this shape,
|
|
10
|
+
* and `HlslEffectRes.GetShaderByIndex` assembles the result onto an instance.
|
|
11
|
+
* The byte walk that used to live here — one of two hand-written copies of
|
|
12
|
+
* Carbon's description layout — was deleted when the read paths converged;
|
|
13
|
+
* its version branches (8..15) moved into the shared reader.
|
|
14
|
+
*/
|
|
15
|
+
class HlslEffectDescription {
|
|
16
|
+
/**
|
|
17
|
+
* Creates an empty decoded effect description.
|
|
18
|
+
*/
|
|
19
|
+
constructor() {
|
|
20
|
+
this.techniques = [];
|
|
21
|
+
this.annotations = new Map();
|
|
22
|
+
this.version = 0;
|
|
23
|
+
this.effectName = "";
|
|
24
|
+
this.readError = null;
|
|
25
|
+
this.effectStateManager = null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Returns a JSON-safe summary of decoded techniques and annotations.
|
|
30
|
+
*
|
|
31
|
+
* @returns {object} Serializable effect-description summary.
|
|
32
|
+
*/
|
|
33
|
+
toJSON() {
|
|
34
|
+
return {
|
|
35
|
+
version: this.version,
|
|
36
|
+
effectName: this.effectName,
|
|
37
|
+
techniques: this.techniques.map(entry => entry.toJSON()),
|
|
38
|
+
annotations: mapAnnotationToJson(this.annotations),
|
|
39
|
+
readError: this.readError ? {
|
|
40
|
+
name: this.readError.name,
|
|
41
|
+
message: this.readError.message,
|
|
42
|
+
details: this.readError.details || null
|
|
43
|
+
} : null
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Serializes a map of parameter names to annotation arrays.
|
|
50
|
+
*
|
|
51
|
+
* @param {Map<string, object[]>} map Annotation map.
|
|
52
|
+
* @returns {object[]} JSON-safe annotation groups.
|
|
53
|
+
*/
|
|
54
|
+
function mapAnnotationToJson(map) {
|
|
55
|
+
return Array.from(map.entries()).map(([name, annotations]) => ({
|
|
56
|
+
name,
|
|
57
|
+
annotations: annotations.map(entry => entry.toJSON())
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { ANY_TECHNIQUE, HlslEffectDescription };
|
|
62
|
+
//# sourceMappingURL=HlslEffectDescription.js.map
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { HlslEffectStageInput } from './HlslEffectStageInput.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Ray-tracing shader library metadata from v14+ Trinity effects.
|
|
5
|
-
*/
|
|
6
|
-
class HlslEffectLibrary {
|
|
7
|
-
/**
|
|
8
|
-
* Creates an empty shader-library metadata record.
|
|
9
|
-
*/
|
|
10
|
-
constructor() {
|
|
11
|
-
this.payloadSize = 0;
|
|
12
|
-
this.libraryHandle = 0;
|
|
13
|
-
this.rayGenName = "";
|
|
14
|
-
this.missName = "";
|
|
15
|
-
this.closestHitName = "";
|
|
16
|
-
this.anyHitName = "";
|
|
17
|
-
this.intersectionName = "";
|
|
18
|
-
this.hitGroupName = "";
|
|
19
|
-
this.exports = [];
|
|
20
|
-
this.globalInput = new HlslEffectStageInput();
|
|
21
|
-
this.localInput = new HlslEffectStageInput();
|
|
22
|
-
this.globalResourceSetDesc = null;
|
|
23
|
-
this.cjsShaderBytecode = null;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Returns a JSON-safe shader-library metadata snapshot.
|
|
28
|
-
*
|
|
29
|
-
* @returns {object} Serializable shader-library metadata.
|
|
30
|
-
*/
|
|
31
|
-
toJSON() {
|
|
32
|
-
return {
|
|
33
|
-
payloadSize: this.payloadSize,
|
|
34
|
-
libraryHandle: this.libraryHandle,
|
|
35
|
-
rayGenName: this.rayGenName,
|
|
36
|
-
missName: this.missName,
|
|
37
|
-
closestHitName: this.closestHitName,
|
|
38
|
-
anyHitName: this.anyHitName,
|
|
39
|
-
intersectionName: this.intersectionName,
|
|
40
|
-
hitGroupName: this.hitGroupName,
|
|
41
|
-
exports: this.exports.map(entry => ({
|
|
42
|
-
...entry
|
|
43
|
-
})),
|
|
44
|
-
globalInput: this.globalInput.toJSON(),
|
|
45
|
-
localInput: this.localInput.toJSON(),
|
|
46
|
-
globalResourceSetDesc: this.globalResourceSetDesc?.toJSON?.() ?? this.globalResourceSetDesc
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export { HlslEffectLibrary };
|
|
52
|
-
//# sourceMappingURL=HlslEffectLibrary.js.map
|
|
1
|
+
import { HlslEffectStageInput } from './HlslEffectStageInput.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Ray-tracing shader library metadata from v14+ Trinity effects.
|
|
5
|
+
*/
|
|
6
|
+
class HlslEffectLibrary {
|
|
7
|
+
/**
|
|
8
|
+
* Creates an empty shader-library metadata record.
|
|
9
|
+
*/
|
|
10
|
+
constructor() {
|
|
11
|
+
this.payloadSize = 0;
|
|
12
|
+
this.libraryHandle = 0;
|
|
13
|
+
this.rayGenName = "";
|
|
14
|
+
this.missName = "";
|
|
15
|
+
this.closestHitName = "";
|
|
16
|
+
this.anyHitName = "";
|
|
17
|
+
this.intersectionName = "";
|
|
18
|
+
this.hitGroupName = "";
|
|
19
|
+
this.exports = [];
|
|
20
|
+
this.globalInput = new HlslEffectStageInput();
|
|
21
|
+
this.localInput = new HlslEffectStageInput();
|
|
22
|
+
this.globalResourceSetDesc = null;
|
|
23
|
+
this.cjsShaderBytecode = null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Returns a JSON-safe shader-library metadata snapshot.
|
|
28
|
+
*
|
|
29
|
+
* @returns {object} Serializable shader-library metadata.
|
|
30
|
+
*/
|
|
31
|
+
toJSON() {
|
|
32
|
+
return {
|
|
33
|
+
payloadSize: this.payloadSize,
|
|
34
|
+
libraryHandle: this.libraryHandle,
|
|
35
|
+
rayGenName: this.rayGenName,
|
|
36
|
+
missName: this.missName,
|
|
37
|
+
closestHitName: this.closestHitName,
|
|
38
|
+
anyHitName: this.anyHitName,
|
|
39
|
+
intersectionName: this.intersectionName,
|
|
40
|
+
hitGroupName: this.hitGroupName,
|
|
41
|
+
exports: this.exports.map(entry => ({
|
|
42
|
+
...entry
|
|
43
|
+
})),
|
|
44
|
+
globalInput: this.globalInput.toJSON(),
|
|
45
|
+
localInput: this.localInput.toJSON(),
|
|
46
|
+
globalResourceSetDesc: this.globalResourceSetDesc?.toJSON?.() ?? this.globalResourceSetDesc
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { HlslEffectLibrary };
|
|
52
|
+
//# sourceMappingURL=HlslEffectLibrary.js.map
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parameter annotation value attached to a Trinity effect parameter.
|
|
3
|
-
*/
|
|
4
|
-
class HlslEffectParameterAnnotation {
|
|
5
|
-
static Type = Object.freeze({
|
|
6
|
-
BOOL: 0,
|
|
7
|
-
INT: 1,
|
|
8
|
-
FLOAT: 2,
|
|
9
|
-
STRING: 3
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Creates an empty string annotation record.
|
|
14
|
-
*/
|
|
15
|
-
constructor() {
|
|
16
|
-
this.name = "";
|
|
17
|
-
this.type = HlslEffectParameterAnnotation.Type.STRING;
|
|
18
|
-
this.boolValue = false;
|
|
19
|
-
this.intValue = 0;
|
|
20
|
-
this.floatValue = 0;
|
|
21
|
-
this.stringValue = "";
|
|
22
|
-
this.rawValue = 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Returns a JSON-safe annotation snapshot.
|
|
27
|
-
*
|
|
28
|
-
* @returns {object} Serializable annotation metadata.
|
|
29
|
-
*/
|
|
30
|
-
toJSON() {
|
|
31
|
-
return {
|
|
32
|
-
...this
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export { HlslEffectParameterAnnotation };
|
|
38
|
-
//# sourceMappingURL=HlslEffectParameterAnnotation.js.map
|
|
1
|
+
/**
|
|
2
|
+
* Parameter annotation value attached to a Trinity effect parameter.
|
|
3
|
+
*/
|
|
4
|
+
class HlslEffectParameterAnnotation {
|
|
5
|
+
static Type = Object.freeze({
|
|
6
|
+
BOOL: 0,
|
|
7
|
+
INT: 1,
|
|
8
|
+
FLOAT: 2,
|
|
9
|
+
STRING: 3
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Creates an empty string annotation record.
|
|
14
|
+
*/
|
|
15
|
+
constructor() {
|
|
16
|
+
this.name = "";
|
|
17
|
+
this.type = HlslEffectParameterAnnotation.Type.STRING;
|
|
18
|
+
this.boolValue = false;
|
|
19
|
+
this.intValue = 0;
|
|
20
|
+
this.floatValue = 0;
|
|
21
|
+
this.stringValue = "";
|
|
22
|
+
this.rawValue = 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Returns a JSON-safe annotation snapshot.
|
|
27
|
+
*
|
|
28
|
+
* @returns {object} Serializable annotation metadata.
|
|
29
|
+
*/
|
|
30
|
+
toJSON() {
|
|
31
|
+
return {
|
|
32
|
+
...this
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { HlslEffectParameterAnnotation };
|
|
38
|
+
//# sourceMappingURL=HlslEffectParameterAnnotation.js.map
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { HlslRenderContextEnum } from '../HlslRenderContextEnum.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Shader resource or UAV metadata read from a Trinity effect body.
|
|
5
|
-
*/
|
|
6
|
-
class HlslEffectResource {
|
|
7
|
-
static Type = Object.freeze({
|
|
8
|
-
TEXTURE_1D: HlslRenderContextEnum.TEX_TYPE_1D,
|
|
9
|
-
TEXTURE_2D: HlslRenderContextEnum.TEX_TYPE_2D,
|
|
10
|
-
TEXTURE_3D: HlslRenderContextEnum.TEX_TYPE_3D,
|
|
11
|
-
TEXTURE_CUBE: HlslRenderContextEnum.TEX_TYPE_CUBE,
|
|
12
|
-
TEXTURE_TYPELESS: HlslRenderContextEnum.TEX_TYPE_TYPELESS,
|
|
13
|
-
BUFFER: 6,
|
|
14
|
-
STRUCTURED_BUFFER: 7,
|
|
15
|
-
TBUFFER: 8,
|
|
16
|
-
BYTEADDRESS_BUFFER: 9,
|
|
17
|
-
UAV_RWTYPED: 10,
|
|
18
|
-
UAV_RWSTRUCTURED: 11,
|
|
19
|
-
UAV_RWBYTEADDRESS: 12,
|
|
20
|
-
UAV_APPEND_STRUCTURED: 13,
|
|
21
|
-
UAV_CONSUME_STRUCTURED: 14,
|
|
22
|
-
UAV_RWSTRUCTURED_WITH_COUNTER: 15,
|
|
23
|
-
BINDLESS_SAMPLER: 100
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Creates an empty shader resource record with Carbon-compatible defaults.
|
|
28
|
-
*/
|
|
29
|
-
constructor() {
|
|
30
|
-
this.name = "";
|
|
31
|
-
this.type = HlslEffectResource.Type.TEXTURE_2D;
|
|
32
|
-
this.arrayElements = 1;
|
|
33
|
-
this.isSRGB = false;
|
|
34
|
-
this.isAutoregister = false;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Returns a JSON-safe resource metadata snapshot.
|
|
39
|
-
*
|
|
40
|
-
* @returns {object} Serializable resource metadata.
|
|
41
|
-
*/
|
|
42
|
-
toJSON() {
|
|
43
|
-
return {
|
|
44
|
-
...this
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export { HlslEffectResource };
|
|
50
|
-
//# sourceMappingURL=HlslEffectResource.js.map
|
|
1
|
+
import { HlslRenderContextEnum } from '../HlslRenderContextEnum.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shader resource or UAV metadata read from a Trinity effect body.
|
|
5
|
+
*/
|
|
6
|
+
class HlslEffectResource {
|
|
7
|
+
static Type = Object.freeze({
|
|
8
|
+
TEXTURE_1D: HlslRenderContextEnum.TEX_TYPE_1D,
|
|
9
|
+
TEXTURE_2D: HlslRenderContextEnum.TEX_TYPE_2D,
|
|
10
|
+
TEXTURE_3D: HlslRenderContextEnum.TEX_TYPE_3D,
|
|
11
|
+
TEXTURE_CUBE: HlslRenderContextEnum.TEX_TYPE_CUBE,
|
|
12
|
+
TEXTURE_TYPELESS: HlslRenderContextEnum.TEX_TYPE_TYPELESS,
|
|
13
|
+
BUFFER: 6,
|
|
14
|
+
STRUCTURED_BUFFER: 7,
|
|
15
|
+
TBUFFER: 8,
|
|
16
|
+
BYTEADDRESS_BUFFER: 9,
|
|
17
|
+
UAV_RWTYPED: 10,
|
|
18
|
+
UAV_RWSTRUCTURED: 11,
|
|
19
|
+
UAV_RWBYTEADDRESS: 12,
|
|
20
|
+
UAV_APPEND_STRUCTURED: 13,
|
|
21
|
+
UAV_CONSUME_STRUCTURED: 14,
|
|
22
|
+
UAV_RWSTRUCTURED_WITH_COUNTER: 15,
|
|
23
|
+
BINDLESS_SAMPLER: 100
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Creates an empty shader resource record with Carbon-compatible defaults.
|
|
28
|
+
*/
|
|
29
|
+
constructor() {
|
|
30
|
+
this.name = "";
|
|
31
|
+
this.type = HlslEffectResource.Type.TEXTURE_2D;
|
|
32
|
+
this.arrayElements = 1;
|
|
33
|
+
this.isSRGB = false;
|
|
34
|
+
this.isAutoregister = false;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Returns a JSON-safe resource metadata snapshot.
|
|
39
|
+
*
|
|
40
|
+
* @returns {object} Serializable resource metadata.
|
|
41
|
+
*/
|
|
42
|
+
toJSON() {
|
|
43
|
+
return {
|
|
44
|
+
...this
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { HlslEffectResource };
|
|
50
|
+
//# sourceMappingURL=HlslEffectResource.js.map
|