@babylonjs/core 6.36.0 → 6.37.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/Cameras/Inputs/arcRotateCameraGamepadInput.js +4 -0
- package/Cameras/Inputs/arcRotateCameraGamepadInput.js.map +1 -1
- package/Engines/Extensions/engine.dynamicTexture.d.ts +2 -2
- package/Engines/Extensions/engine.dynamicTexture.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.dynamicTexture.js +28 -3
- package/Engines/WebGPU/Extensions/engine.dynamicTexture.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.rawTexture.js +4 -0
- package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuBufferManager.js +6 -2
- package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheBindGroups.d.ts +1 -0
- package/Engines/WebGPU/webgpuCacheBindGroups.js +12 -0
- package/Engines/WebGPU/webgpuCacheBindGroups.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js +2 -1
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheRenderPipelineTree.d.ts +2 -2
- package/Engines/WebGPU/webgpuCacheRenderPipelineTree.js +5 -2
- package/Engines/WebGPU/webgpuCacheRenderPipelineTree.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheSampler.js +3 -0
- package/Engines/WebGPU/webgpuCacheSampler.js.map +1 -1
- package/Engines/WebGPU/webgpuClearQuad.js +2 -1
- package/Engines/WebGPU/webgpuClearQuad.js.map +1 -1
- package/Engines/WebGPU/webgpuHardwareTexture.d.ts +1 -1
- package/Engines/WebGPU/webgpuHardwareTexture.js +23 -5
- package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuPipelineContext.js +4 -5
- package/Engines/WebGPU/webgpuPipelineContext.js.map +1 -1
- package/Engines/WebGPU/webgpuQuerySet.js +10 -4
- package/Engines/WebGPU/webgpuQuerySet.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.d.ts +8 -53
- package/Engines/WebGPU/webgpuTextureHelper.js +4 -996
- package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureManager.d.ts +56 -0
- package/Engines/WebGPU/webgpuTextureManager.js +1012 -0
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -0
- package/Engines/engine.d.ts +1 -0
- package/Engines/engine.js +9 -2
- package/Engines/engine.js.map +1 -1
- package/Engines/renderTargetWrapper.d.ts +1 -0
- package/Engines/renderTargetWrapper.js +5 -1
- package/Engines/renderTargetWrapper.js.map +1 -1
- package/Engines/thinEngine.d.ts +1 -0
- package/Engines/thinEngine.js +11 -7
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +9 -2
- package/Engines/webgpuEngine.js +75 -3
- package/Engines/webgpuEngine.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.d.ts +23 -6
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js +14 -3
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.d.ts +14 -3
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +12 -11
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +22 -7
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +15 -9
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +13 -5
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +9 -5
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +24 -6
- package/FlowGraph/flowGraph.js +12 -12
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphBlock.d.ts +31 -2
- package/FlowGraph/flowGraphBlock.js +8 -3
- package/FlowGraph/flowGraphBlock.js.map +1 -1
- package/FlowGraph/flowGraphContext.d.ts +5 -1
- package/FlowGraph/flowGraphContext.js +4 -2
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphCoordinator.d.ts +22 -2
- package/FlowGraph/flowGraphCoordinator.js +7 -11
- package/FlowGraph/flowGraphCoordinator.js.map +1 -1
- package/FlowGraph/{flowGraphWithOnDoneExecutionBlock.js → flowGraphExecutionBlockWithOutSignal.js} +1 -1
- package/FlowGraph/flowGraphExecutionBlockWithOutSignal.js.map +1 -0
- package/FlowGraph/flowGraphPathConverter.d.ts +13 -0
- package/FlowGraph/flowGraphPathConverter.js +31 -0
- package/FlowGraph/flowGraphPathConverter.js.map +1 -0
- package/FlowGraph/flowGraphPathConverterComponent.d.ts +19 -0
- package/FlowGraph/flowGraphPathConverterComponent.js +31 -0
- package/FlowGraph/flowGraphPathConverterComponent.js.map +1 -0
- package/FlowGraph/index.d.ts +0 -1
- package/FlowGraph/index.js +0 -1
- package/FlowGraph/index.js.map +1 -1
- package/FlowGraph/serialization.d.ts +8 -0
- package/FlowGraph/serialization.js +12 -4
- package/FlowGraph/serialization.js.map +1 -1
- package/FlowGraph/typeDefinitions.d.ts +86 -1
- package/FlowGraph/typeDefinitions.js.map +1 -1
- package/Materials/Textures/dynamicTexture.js +2 -1
- package/Materials/Textures/dynamicTexture.js.map +1 -1
- package/Materials/Textures/hardwareTextureWrapper.d.ts +1 -1
- package/Materials/Textures/hardwareTextureWrapper.js.map +1 -1
- package/Materials/Textures/internalTexture.d.ts +6 -2
- package/Materials/Textures/internalTexture.js +6 -4
- package/Materials/Textures/internalTexture.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.js +10 -10
- package/Materials/Textures/renderTargetTexture.js.map +1 -1
- package/Materials/material.d.ts +1 -1
- package/Materials/material.js +3 -1
- package/Materials/material.js.map +1 -1
- package/Materials/shaderMaterial.js +2 -2
- package/Materials/shaderMaterial.js.map +1 -1
- package/Materials/uniformBuffer.d.ts +2 -0
- package/Materials/uniformBuffer.js +16 -0
- package/Materials/uniformBuffer.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineMesh.d.ts +2 -1
- package/Meshes/GreasedLine/greasedLineMesh.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.d.ts +2 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.js.map +1 -1
- package/Meshes/WebGPU/webgpuDataBuffer.d.ts +1 -0
- package/Meshes/WebGPU/webgpuDataBuffer.js +2 -0
- package/Meshes/WebGPU/webgpuDataBuffer.js.map +1 -1
- package/Meshes/geometry.js +3 -3
- package/Meshes/geometry.js.map +1 -1
- package/Misc/brdfTextureTools.js +9 -7
- package/Misc/brdfTextureTools.js.map +1 -1
- package/Misc/rgbdTextureTools.js +37 -37
- package/Misc/rgbdTextureTools.js.map +1 -1
- package/ObjectModel/index.d.ts +1 -0
- package/ObjectModel/index.js +2 -0
- package/ObjectModel/index.js.map +1 -0
- package/ObjectModel/objectModelInterfaces.d.ts +21 -0
- package/ObjectModel/objectModelInterfaces.js +2 -0
- package/ObjectModel/objectModelInterfaces.js.map +1 -0
- package/Particles/computeShaderParticleSystem.js +2 -2
- package/Particles/computeShaderParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.js +1 -1
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/particleSystem.js +2 -5
- package/Particles/particleSystem.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderer.js +1 -6
- package/Rendering/fluidRenderer/fluidRenderer.js.map +1 -1
- package/Rendering/renderingManager.js +1 -1
- package/Rendering/renderingManager.js.map +1 -1
- package/XR/features/WebXRControllerTeleportation.d.ts +9 -1
- package/XR/features/WebXRControllerTeleportation.js +10 -0
- package/XR/features/WebXRControllerTeleportation.js.map +1 -1
- package/XR/webXRCamera.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +5 -1
- package/types.js +0 -2
- package/types.js.map +1 -1
- package/FlowGraph/flowGraphPath.d.ts +0 -45
- package/FlowGraph/flowGraphPath.js +0 -156
- package/FlowGraph/flowGraphPath.js.map +0 -1
- package/FlowGraph/flowGraphPathComponent.d.ts +0 -42
- package/FlowGraph/flowGraphPathComponent.js +0 -51
- package/FlowGraph/flowGraphPathComponent.js.map +0 -1
- package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js.map +0 -1
- /package/FlowGraph/{flowGraphWithOnDoneExecutionBlock.d.ts → flowGraphExecutionBlockWithOutSignal.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgpuQuerySet.js","sourceRoot":"","sources":["../../../../../dev/core/src/Engines/WebGPU/webgpuQuerySet.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAGrD,gBAAgB;AAChB,MAAM,OAAO,cAAc;IAWvB,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,YAAY,MAAoB,EAAE,KAAa,EAAE,IAAe,EAAE,MAAiB,EAAE,aAAkC,EAAE,qBAAqB,GAAG,IAAI,EAAE,KAAc;QAN7J,gBAAW,GAAgB,EAAE,CAAC;QAOlC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,sBAAsB,GAAG,qBAAqB,CAAC;QAEpD,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;YACnC,KAAK;YACL,IAAI;YACJ,KAAK;SACR,CAAC,CAAC;QAEH,IAAI,CAAC,YAAY,GAAG,aAAa,CAAC,eAAe,CAAC,CAA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;aACZ;YACD,MAAM,GAAG,CAAC;QACd,CAAC,CACJ,CAAC;IACN,CAAC;IAEM,OAAO;QACV,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACrD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;YAC9C,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1D;IACL,CAAC;CACJ","sourcesContent":["/* eslint-disable babylonjs/available */\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { WebGPUEngine } from \"../webgpuEngine\";\r\nimport type { WebGPUBufferManager } from \"./webgpuBufferManager\";\r\nimport * as WebGPUConstants from \"./webgpuConstants\";\r\nimport type { QueryType } from \"./webgpuConstants\";\r\n\r\n/** @internal */\r\nexport class WebGPUQuerySet {\r\n private _engine: WebGPUEngine;\r\n private _device: GPUDevice;\r\n private _bufferManager: WebGPUBufferManager;\r\n\r\n private _count: number;\r\n private _canUseMultipleBuffers: boolean;\r\n private _querySet: GPUQuerySet;\r\n private _queryBuffer: GPUBuffer;\r\n private _dstBuffers: GPUBuffer[] = [];\r\n\r\n public get querySet(): GPUQuerySet {\r\n return this._querySet;\r\n }\r\n\r\n constructor(engine: WebGPUEngine, count: number, type: QueryType, device: GPUDevice, bufferManager: WebGPUBufferManager, canUseMultipleBuffers = true, label?: string) {\r\n this._engine = engine;\r\n this._device = device;\r\n this._bufferManager = bufferManager;\r\n this._count = count;\r\n this._canUseMultipleBuffers = canUseMultipleBuffers;\r\n\r\n this._querySet = device.createQuerySet({\r\n label,\r\n type,\r\n count,\r\n });\r\n\r\n this._queryBuffer = bufferManager.createRawBuffer(8 * count, WebGPUConstants.BufferUsage.QueryResolve | WebGPUConstants.BufferUsage.CopySrc, undefined, \"QueryBuffer\");\r\n\r\n if (!canUseMultipleBuffers) {\r\n this._dstBuffers.push(\r\n this._bufferManager.createRawBuffer(\r\n 8 * this._count,\r\n WebGPUConstants.BufferUsage.MapRead | WebGPUConstants.BufferUsage.CopyDst,\r\n undefined,\r\n \"QueryBufferNoMultipleBuffers\"\r\n )\r\n );\r\n }\r\n }\r\n\r\n private _getBuffer(firstQuery: number, queryCount: number): GPUBuffer | null {\r\n if (!this._canUseMultipleBuffers && this._dstBuffers.length === 0) {\r\n return null;\r\n }\r\n\r\n const encoderResult = this._device.createCommandEncoder();\r\n\r\n let buffer: GPUBuffer;\r\n if (this._dstBuffers.length === 0) {\r\n buffer = this._bufferManager.createRawBuffer(\r\n 8 * this._count,\r\n WebGPUConstants.BufferUsage.MapRead | WebGPUConstants.BufferUsage.CopyDst,\r\n undefined,\r\n \"QueryBufferAdditionalBuffer\"\r\n );\r\n } else {\r\n buffer = this._dstBuffers[this._dstBuffers.length - 1];\r\n this._dstBuffers.length--;\r\n }\r\n\r\n encoderResult.resolveQuerySet(this._querySet, firstQuery, queryCount, this._queryBuffer, 0);\r\n encoderResult.copyBufferToBuffer(this._queryBuffer, 0, buffer, 0, 8 * queryCount);\r\n\r\n this._device.queue.submit([encoderResult.finish()]);\r\n\r\n return buffer;\r\n }\r\n\r\n public async readValues(firstQuery = 0, queryCount = 1): Promise<BigUint64Array | null> {\r\n const buffer = this._getBuffer(firstQuery, queryCount);\r\n if (buffer === null) {\r\n return null;\r\n }\r\n\r\n return buffer.mapAsync(WebGPUConstants.MapMode.Read).then(\r\n () => {\r\n const arrayBuf = new BigUint64Array(buffer.getMappedRange()).slice();\r\n\r\n buffer.unmap();\r\n\r\n this._dstBuffers[this._dstBuffers.length] = buffer;\r\n\r\n return arrayBuf;\r\n },\r\n (err) => {\r\n if (this._engine.isDisposed) {\r\n return null;\r\n }\r\n throw err;\r\n }\r\n );\r\n }\r\n\r\n public async readValue(firstQuery = 0): Promise<number | null> {\r\n const buffer = this._getBuffer(firstQuery, 1);\r\n if (buffer === null) {\r\n return null;\r\n }\r\n\r\n return buffer.mapAsync(WebGPUConstants.MapMode.Read).then(\r\n () => {\r\n const arrayBuf = new BigUint64Array(buffer.getMappedRange());\r\n const value = Number(arrayBuf[0]);\r\n\r\n buffer.unmap();\r\n\r\n this._dstBuffers[this._dstBuffers.length] = buffer;\r\n\r\n return value;\r\n },\r\n (err) => {\r\n if (this._engine.isDisposed) {\r\n return 0;\r\n }\r\n throw err;\r\n }\r\n );\r\n }\r\n\r\n public async readTwoValuesAndSubtract(firstQuery = 0): Promise<number | null> {\r\n const buffer = this._getBuffer(firstQuery, 2);\r\n if (buffer === null) {\r\n return null;\r\n }\r\n\r\n return buffer.mapAsync(WebGPUConstants.MapMode.Read).then(\r\n () => {\r\n const arrayBuf = new BigUint64Array(buffer.getMappedRange());\r\n const value = Number(arrayBuf[1] - arrayBuf[0]);\r\n\r\n buffer.unmap();\r\n\r\n this._dstBuffers[this._dstBuffers.length] = buffer;\r\n\r\n return value;\r\n },\r\n (err) => {\r\n if (this._engine.isDisposed) {\r\n return 0;\r\n }\r\n throw err;\r\n }\r\n );\r\n }\r\n\r\n public dispose() {\r\n this._querySet.destroy();\r\n this._bufferManager.releaseBuffer(this._queryBuffer);\r\n for (let i = 0; i < this._dstBuffers.length; ++i) {\r\n this._bufferManager.releaseBuffer(this._dstBuffers[i]);\r\n }\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"webgpuQuerySet.js","sourceRoot":"","sources":["../../../../../dev/core/src/Engines/WebGPU/webgpuQuerySet.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAGrD,gBAAgB;AAChB,MAAM,OAAO,cAAc;IAWvB,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,YAAY,MAAoB,EAAE,KAAa,EAAE,IAAe,EAAE,MAAiB,EAAE,aAAkC,E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C,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1D;IACL,CAAC;CACJ","sourcesContent":["/* eslint-disable babylonjs/available */\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { WebGPUEngine } from \"../webgpuEngine\";\r\nimport type { WebGPUBufferManager } from \"./webgpuBufferManager\";\r\nimport * as WebGPUConstants from \"./webgpuConstants\";\r\nimport type { QueryType } from \"./webgpuConstants\";\r\n\r\n/** @internal */\r\nexport class WebGPUQuerySet {\r\n private _engine: WebGPUEngine;\r\n private _device: GPUDevice;\r\n private _bufferManager: WebGPUBufferManager;\r\n\r\n private _count: number;\r\n private _canUseMultipleBuffers: boolean;\r\n private _querySet: GPUQuerySet;\r\n private _queryBuffer: GPUBuffer;\r\n private _dstBuffers: GPUBuffer[] = [];\r\n\r\n public get querySet(): GPUQuerySet {\r\n return this._querySet;\r\n }\r\n\r\n constructor(engine: WebGPUEngine, count: number, type: QueryType, device: GPUDevice, bufferManager: WebGPUBufferManager, canUseMultipleBuffers = true, label?: string) {\r\n this._engine = engine;\r\n this._device = device;\r\n this._bufferManager = bufferManager;\r\n this._count = count;\r\n this._canUseMultipleBuffers = canUseMultipleBuffers;\r\n\r\n this._querySet = device.createQuerySet({\r\n label: label ?? \"QuerySet\",\r\n type,\r\n count,\r\n });\r\n\r\n this._queryBuffer = bufferManager.createRawBuffer(8 * count, WebGPUConstants.BufferUsage.QueryResolve | WebGPUConstants.BufferUsage.CopySrc, undefined, \"QueryBuffer\");\r\n\r\n if (!canUseMultipleBuffers) {\r\n this._dstBuffers.push(\r\n this._bufferManager.createRawBuffer(\r\n 8 * this._count,\r\n WebGPUConstants.BufferUsage.MapRead | WebGPUConstants.BufferUsage.CopyDst,\r\n undefined,\r\n \"QueryBufferNoMultipleBuffers\"\r\n )\r\n );\r\n }\r\n }\r\n\r\n private _getBuffer(firstQuery: number, queryCount: number): GPUBuffer | null {\r\n if (!this._canUseMultipleBuffers && this._dstBuffers.length === 0) {\r\n return null;\r\n }\r\n\r\n const encoderResult = this._device.createCommandEncoder();\r\n\r\n let buffer: GPUBuffer;\r\n if (this._dstBuffers.length === 0) {\r\n buffer = this._bufferManager.createRawBuffer(\r\n 8 * this._count,\r\n WebGPUConstants.BufferUsage.MapRead | WebGPUConstants.BufferUsage.CopyDst,\r\n undefined,\r\n \"QueryBufferAdditionalBuffer\"\r\n );\r\n } else {\r\n buffer = this._dstBuffers[this._dstBuffers.length - 1];\r\n this._dstBuffers.length--;\r\n }\r\n\r\n encoderResult.resolveQuerySet(this._querySet, firstQuery, queryCount, this._queryBuffer, 0);\r\n encoderResult.copyBufferToBuffer(this._queryBuffer, 0, buffer, 0, 8 * queryCount);\r\n\r\n this._device.queue.submit([encoderResult.finish()]);\r\n\r\n return buffer;\r\n }\r\n\r\n public async readValues(firstQuery = 0, queryCount = 1): Promise<BigUint64Array | null> {\r\n const buffer = this._getBuffer(firstQuery, queryCount);\r\n if (buffer === null) {\r\n return null;\r\n }\r\n const engineId = this._engine.uniqueId;\r\n\r\n return buffer.mapAsync(WebGPUConstants.MapMode.Read).then(\r\n () => {\r\n const arrayBuf = new BigUint64Array(buffer.getMappedRange()).slice();\r\n\r\n buffer.unmap();\r\n\r\n this._dstBuffers[this._dstBuffers.length] = buffer;\r\n\r\n return arrayBuf;\r\n },\r\n (err) => {\r\n if (this._engine.isDisposed || this._engine.uniqueId !== engineId) {\r\n // Engine disposed or context loss/restoration\r\n return null;\r\n }\r\n throw err;\r\n }\r\n );\r\n }\r\n\r\n public async readValue(firstQuery = 0): Promise<number | null> {\r\n const buffer = this._getBuffer(firstQuery, 1);\r\n if (buffer === null) {\r\n return null;\r\n }\r\n const engineId = this._engine.uniqueId;\r\n\r\n return buffer.mapAsync(WebGPUConstants.MapMode.Read).then(\r\n () => {\r\n const arrayBuf = new BigUint64Array(buffer.getMappedRange());\r\n const value = Number(arrayBuf[0]);\r\n\r\n buffer.unmap();\r\n\r\n this._dstBuffers[this._dstBuffers.length] = buffer;\r\n\r\n return value;\r\n },\r\n (err) => {\r\n if (this._engine.isDisposed || this._engine.uniqueId !== engineId) {\r\n // Engine disposed or context loss/restoration\r\n return 0;\r\n }\r\n throw err;\r\n }\r\n );\r\n }\r\n\r\n public async readTwoValuesAndSubtract(firstQuery = 0): Promise<number | null> {\r\n const buffer = this._getBuffer(firstQuery, 2);\r\n if (buffer === null) {\r\n return null;\r\n }\r\n const engineId = this._engine.uniqueId;\r\n\r\n return buffer.mapAsync(WebGPUConstants.MapMode.Read).then(\r\n () => {\r\n const arrayBuf = new BigUint64Array(buffer.getMappedRange());\r\n const value = Number(arrayBuf[1] - arrayBuf[0]);\r\n\r\n buffer.unmap();\r\n\r\n this._dstBuffers[this._dstBuffers.length] = buffer;\r\n\r\n return value;\r\n },\r\n (err) => {\r\n if (this._engine.isDisposed || this._engine.uniqueId !== engineId) {\r\n // Engine disposed or context loss/restoration\r\n return 0;\r\n }\r\n throw err;\r\n }\r\n );\r\n }\r\n\r\n public dispose() {\r\n this._querySet.destroy();\r\n this._bufferManager.releaseBuffer(this._queryBuffer);\r\n for (let i = 0; i < this._dstBuffers.length; ++i) {\r\n this._bufferManager.releaseBuffer(this._dstBuffers[i]);\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -1,39 +1,16 @@
|
|
|
1
|
-
import type { WebGPUBufferManager } from "./webgpuBufferManager";
|
|
2
|
-
import type { Nullable } from "../../types";
|
|
3
1
|
import type { InternalTexture } from "../../Materials/Textures/internalTexture";
|
|
4
|
-
import {
|
|
5
|
-
import type { WebGPUTintWASM } from "./webgpuTintWASM";
|
|
6
|
-
import type { ExternalTexture } from "../../Materials/Textures/externalTexture";
|
|
7
|
-
/**
|
|
8
|
-
* Map a (renderable) texture format (GPUTextureFormat) to an index for fast lookup (in caches for eg)
|
|
9
|
-
* The number of entries should not go over 64! Else, the code in WebGPUCacheRenderPipeline.setMRT should be updated
|
|
10
|
-
*/
|
|
11
|
-
export declare const renderableTextureFormatToIndex: {
|
|
12
|
-
[name: string]: number;
|
|
13
|
-
};
|
|
2
|
+
import type { HardwareTextureWrapper } from "../../Materials/Textures/hardwareTextureWrapper";
|
|
14
3
|
/** @internal */
|
|
15
4
|
export declare class WebGPUTextureHelper {
|
|
16
|
-
private _device;
|
|
17
|
-
private _glslang;
|
|
18
|
-
private _tintWASM;
|
|
19
|
-
private _bufferManager;
|
|
20
|
-
private _mipmapSampler;
|
|
21
|
-
private _videoSampler;
|
|
22
|
-
private _ubCopyWithOfst;
|
|
23
|
-
private _pipelines;
|
|
24
|
-
private _compiledShaders;
|
|
25
|
-
private _videoPipelines;
|
|
26
|
-
private _videoCompiledShaders;
|
|
27
|
-
private _deferredReleaseTextures;
|
|
28
|
-
private _commandEncoderForCreation;
|
|
29
5
|
static ComputeNumMipmapLevels(width: number, height: number): number;
|
|
30
|
-
constructor(device: GPUDevice, glslang: any, tintWASM: Nullable<WebGPUTintWASM>, bufferManager: WebGPUBufferManager, enabledExtensions: GPUFeatureName[]);
|
|
31
|
-
private _getPipeline;
|
|
32
|
-
private _getVideoPipeline;
|
|
33
6
|
static GetTextureTypeFromFormat(format: GPUTextureFormat): number;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
7
|
+
static GetBlockInformationFromFormat(format: GPUTextureFormat): {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
length: number;
|
|
11
|
+
};
|
|
12
|
+
static IsHardwareTexture(texture: HardwareTextureWrapper | GPUTexture): texture is HardwareTextureWrapper;
|
|
13
|
+
static IsInternalTexture(texture: InternalTexture | GPUTexture): texture is InternalTexture;
|
|
37
14
|
static IsImageBitmap(imageBitmap: ImageBitmap | {
|
|
38
15
|
width: number;
|
|
39
16
|
height: number;
|
|
@@ -42,7 +19,6 @@ export declare class WebGPUTextureHelper {
|
|
|
42
19
|
width: number;
|
|
43
20
|
height: number;
|
|
44
21
|
}): imageBitmap is ImageBitmap[];
|
|
45
|
-
setCommandEncoder(encoder: GPUCommandEncoder): void;
|
|
46
22
|
static IsCompressedFormat(format: GPUTextureFormat): boolean;
|
|
47
23
|
static GetWebGPUTextureFormat(type: number, format: number, useSRGBBuffer?: boolean): GPUTextureFormat;
|
|
48
24
|
static GetNumChannelsFromWebGPUTextureFormat(format: GPUTextureFormat): number;
|
|
@@ -50,25 +26,4 @@ export declare class WebGPUTextureHelper {
|
|
|
50
26
|
static HasDepthAndStencilAspects(format: GPUTextureFormat): boolean;
|
|
51
27
|
static GetDepthFormatOnly(format: GPUTextureFormat): GPUTextureFormat;
|
|
52
28
|
static GetSample(sampleCount: number): 1 | 4;
|
|
53
|
-
copyVideoToTexture(video: ExternalTexture, texture: InternalTexture, format: GPUTextureFormat, invertY?: boolean, commandEncoder?: GPUCommandEncoder): void;
|
|
54
|
-
invertYPreMultiplyAlpha(gpuOrHdwTexture: GPUTexture | WebGPUHardwareTexture, width: number, height: number, format: GPUTextureFormat, invertY?: boolean, premultiplyAlpha?: boolean, faceIndex?: number, mipLevel?: number, layers?: number, ofstX?: number, ofstY?: number, rectWidth?: number, rectHeight?: number, commandEncoder?: GPUCommandEncoder, allowGPUOptimization?: boolean): void;
|
|
55
|
-
copyWithInvertY(srcTextureView: GPUTextureView, format: GPUTextureFormat, renderPassDescriptor: GPURenderPassDescriptor, commandEncoder?: GPUCommandEncoder): void;
|
|
56
|
-
createTexture(imageBitmap: ImageBitmap | {
|
|
57
|
-
width: number;
|
|
58
|
-
height: number;
|
|
59
|
-
layers: number;
|
|
60
|
-
}, hasMipmaps?: boolean, generateMipmaps?: boolean, invertY?: boolean, premultiplyAlpha?: boolean, is3D?: boolean, format?: GPUTextureFormat, sampleCount?: number, commandEncoder?: GPUCommandEncoder, usage?: number, additionalUsages?: number, label?: string): GPUTexture;
|
|
61
|
-
createCubeTexture(imageBitmaps: ImageBitmap[] | {
|
|
62
|
-
width: number;
|
|
63
|
-
height: number;
|
|
64
|
-
}, hasMipmaps?: boolean, generateMipmaps?: boolean, invertY?: boolean, premultiplyAlpha?: boolean, format?: GPUTextureFormat, sampleCount?: number, commandEncoder?: GPUCommandEncoder, usage?: number, additionalUsages?: number, label?: string): GPUTexture;
|
|
65
|
-
generateCubeMipmaps(gpuTexture: GPUTexture | WebGPUHardwareTexture, format: GPUTextureFormat, mipLevelCount: number, commandEncoder?: GPUCommandEncoder): void;
|
|
66
|
-
generateMipmaps(gpuOrHdwTexture: GPUTexture | WebGPUHardwareTexture, format: GPUTextureFormat, mipLevelCount: number, faceIndex?: number, commandEncoder?: GPUCommandEncoder): void;
|
|
67
|
-
createGPUTextureForInternalTexture(texture: InternalTexture, width?: number, height?: number, depth?: number, creationFlags?: number): WebGPUHardwareTexture;
|
|
68
|
-
createMSAATexture(texture: InternalTexture, samples: number, releaseExisting?: boolean, index?: number): void;
|
|
69
|
-
updateCubeTextures(imageBitmaps: ImageBitmap[] | Uint8Array[], gpuTexture: GPUTexture, width: number, height: number, format: GPUTextureFormat, invertY?: boolean, premultiplyAlpha?: boolean, offsetX?: number, offsetY?: number): void;
|
|
70
|
-
updateTexture(imageBitmap: ImageBitmap | Uint8Array | HTMLCanvasElement | OffscreenCanvas, texture: GPUTexture | InternalTexture, width: number, height: number, layers: number, format: GPUTextureFormat, faceIndex?: number, mipLevel?: number, invertY?: boolean, premultiplyAlpha?: boolean, offsetX?: number, offsetY?: number, allowGPUOptimization?: boolean): void;
|
|
71
|
-
readPixels(texture: GPUTexture, x: number, y: number, width: number, height: number, format: GPUTextureFormat, faceIndex?: number, mipLevel?: number, buffer?: Nullable<ArrayBufferView>, noDataConversion?: boolean): Promise<ArrayBufferView>;
|
|
72
|
-
releaseTexture(texture: InternalTexture | GPUTexture): void;
|
|
73
|
-
destroyDeferredTextures(): void;
|
|
74
29
|
}
|