@luma.gl/webgpu 9.0.0-beta.4 → 9.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter/helpers/accessor-to-format.js +99 -1
- package/dist/adapter/helpers/convert-texture-format.js +5 -5
- package/dist/adapter/helpers/generate-mipmaps.js +76 -82
- package/dist/adapter/helpers/get-bind-group.js +54 -41
- package/dist/adapter/helpers/get-vertex-buffer-layout.js +110 -80
- package/dist/adapter/helpers/webgpu-parameters.js +182 -125
- package/dist/adapter/resources/webgpu-buffer.js +110 -62
- package/dist/adapter/resources/webgpu-command-encoder.js +73 -49
- package/dist/adapter/resources/webgpu-compute-pass.js +54 -41
- package/dist/adapter/resources/webgpu-compute-pipeline.js +24 -19
- package/dist/adapter/resources/webgpu-external-texture.js +29 -19
- package/dist/adapter/resources/webgpu-framebuffer.js +11 -7
- package/dist/adapter/resources/webgpu-query.js +42 -1
- package/dist/adapter/resources/webgpu-render-pass.js +115 -105
- package/dist/adapter/resources/webgpu-render-pipeline.js +148 -83
- package/dist/adapter/resources/webgpu-sampler.js +18 -15
- package/dist/adapter/resources/webgpu-shader.js +55 -45
- package/dist/adapter/resources/webgpu-texture.js +129 -109
- package/dist/adapter/resources/webgpu-vertex-array.d.ts +4 -1
- package/dist/adapter/resources/webgpu-vertex-array.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-vertex-array.js +64 -41
- package/dist/adapter/webgpu-canvas-context.d.ts.map +1 -1
- package/dist/adapter/webgpu-canvas-context.js +100 -69
- package/dist/adapter/webgpu-device.d.ts.map +1 -1
- package/dist/adapter/webgpu-device.js +257 -230
- package/dist/adapter/webgpu-types.js +0 -2
- package/dist/dist.dev.js +661 -2178
- package/dist/glsl/glsllang.js +9 -6
- package/dist/index.cjs +58 -239
- package/dist/index.cjs.map +7 -0
- package/dist/index.js +9 -6
- package/dist.min.js +1 -22
- package/package.json +9 -7
- package/src/adapter/resources/webgpu-vertex-array.ts +5 -2
- package/src/adapter/webgpu-canvas-context.ts +1 -0
- package/src/adapter/webgpu-device.ts +16 -36
- package/dist/adapter/helpers/accessor-to-format.js.map +0 -1
- package/dist/adapter/helpers/convert-texture-format.js.map +0 -1
- package/dist/adapter/helpers/generate-mipmaps.js.map +0 -1
- package/dist/adapter/helpers/get-bind-group.js.map +0 -1
- package/dist/adapter/helpers/get-vertex-buffer-layout.js.map +0 -1
- package/dist/adapter/helpers/webgpu-parameters.js.map +0 -1
- package/dist/adapter/resources/webgpu-buffer.js.map +0 -1
- package/dist/adapter/resources/webgpu-command-encoder.js.map +0 -1
- package/dist/adapter/resources/webgpu-compute-pass.js.map +0 -1
- package/dist/adapter/resources/webgpu-compute-pipeline.js.map +0 -1
- package/dist/adapter/resources/webgpu-external-texture.js.map +0 -1
- package/dist/adapter/resources/webgpu-framebuffer.js.map +0 -1
- package/dist/adapter/resources/webgpu-query.js.map +0 -1
- package/dist/adapter/resources/webgpu-render-pass.js.map +0 -1
- package/dist/adapter/resources/webgpu-render-pipeline.js.map +0 -1
- package/dist/adapter/resources/webgpu-sampler.js.map +0 -1
- package/dist/adapter/resources/webgpu-shader.js.map +0 -1
- package/dist/adapter/resources/webgpu-texture.js.map +0 -1
- package/dist/adapter/resources/webgpu-vertex-array.js.map +0 -1
- package/dist/adapter/webgpu-canvas-context.js.map +0 -1
- package/dist/adapter/webgpu-device.js.map +0 -1
- package/dist/adapter/webgpu-types.js.map +0 -1
- package/dist/glsl/glsllang.js.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["index.js", "adapter/webgpu-device.js", "adapter/resources/webgpu-buffer.js", "adapter/resources/webgpu-texture.js", "adapter/helpers/convert-texture-format.js", "adapter/resources/webgpu-sampler.js", "adapter/resources/webgpu-external-texture.js", "adapter/resources/webgpu-shader.js", "adapter/resources/webgpu-render-pipeline.js", "adapter/helpers/webgpu-parameters.js", "adapter/helpers/get-bind-group.js", "adapter/helpers/get-vertex-buffer-layout.js", "adapter/resources/webgpu-compute-pipeline.js", "adapter/resources/webgpu-render-pass.js", "adapter/resources/webgpu-compute-pass.js", "adapter/resources/webgpu-vertex-array.js", "adapter/webgpu-canvas-context.js", "adapter/resources/webgpu-framebuffer.js"],
|
|
4
|
+
"sourcesContent": ["// luma.gl, MIT license\n// Copyright (c) vis.gl contributors\n// WEBGPU ADAPTER\nexport { WebGPUDevice } from './adapter/webgpu-device';\n// WEBGPU CLASSES (typically not accessed directly)\nexport { WebGPUBuffer } from './adapter/resources/webgpu-buffer';\nexport { WebGPUTexture } from './adapter/resources/webgpu-texture';\nexport { WebGPUSampler } from './adapter/resources/webgpu-sampler';\nexport { WebGPUShader } from './adapter/resources/webgpu-shader';\n", "// prettier-ignore\n// / <reference types=\"@webgpu/types\" />\nimport { Device, CanvasContext, log, uid } from '@luma.gl/core';\nimport { WebGPUBuffer } from './resources/webgpu-buffer';\nimport { WebGPUTexture } from './resources/webgpu-texture';\nimport { WebGPUExternalTexture } from './resources/webgpu-external-texture';\nimport { WebGPUSampler } from './resources/webgpu-sampler';\nimport { WebGPUShader } from './resources/webgpu-shader';\nimport { WebGPURenderPipeline } from './resources/webgpu-render-pipeline';\nimport { WebGPUComputePipeline } from './resources/webgpu-compute-pipeline';\nimport { WebGPURenderPass } from './resources/webgpu-render-pass';\nimport { WebGPUComputePass } from './resources/webgpu-compute-pass';\n// import {WebGPUCommandEncoder} from './resources/webgpu-command-encoder';\nimport { WebGPUVertexArray } from './resources/webgpu-vertex-array';\nimport { WebGPUCanvasContext } from './webgpu-canvas-context';\n// import {loadGlslangModule} from '../glsl/glslang';\n/** WebGPU Device implementation */\nexport class WebGPUDevice extends Device {\n handle;\n adapter;\n lost;\n canvasContext = null;\n commandEncoder = null;\n renderPass = null;\n _info;\n _isLost = false;\n static type = 'webgpu';\n /** Check if WebGPU is available */\n static isSupported() {\n return Boolean(typeof navigator !== 'undefined' && navigator.gpu);\n }\n static async create(props) {\n if (!navigator.gpu) {\n throw new Error('WebGPU not available. Open in Chrome Canary and turn on chrome://flags/#enable-unsafe-webgpu');\n }\n log.groupCollapsed(1, 'WebGPUDevice created')();\n const adapter = await navigator.gpu.requestAdapter({\n powerPreference: 'high-performance'\n // forceSoftware: false\n });\n if (!adapter) {\n throw new Error('Failed to request WebGPU adapter');\n }\n const adapterInfo = await adapter.requestAdapterInfo();\n log.probe(2, 'Adapter available', adapterInfo)();\n const gpuDevice = await adapter.requestDevice({\n requiredFeatures: adapter.features\n // TODO ensure we obtain best limits\n // requiredLimits: adapter.limits\n });\n log.probe(1, 'GPUDevice available')();\n if (typeof props.canvas === 'string') {\n await CanvasContext.pageLoaded;\n log.probe(1, 'DOM is loaded')();\n }\n const device = new WebGPUDevice(gpuDevice, adapter, adapterInfo, props);\n log.probe(1, 'Device created. For more info, set chrome://flags/#enable-webgpu-developer-features')();\n log.table(1, device.info)();\n log.groupEnd(1)();\n return device;\n }\n constructor(device, adapter, adapterInfo, props) {\n super({ ...props, id: props.id || uid('webgpu-device') });\n this.handle = device;\n this.adapter = adapter;\n const [driver, driverVersion] = (adapterInfo.driver || '').split(' Version ');\n // See https://developer.chrome.com/blog/new-in-webgpu-120#adapter_information_updates\n const vendor = adapterInfo.vendor || this.adapter.__brand || 'unknown';\n const renderer = driver || '';\n const version = driverVersion || '';\n const gpu = vendor === 'apple' ? 'apple' : 'unknown'; // 'nvidia' | 'amd' | 'intel' | 'apple' | 'unknown',\n const gpuArchitecture = adapterInfo.architecture || 'unknown';\n const gpuBackend = adapterInfo.backend || 'unknown';\n const gpuType = (adapterInfo.type || '').split(' ')[0].toLowerCase() || 'unknown';\n this._info = {\n type: 'webgpu',\n vendor,\n renderer,\n version,\n gpu,\n gpuType,\n gpuBackend,\n gpuArchitecture,\n shadingLanguage: 'wgsl',\n shadingLanguageVersion: 100\n };\n // \"Context\" loss handling\n this.lost = new Promise(async (resolve) => {\n const lostInfo = await this.handle.lost;\n this._isLost = true;\n resolve({ reason: 'destroyed', message: lostInfo.message });\n });\n // Note: WebGPU devices can be created without a canvas, for compute shader purposes\n // if (props.canvas) {\n this.canvasContext = new WebGPUCanvasContext(this, this.adapter, {\n canvas: props.canvas,\n height: props.height,\n width: props.width,\n container: props.container\n });\n // }\n this.features = this._getFeatures();\n }\n // TODO\n // Load the glslang module now so that it is available synchronously when compiling shaders\n // const {glsl = true} = props;\n // this.glslang = glsl && await loadGlslangModule();\n destroy() {\n this.handle.destroy();\n }\n get info() {\n return this._info;\n }\n features;\n get limits() {\n return this.handle.limits;\n }\n isTextureFormatSupported(format) {\n return !format.includes('webgl');\n }\n /** @todo implement proper check? */\n isTextureFormatFilterable(format) {\n return this.isTextureFormatSupported(format);\n }\n /** @todo implement proper check? */\n isTextureFormatRenderable(format) {\n return this.isTextureFormatSupported(format);\n }\n get isLost() {\n return this._isLost;\n }\n createBuffer(props) {\n const newProps = this._getBufferProps(props);\n return new WebGPUBuffer(this, newProps);\n }\n _createTexture(props) {\n return new WebGPUTexture(this, props);\n }\n createExternalTexture(props) {\n return new WebGPUExternalTexture(this, props);\n }\n createShader(props) {\n return new WebGPUShader(this, props);\n }\n createSampler(props) {\n return new WebGPUSampler(this, props);\n }\n createRenderPipeline(props) {\n return new WebGPURenderPipeline(this, props);\n }\n createFramebuffer(props) {\n throw new Error('Not implemented');\n }\n createComputePipeline(props) {\n return new WebGPUComputePipeline(this, props);\n }\n createVertexArray(props) {\n return new WebGPUVertexArray(this, props);\n }\n // WebGPU specifics\n /**\n * Allows a render pass to begin against a canvas context\n * @todo need to support a \"Framebuffer\" equivalent (aka preconfigured RenderPassDescriptors?).\n */\n beginRenderPass(props) {\n this.commandEncoder = this.commandEncoder || this.handle.createCommandEncoder();\n return new WebGPURenderPass(this, props);\n }\n beginComputePass(props) {\n this.commandEncoder = this.commandEncoder || this.handle.createCommandEncoder();\n return new WebGPUComputePass(this, props);\n }\n // createCommandEncoder(props: CommandEncoderProps): WebGPUCommandEncoder {\n // return new WebGPUCommandEncoder(this, props);\n // }\n createTransformFeedback(props) {\n throw new Error('Transform feedback not supported in WebGPU');\n }\n createCanvasContext(props) {\n return new WebGPUCanvasContext(this, this.adapter, props);\n }\n /**\n * Gets default renderpass encoder.\n * Creates a new encoder against default canvasContext if not already created\n * @note Called internally by Model.\n * @deprecated Create explicit pass with device.beginRenderPass\n */\n getDefaultRenderPass() {\n // this.renderPass =\n // this.renderPass ||\n // this.beginRenderPass({\n // framebuffer: this.canvasContext?.getCurrentFramebuffer()\n // });\n // return this.renderPass;\n throw new Error('a');\n }\n submit() {\n // this.renderPass?.end();\n const commandBuffer = this.commandEncoder?.finish();\n if (commandBuffer) {\n this.handle.queue.submit([commandBuffer]);\n }\n this.commandEncoder = null;\n // this.renderPass = null;\n }\n _getFeatures() {\n // Initialize with actual WebGPU Features (note that unknown features may not be in DeviceFeature type)\n const features = new Set(this.handle.features);\n // Fixups for pre-standard names: https://github.com/webgpu-native/webgpu-headers/issues/133\n // @ts-expect-error Chrome Canary v99\n if (features.has('depth-clamping')) {\n // @ts-expect-error Chrome Canary v99\n features.delete('depth-clamping');\n features.add('depth-clip-control');\n }\n // Some subsets of WebGPU extensions correspond to WebGL extensions\n if (features.has('texture-compression-bc')) {\n features.add('texture-compression-bc5-webgl');\n }\n const WEBGPU_ALWAYS_FEATURES = [\n 'webgpu',\n 'wgsl',\n 'timer-query-webgl',\n 'float32-filterable-linear-webgl',\n 'float16-filterable-linear-webgl',\n 'texture-filterable-anisotropic-webgl',\n 'float32-renderable-webgl',\n 'float16-renderable-webgl'\n ];\n for (const feature of WEBGPU_ALWAYS_FEATURES) {\n features.add(feature);\n }\n return features;\n }\n copyExternalImageToTexture(options) {\n const { source, sourceX = 0, sourceY = 0, texture, mipLevel = 0, aspect = 'all', colorSpace = 'display-p3', premultipliedAlpha = false, \n // destinationX,\n // destinationY,\n // desitnationZ,\n width = texture.width, height = texture.height, depth = 1 } = options;\n const webGpuTexture = texture;\n this.handle?.queue.copyExternalImageToTexture(\n // source: GPUImageCopyExternalImage\n {\n source,\n origin: [sourceX, sourceY]\n }, \n // destination: GPUImageCopyTextureTagged\n {\n texture: webGpuTexture.handle,\n origin: [0, 0, 0], // [x, y, z],\n mipLevel,\n aspect,\n colorSpace,\n premultipliedAlpha\n }, \n // copySize: GPUExtent3D\n [width, height, depth]);\n }\n}\n", "// WEBGPU Buffer implementation\nimport { Buffer } from '@luma.gl/core';\nfunction getByteLength(props) {\n return props.byteLength || props.data?.byteLength || 0;\n}\nexport class WebGPUBuffer extends Buffer {\n device;\n handle;\n byteLength;\n constructor(device, props) {\n super(device, props);\n this.device = device;\n this.byteLength = getByteLength(props);\n const mapBuffer = Boolean(props.data);\n // WebGPU buffers must be aligned to 4 bytes\n const size = Math.ceil(this.byteLength / 4) * 4;\n this.handle = this.props.handle || this.device.handle.createBuffer({\n size,\n // usage defaults to vertex\n usage: this.props.usage || (GPUBufferUsage.VERTEX | GPUBufferUsage.COPY_DST),\n mappedAtCreation: this.props.mappedAtCreation || mapBuffer,\n label: this.props.id\n });\n if (props.data) {\n this._writeMapped(props.data);\n // this.handle.writeAsync({data: props.data, map: false, unmap: false});\n }\n if (mapBuffer && !props.mappedAtCreation) {\n this.handle.unmap();\n }\n }\n destroy() {\n this.handle.destroy();\n }\n // WebGPU provides multiple ways to write a buffer...\n write(data, byteOffset = 0) {\n this.device.handle.queue.writeBuffer(this.handle, byteOffset, data.buffer, data.byteOffset, data.byteLength);\n }\n async readAsync(byteOffset = 0, byteLength = this.byteLength) {\n // We need MAP_READ flag, but only COPY_DST buffers can have MAP_READ flag, so we need to create a temp buffer\n const tempBuffer = new WebGPUBuffer(this.device, { usage: Buffer.MAP_READ | Buffer.COPY_DST, byteLength });\n // Now do a GPU-side copy into the temp buffer we can actually read.\n // TODO - we are spinning up an independent command queue here, what does this mean\n const commandEncoder = this.device.handle.createCommandEncoder();\n commandEncoder.copyBufferToBuffer(this.handle, byteOffset, tempBuffer.handle, 0, byteLength);\n this.device.handle.queue.submit([commandEncoder.finish()]);\n // Map the temp buffer and read the data.\n await tempBuffer.handle.mapAsync(GPUMapMode.READ, byteOffset, byteLength);\n const arrayBuffer = tempBuffer.handle.getMappedRange().slice(0);\n tempBuffer.handle.unmap();\n tempBuffer.destroy();\n return new Uint8Array(arrayBuffer);\n }\n _writeMapped(typedArray) {\n const arrayBuffer = this.handle.getMappedRange();\n // @ts-expect-error\n new typedArray.constructor(arrayBuffer).set(typedArray);\n }\n // WEBGPU API\n mapAsync(mode, offset = 0, size) {\n return this.handle.mapAsync(mode, offset, size);\n }\n getMappedRange(offset = 0, size) {\n return this.handle.getMappedRange(offset, size);\n }\n unmap() {\n this.handle.unmap();\n }\n}\n/*\n// Convenience API\n /** Read data from the buffer *\n async readAsync(options: {\n byteOffset?: number,\n byteLength?: number,\n map?: boolean,\n unmap?: boolean\n }): Promise<ArrayBuffer> {\n if (options.map ?? true) {\n await this.mapAsync(Buffer.MAP_READ, options.byteOffset, options.byteLength);\n }\n const arrayBuffer = this.getMappedRange(options.byteOffset, options.byteLength);\n if (options.unmap ?? true) {\n this.unmap();\n }\n return arrayBuffer;\n }\n\n /** Write data to the buffer *\n async writeAsync(options: {\n data: ArrayBuffer,\n byteOffset?: number,\n byteLength?: number,\n map?: boolean,\n unmap?: boolean\n }): Promise<void> {\n if (options.map ?? true) {\n await this.mapAsync(Buffer.MAP_WRITE, options.byteOffset, options.byteLength);\n }\n const arrayBuffer = this.getMappedRange(options.byteOffset, options.byteLength);\n const destArray = new Uint8Array(arrayBuffer);\n const srcArray = new Uint8Array(options.data);\n destArray.set(srcArray);\n if (options.unmap ?? true) {\n this.unmap();\n }\n }\n */\n// Mapped API (WebGPU)\n/** Maps the memory so that it can be read *\n // abstract mapAsync(mode, byteOffset, byteLength): Promise<void>\n\n /** Get the mapped range of data for reading or writing *\n // abstract getMappedRange(byteOffset, byteLength): ArrayBuffer;\n\n /** unmap makes the contents of the buffer available to the GPU again *\n // abstract unmap(): void;\n*/\n", "// luma.gl, MIT license\nimport { Texture } from '@luma.gl/core';\nimport { getWebGPUTextureFormat } from '../helpers/convert-texture-format';\nimport { WebGPUSampler } from './webgpu-sampler';\nconst BASE_DIMENSIONS = {\n '1d': '1d',\n '2d': '2d',\n '2d-array': '2d',\n 'cube': '2d',\n 'cube-array': '2d',\n '3d': '3d'\n};\nexport class WebGPUTexture extends Texture {\n device;\n handle;\n view;\n sampler;\n height = 1;\n width = 1;\n // static async createFromImageURL(src, usage = 0) {\n // const img = document.createElement('img');\n // img.src = src;\n // await img.decode();\n // return WebGPUTexture(img, usage);\n // }\n constructor(device, props) {\n super(device, props);\n this.device = device;\n if (props.data instanceof Promise) {\n props.data.then(resolvedImageData => {\n // @ts-expect-error\n this.props = { ...props, data: resolvedImageData };\n this.initialize(this.props);\n });\n return;\n }\n this.initialize(props);\n }\n initialize(props) {\n // @ts-expect-error\n this.handle = this.props.handle || this.createHandle();\n this.handle.label ||= this.id;\n if (this.props.data) {\n this.setData({ data: this.props.data });\n }\n this.width = this.handle.width;\n this.height = this.handle.height;\n // Why not just read all properties directly from the texture\n // this.depthOrArrayLayers = this.handle.depthOrArrayLayers;\n // this.mipLevelCount = this.handle.mipLevelCount;\n // this.sampleCount = this.handle.sampleCount;\n // this.dimension = this.handle.dimension;\n // this.format = this.handle.format;\n // this.usage = this.handle.usage;\n // Create a default sampler. This mimics the WebGL1 API where sampler props are stored on the texture\n // this.setSampler(props.sampler);\n this.sampler = props.sampler instanceof WebGPUSampler ? props.sampler : new WebGPUSampler(this.device, props.sampler);\n // TODO - To support texture arrays we need to create custom views...\n // But we are not ready to expose TextureViews to the public API.\n // @ts-expect-error\n this.view = this.createView();\n // format: this.props.format,\n // dimension: this.props.dimension,\n // aspect = \"all\";\n // baseMipLevel: 0;\n // mipLevelCount;\n // baseArrayLayer = 0;\n // arrayLayerCount;\n }\n createHandle() {\n // Deduce size from data - TODO this is a hack\n // @ts-expect-error\n const width = this.props.width || this.props.data?.width || 1;\n // @ts-expect-error\n const height = this.props.height || this.props.data?.height || 1;\n return this.device.handle.createTexture({\n label: this.id,\n size: {\n width,\n height,\n depthOrArrayLayers: this.props.depth\n },\n dimension: BASE_DIMENSIONS[this.props.dimension],\n format: getWebGPUTextureFormat(this.props.format),\n usage: this.props.usage,\n mipLevelCount: this.props.mipLevels,\n sampleCount: this.props.samples\n });\n }\n destroy() {\n this.handle.destroy();\n }\n /**\n * Set default sampler\n * Accept a sampler instance or set of props;\n */\n setSampler(sampler) {\n this.sampler = sampler instanceof WebGPUSampler ? sampler : new WebGPUSampler(this.device, sampler);\n return this;\n }\n setData(options) {\n return this.setImage({ source: options.data });\n }\n /** Set image */\n setImage(options) {\n const { source, width = options.source.width, height = options.source.height, depth = 1, sourceX = 0, sourceY = 0, mipLevel = 0, x = 0, y = 0, z = 0, aspect = 'all', colorSpace = 'srgb', premultipliedAlpha = false } = options;\n // TODO - max out width\n this.device.handle.queue.copyExternalImageToTexture(\n // source: GPUImageCopyExternalImage\n {\n source,\n origin: [sourceX, sourceY]\n }, \n // destination: GPUImageCopyTextureTagged\n {\n texture: this.handle,\n origin: [x, y, z],\n mipLevel,\n aspect,\n colorSpace,\n premultipliedAlpha\n }, \n // copySize: GPUExtent3D\n [\n width,\n height,\n depth\n ]);\n return { width, height };\n }\n // WebGPU specific \n /** TODO - intention is to expose TextureViews in the public API */\n createView() {\n return this.handle.createView({ label: this.id });\n }\n}\n", "/** Ensure a texture format is WebGPU compatible */\nexport function getWebGPUTextureFormat(format) {\n if (format.includes('webgl')) {\n throw new Error('webgl-only format');\n }\n return format;\n}\n", "import { Sampler } from '@luma.gl/core';\n/**\n *\n */\nexport class WebGPUSampler extends Sampler {\n device;\n handle;\n constructor(device, props) {\n super(device, props);\n this.device = device;\n // Prepare sampler props\n const samplerProps = { ...this.props };\n if (samplerProps.type !== 'comparison-sampler') {\n delete samplerProps.compare;\n }\n this.handle = this.handle || this.device.handle.createSampler(samplerProps);\n this.handle.label = this.props.id;\n }\n destroy() {\n // this.handle.destroy();\n }\n}\n", "// luma.gl, MIT license\nimport { ExternalTexture } from '@luma.gl/core';\nimport { WebGPUSampler } from './webgpu-sampler';\n/**\n * Cheap, temporary texture view for videos\n * Only valid within same callback, destroyed automatically as a microtask.\n */\nexport class WebGPUExternalTexture extends ExternalTexture {\n device;\n handle;\n sampler;\n constructor(device, props) {\n super(device, props);\n this.device = device;\n this.handle = this.props.handle || this.device.handle.importExternalTexture({\n source: props.source,\n colorSpace: props.colorSpace\n });\n this.sampler = null;\n }\n destroy() {\n // External textures are destroyed automatically,\n // as a microtask, instead of manually or upon garbage collection like other resources.\n // this.handle.destroy();\n }\n /** Set default sampler */\n setSampler(sampler) {\n // We can accept a sampler instance or set of props;\n this.sampler = sampler instanceof WebGPUSampler ? sampler : new WebGPUSampler(this.device, sampler);\n return this;\n }\n}\n", "// luma.gl, MIT license\n// Copyright (c) vis.gl contributors\nimport { Shader, log } from '@luma.gl/core';\n/**\n * Immutable shader\n */\nexport class WebGPUShader extends Shader {\n device;\n handle;\n constructor(device, props) {\n super(device, props);\n this.device = device;\n this.device.handle.pushErrorScope('validation');\n this.handle = this.props.handle || this.createHandle();\n this.handle.label = this.props.id;\n this._checkCompilationError(this.device.handle.popErrorScope());\n }\n async _checkCompilationError(errorScope) {\n const error = await errorScope;\n if (error) {\n // The `Shader` base class will determine if debug window should be opened based on props\n this.debugShader();\n const shaderLog = await this.getCompilationInfo();\n log.error(`Shader compilation error: ${error.message}`, shaderLog)();\n // Note: Even though this error is asynchronous and thrown after the constructor completes,\n // it will result in a useful stack trace leading back to the constructor\n throw new Error(`Shader compilation error: ${error.message}`);\n }\n }\n destroy() {\n // Note: WebGPU does not offer a method to destroy shaders\n // this.handle.destroy();\n }\n /** Returns compilation info for this shader */\n async getCompilationInfo() {\n const compilationInfo = await this.handle.getCompilationInfo();\n return compilationInfo.messages;\n }\n // PRIVATE METHODS\n createHandle() {\n const { source, stage } = this.props;\n let language = this.props.language;\n // Compile from src\n if (language === 'auto') {\n // wgsl uses C++ \"auto\" style arrow notation\n language = source.includes('->') ? 'wgsl' : 'glsl';\n }\n switch (language) {\n case 'wgsl':\n return this.device.handle.createShaderModule({ code: source });\n case 'glsl':\n return this.device.handle.createShaderModule({\n code: source,\n // @ts-expect-error\n transform: (glsl) => this.device.glslang.compileGLSL(glsl, stage)\n });\n default:\n throw new Error(language);\n }\n }\n}\n", "// luma.gl MIT license\nimport { RenderPipeline, cast, log, isObjectEmpty } from '@luma.gl/core';\nimport { applyParametersToRenderPipelineDescriptor } from '../helpers/webgpu-parameters';\nimport { getWebGPUTextureFormat } from '../helpers/convert-texture-format';\nimport { getBindGroup } from '../helpers/get-bind-group';\nimport { getVertexBufferLayout } from '../helpers/get-vertex-buffer-layout';\n// RENDER PIPELINE\n/** Creates a new render pipeline when parameters change */\nexport class WebGPURenderPipeline extends RenderPipeline {\n device;\n handle;\n vs;\n fs = null;\n // private _bufferSlots: Record<string, number>;\n // private _buffers: Buffer[];\n // private _firstIndex: number;\n // private _lastIndex: number;\n /** For internal use to create BindGroups */\n _bindGroupLayout = null;\n _bindGroup = null;\n constructor(device, props) {\n super(device, props);\n this.device = device;\n this.handle = this.props.handle;\n if (!this.handle) {\n const descriptor = this._getRenderPipelineDescriptor();\n log.groupCollapsed(1, `new WebGPURenderPipeline(${this.id})`)();\n log.probe(1, JSON.stringify(descriptor, null, 2))();\n log.groupEnd(1)();\n this.handle = this.device.handle.createRenderPipeline(descriptor);\n }\n this.handle.label = this.props.id;\n this.vs = cast(props.vs);\n this.fs = cast(props.fs);\n // this._bufferSlots = getBufferSlots(this.props.shaderLayout, this.props.bufferLayout);\n // this._buffers = new Array<Buffer>(Object.keys(this._bufferSlots).length).fill(null);\n }\n destroy() {\n // WebGPURenderPipeline has no destroy method.\n }\n // setIndexBuffer(indexBuffer: Buffer): void {\n // this._indexBuffer = cast<WebGPUBuffer>(indexBuffer);\n // }\n /*\n setAttributes(attributes: Record<string, Buffer>): void {\n for (const [name, buffer] of Object.entries(attributes)) {\n const bufferIndex = this._bufferSlots[name];\n if (bufferIndex >= 0) {\n this._buffers[bufferIndex] = buffer;\n } else {\n throw new Error(\n `Setting attribute '${name}' not listed in shader layout for program ${this.id}`\n );\n }\n }\n // for (let i = 0; i < this._bufferSlots.length; ++i) {\n // const bufferName = this._bufferSlots[i];\n // if (attributes[bufferName]) {\n // this.handle\n // }\n // }\n }\n */\n // setConstantAttributes(attributes: Record<string, TypedArray>): void {\n // throw new Error('not implemented');\n // }\n setBindings(bindings) {\n // if (isObjectEmpty(bindings)) {\n // return;\n // }\n // Do we want to save things on CPU side?\n Object.assign(this.props.bindings, bindings);\n }\n setUniforms(uniforms) {\n if (!isObjectEmpty(uniforms)) {\n throw new Error('WebGPU does not support uniforms');\n }\n }\n draw(options) {\n const webgpuRenderPass = cast(options.renderPass) || this.device.getDefaultRenderPass();\n // Set pipeline\n webgpuRenderPass.handle.setPipeline(this.handle);\n // Set bindings (uniform buffers, textures etc)\n const bindGroup = this._getBindGroup();\n if (bindGroup) {\n webgpuRenderPass.handle.setBindGroup(0, bindGroup);\n }\n // Set attributes\n // Note: Rebinds constant attributes before each draw call\n options.vertexArray.bindBeforeRender(options.renderPass);\n // Draw\n if (options.indexCount) {\n webgpuRenderPass.handle.drawIndexed(options.indexCount, options.instanceCount, options.firstIndex, options.baseVertex, options.firstInstance);\n }\n else {\n webgpuRenderPass.handle.draw(options.vertexCount || 0, options.instanceCount || 1, // If 0, nothing will be drawn\n options.firstInstance);\n }\n // Note: Rebinds constant attributes before each draw call\n options.vertexArray.unbindAfterRender(options.renderPass);\n }\n // _getBuffers() {\n // return this._buffers;\n // }\n /** Return a bind group created by setBindings */\n _getBindGroup() {\n // Get hold of the bind group layout. We don't want to do this unless we know there is at least one bind group\n this._bindGroupLayout = this._bindGroupLayout || this.handle.getBindGroupLayout(0);\n // Set up the bindings\n this._bindGroup = this._bindGroup || getBindGroup(this.device.handle, this._bindGroupLayout, this.props.shaderLayout, this.props.bindings);\n return this._bindGroup;\n }\n /**\n * Populate the complex WebGPU GPURenderPipelineDescriptor\n */\n _getRenderPipelineDescriptor() {\n // Set up the vertex stage\n const vertex = {\n module: cast(this.props.vs).handle,\n entryPoint: this.props.vsEntryPoint || 'main',\n buffers: getVertexBufferLayout(this.props.shaderLayout, this.props.bufferLayout)\n };\n // Set up the fragment stage\n let fragment;\n if (this.props.fs) {\n fragment = {\n module: cast(this.props.fs).handle,\n entryPoint: this.props.fsEntryPoint || 'main',\n targets: [\n {\n // TODO exclamation mark hack!\n format: getWebGPUTextureFormat(this.device?.canvasContext?.format)\n }\n ]\n };\n }\n // WebGPU has more restrictive topology support than WebGL\n switch (this.props.topology) {\n case 'triangle-fan-webgl':\n case 'line-loop-webgl':\n throw new Error(`WebGPU does not support primitive topology ${this.props.topology}`);\n default:\n }\n // Create a partially populated descriptor\n const descriptor = {\n vertex,\n fragment,\n primitive: {\n topology: this.props.topology\n },\n layout: 'auto'\n };\n // Set parameters on the descriptor\n applyParametersToRenderPipelineDescriptor(descriptor, this.props.parameters);\n return descriptor;\n }\n}\n", "function addDepthStencil(descriptor) {\n descriptor.depthStencil = descriptor.depthStencil || {\n // required, set something\n format: 'depth24plus',\n stencilFront: {},\n stencilBack: {},\n // TODO can this cause trouble? Should we set to WebGPU defaults? Are there defaults?\n depthWriteEnabled: false,\n depthCompare: 'less-equal'\n };\n return descriptor.depthStencil;\n}\n/**\n * Supports for luma.gl's flat parameter space\n * Populates the corresponding sub-objects in a GPURenderPipelineDescriptor\n */\n// @ts-expect-error\nexport const PARAMETER_TABLE = {\n // RASTERIZATION PARAMETERS\n cullMode: (parameter, value, descriptor) => {\n descriptor.primitive = descriptor.primitive || {};\n descriptor.primitive.cullMode = value;\n },\n frontFace: (parameter, value, descriptor) => {\n descriptor.primitive = descriptor.primitive || {};\n descriptor.primitive.frontFace = value;\n },\n // DEPTH\n depthWriteEnabled: (parameter, value, descriptor) => {\n const depthStencil = addDepthStencil(descriptor);\n depthStencil.depthWriteEnabled = value;\n },\n depthCompare: (parameter, value, descriptor) => {\n const depthStencil = addDepthStencil(descriptor);\n depthStencil.depthCompare = value;\n },\n depthFormat: (parameter, value, descriptor) => {\n const depthStencil = addDepthStencil(descriptor);\n depthStencil.format = value;\n },\n depthBias: (parameter, value, descriptor) => {\n const depthStencil = addDepthStencil(descriptor);\n depthStencil.depthBias = value;\n },\n depthBiasSlopeScale: (parameter, value, descriptor) => {\n const depthStencil = addDepthStencil(descriptor);\n depthStencil.depthBiasSlopeScale = value;\n },\n depthBiasClamp: (parameter, value, descriptor) => {\n const depthStencil = addDepthStencil(descriptor);\n depthStencil.depthBiasClamp = value;\n },\n // STENCIL\n stencilReadMask: (parameter, value, descriptor) => {\n const depthStencil = addDepthStencil(descriptor);\n depthStencil.stencilReadMask = value;\n },\n stencilWriteMask: (parameter, value, descriptor) => {\n const depthStencil = addDepthStencil(descriptor);\n depthStencil.stencilWriteMask = value;\n },\n stencilCompare: (parameter, value, descriptor) => {\n const depthStencil = addDepthStencil(descriptor);\n depthStencil.stencilFront.compare = value;\n depthStencil.stencilBack.compare = value;\n },\n stencilPassOperation: (parameter, value, descriptor) => {\n const depthStencil = addDepthStencil(descriptor);\n depthStencil.stencilFront.passOp = value;\n depthStencil.stencilBack.passOp = value;\n },\n stencilFailOperation: (parameter, value, descriptor) => {\n const depthStencil = addDepthStencil(descriptor);\n depthStencil.stencilFront.failOp = value;\n depthStencil.stencilBack.failOp = value;\n },\n stencilDepthFailOperation: (parameter, value, descriptor) => {\n const depthStencil = addDepthStencil(descriptor);\n depthStencil.stencilFront.depthFailOp = value;\n depthStencil.stencilBack.depthFailOp = value;\n },\n // MULTISAMPLE\n sampleCount: (parameter, value, descriptor) => {\n descriptor.multisample = descriptor.multisample || {};\n descriptor.multisample.count = value;\n },\n sampleMask: (parameter, value, descriptor) => {\n descriptor.multisample = descriptor.multisample || {};\n descriptor.multisample.mask = value;\n },\n sampleAlphaToCoverageEnabled: (parameter, value, descriptor) => {\n descriptor.multisample = descriptor.multisample || {};\n descriptor.multisample.alphaToCoverageEnabled = value;\n },\n // COLOR\n colorMask: (parameter, value, descriptor) => {\n const targets = addColorState(descriptor);\n targets[0].writeMask = value;\n },\n blendColorOperation: (parameter, value, descriptor) => {\n addColorState(descriptor);\n // const targets = addColorState(descriptor);\n // const target = targets[0];\n // const blend: GPUBlendState = target.blend || {color: {alpha: 0}};\n // blend.color = blend.color || {};\n // target.blend.color.operation = value;\n }\n /*\n blendColorSrcTarget: (parameter, value, descriptor: GPURenderPipelineDescriptor) => {\n addColorState(descriptor);\n targets[0].blend = targets[0].blend || {};\n targets[0].blend.color = targets[0].blend.color || {};\n targets[0].blend.color.srcTarget = value;\n },\n \n blendColorDstTarget: (parameter, value, descriptor: GPURenderPipelineDescriptor) => {\n addColorState(descriptor);\n targets[0].blend = targets[0].blend || {};\n targets[0].blend.color = targets[0].blend.color || {};\n targets[0].blend.color.dstTarget = value;\n },\n \n blendAlphaOperation: (parameter, value, descriptor: GPURenderPipelineDescriptor) => {\n addColorState(descriptor);\n targets[0].blend = targets[0].blend || {};\n targets[0].blend.alpha = targets[0].blend.alpha || {};\n targets[0].blend.alpha.operation = value;\n },\n \n blendAlphaSrcTarget: (parameter, value, descriptor: GPURenderPipelineDescriptor) => {\n addColorState(descriptor);\n targets[0].blend = targets[0].blend || {};\n targets[0].blend.alpha = targets[0].blend.alpha || {};\n targets[0].blend.alpha.srcTarget = value;\n },\n \n blendAlphaDstTarget: (parameter, value, descriptor: GPURenderPipelineDescriptor) => {\n addColorState(descriptor);\n targets[0].blend = targets[0].blend || {};\n targets[0].blend.alpha = targets[0].blend.alpha || {};\n targets[0].blend.alpha.dstTarget = value;\n },\n */\n};\nconst DEFAULT_PIPELINE_DESCRIPTOR = {\n // depthStencil: {\n // stencilFront: {},\n // stencilBack: {},\n // // depthWriteEnabled: true,\n // // depthCompare: 'less',\n // // format: 'depth24plus-stencil8',\n // },\n primitive: {\n cullMode: 'back',\n topology: 'triangle-list'\n },\n vertex: {\n module: undefined,\n entryPoint: 'main'\n },\n fragment: {\n module: undefined,\n entryPoint: 'main',\n targets: [\n // { format: props.color0Format || 'bgra8unorm' }\n ]\n },\n layout: 'auto'\n};\nexport function applyParametersToRenderPipelineDescriptor(pipelineDescriptor, parameters = {}) {\n // Apply defaults\n Object.assign(pipelineDescriptor, { ...DEFAULT_PIPELINE_DESCRIPTOR, ...pipelineDescriptor });\n setParameters(pipelineDescriptor, parameters);\n}\n// Apply any supplied parameters\nfunction setParameters(pipelineDescriptor, parameters) {\n for (const [key, value] of Object.entries(parameters)) {\n const setterFunction = PARAMETER_TABLE[key];\n if (!setterFunction) {\n throw new Error(`Illegal parameter ${key}`);\n }\n setterFunction(key, value, pipelineDescriptor);\n }\n}\nfunction addColorState(descriptor) {\n descriptor.fragment.targets = descriptor.fragment?.targets || [];\n if (!Array.isArray(descriptor.fragment?.targets)) {\n throw new Error('colorstate');\n }\n if (descriptor.fragment?.targets?.length === 0) {\n descriptor.fragment.targets?.push({});\n }\n return descriptor.fragment?.targets;\n}\n", "import { Buffer, Sampler, Texture, log, cast } from '@luma.gl/core';\n/**\n * Create a WebGPU \"bind group layout\" from an array of luma.gl bindings\n * @note bind groups can be automatically generated by WebGPU.\n */\nexport function makeBindGroupLayout(device, layout, bindings) {\n throw new Error('not implemented');\n // return device.createBindGroupLayout({\n // layout,\n // entries: getBindGroupEntries(bindings)\n // })\n}\n/**\n * Create a WebGPU \"bind group\" from an array of luma.gl bindings\n */\nexport function getBindGroup(device, bindGroupLayout, shaderLayout, bindings) {\n const entries = getBindGroupEntries(bindings, shaderLayout);\n return device.createBindGroup({\n layout: bindGroupLayout,\n entries\n });\n}\nexport function getShaderLayoutBinding(shaderLayout, bindingName) {\n const bindingLayout = shaderLayout.bindings.find(binding => binding.name === bindingName || `${binding.name}uniforms` === bindingName.toLocaleLowerCase());\n if (!bindingLayout) {\n log.warn(`Binding ${bindingName} not set: Not found in shader layout.`)();\n }\n return bindingLayout;\n}\n/**\n * @param bindings\n * @returns\n */\nfunction getBindGroupEntries(bindings, shaderLayout) {\n const entries = [];\n for (const [bindingName, value] of Object.entries(bindings)) {\n const bindingLayout = getShaderLayoutBinding(shaderLayout, bindingName);\n if (bindingLayout) {\n entries.push(getBindGroupEntry(value, bindingLayout.location));\n }\n }\n return entries;\n}\nfunction getBindGroupEntry(binding, index) {\n if (binding instanceof Buffer) {\n return {\n binding: index,\n resource: {\n buffer: cast(binding).handle\n }\n };\n }\n if (binding instanceof Sampler) {\n return {\n binding: index,\n resource: cast(binding).handle\n };\n }\n else if (binding instanceof Texture) {\n return {\n binding: index,\n resource: cast(binding).handle.createView({ label: 'bind-group-auto-created' })\n };\n }\n throw new Error('invalid binding');\n}\n", "import { log, decodeVertexFormat } from '@luma.gl/core';\n// import {getAttributeInfosFromLayouts} from '@luma.gl/core';\n/** Throw error on any WebGL-only vertex formats */\nfunction getWebGPUVertexFormat(format) {\n if (format.endsWith('-webgl')) {\n throw new Error(`WebGPU does not support vertex format ${format}`);\n }\n return format;\n}\n/**\n * Build a WebGPU vertex buffer layout intended for use in a GPURenderPassDescriptor.\n * Converts luma.gl attribute definitions to a WebGPU GPUVertexBufferLayout[] array\n * @param layout\n * @param bufferLayout The buffer map is optional\n * @returns WebGPU layout intended for a GPURenderPassDescriptor.\n */\nexport function getVertexBufferLayout(shaderLayout, bufferLayout) {\n const vertexBufferLayouts = [];\n const usedAttributes = new Set();\n // First handle any buffers mentioned in `bufferLayout`\n for (const mapping of bufferLayout) {\n // Build vertex attributes for one buffer\n const vertexAttributes = [];\n // TODO verify that all stepModes for one buffer are the same\n let stepMode = 'vertex';\n let byteStride = 0;\n // interleaved mapping {..., attributes: [{...}, ...]}\n if (mapping.attributes) {\n // const arrayStride = mapping.byteStride; TODO\n for (const attributeMapping of mapping.attributes) {\n const attributeName = attributeMapping.attribute;\n const attributeLayout = findAttributeLayout(shaderLayout, attributeName, usedAttributes);\n stepMode = attributeLayout.stepMode || (attributeLayout.name.startsWith('instance') ? 'instance' : 'vertex');\n vertexAttributes.push({\n format: getWebGPUVertexFormat(attributeMapping.format || mapping.format),\n offset: attributeMapping.byteOffset,\n shaderLocation: attributeLayout.location\n });\n byteStride += decodeVertexFormat(mapping.format).byteLength;\n }\n // non-interleaved mapping (just set offset and stride)\n }\n else {\n const attributeLayout = findAttributeLayout(shaderLayout, mapping.name, usedAttributes);\n if (!attributeLayout) {\n continue; // eslint-disable-line no-continue\n }\n byteStride = decodeVertexFormat(mapping.format).byteLength;\n stepMode = attributeLayout.stepMode || (attributeLayout.name.startsWith('instance') ? 'instance' : 'vertex');\n vertexAttributes.push({\n format: getWebGPUVertexFormat(mapping.format),\n // We only support 0 offset for non-interleaved buffer layouts\n offset: 0,\n shaderLocation: attributeLayout.location\n });\n }\n // Store all the attribute bindings for one buffer\n vertexBufferLayouts.push({\n arrayStride: mapping.byteStride || byteStride,\n stepMode,\n attributes: vertexAttributes\n });\n }\n // Add any non-mapped attributes - TODO - avoid hardcoded types\n for (const attribute of shaderLayout.attributes) {\n if (!usedAttributes.has(attribute.name)) {\n vertexBufferLayouts.push({\n arrayStride: decodeVertexFormat('float32x3').byteLength,\n stepMode: attribute.stepMode || (attribute.name.startsWith('instance') ? 'instance' : 'vertex'),\n attributes: [\n {\n format: getWebGPUVertexFormat('float32x3'),\n offset: 0,\n shaderLocation: attribute.location\n }\n ]\n });\n }\n }\n return vertexBufferLayouts;\n}\nexport function getBufferSlots(shaderLayout, bufferLayout) {\n const usedAttributes = new Set();\n let bufferSlot = 0;\n const bufferSlots = {};\n // First handle any buffers mentioned in `bufferLayout`\n for (const mapping of bufferLayout) {\n // interleaved mapping {..., attributes: [{...}, ...]}\n if ('attributes' in mapping) {\n for (const interleaved of mapping.attributes) {\n usedAttributes.add(interleaved.attribute);\n }\n // non-interleaved mapping (just set offset and stride)\n }\n else {\n usedAttributes.add(mapping.name);\n }\n bufferSlots[mapping.name] = bufferSlot++;\n }\n // Add any non-mapped attributes\n for (const attribute of shaderLayout.attributes) {\n if (!usedAttributes.has(attribute.name)) {\n bufferSlots[attribute.name] = bufferSlot++;\n }\n }\n return bufferSlots;\n}\n/**\n * Looks up an attribute in the ShaderLayout.\n * @throws if name is not in ShaderLayout\n * @throws if name has already been referenced\n */\nfunction findAttributeLayout(shaderLayout, name, attributeNames) {\n const attribute = shaderLayout.attributes.find(attribute => attribute.name === name);\n if (!attribute) {\n log.warn(`Unknown attribute ${name}`)();\n return null;\n }\n if (attributeNames.has(name)) {\n throw new Error(`Duplicate attribute ${name}`);\n }\n attributeNames.add(name);\n return attribute;\n}\n", "// prettier-ignore\nimport { ComputePipeline } from '@luma.gl/core';\n// COMPUTE PIPELINE\n/** Creates a new compute pipeline when parameters change */\nexport class WebGPUComputePipeline extends ComputePipeline {\n device;\n handle;\n constructor(device, props) {\n super(device, props);\n this.device = device;\n const webgpuShader = this.props.cs;\n this.handle = this.props.handle || this.device.handle.createComputePipeline({\n label: this.props.id,\n compute: {\n module: webgpuShader.handle,\n entryPoint: this.props.csEntryPoint,\n // constants: this.props.csConstants\n },\n layout: 'auto'\n });\n }\n /** For internal use in render passes */\n _getBindGroupLayout() {\n // TODO: Cache?\n return this.handle.getBindGroupLayout(0);\n }\n}\n", "import { RenderPass, cast, log } from '@luma.gl/core';\nexport class WebGPURenderPass extends RenderPass {\n device;\n handle;\n /** Active pipeline */\n pipeline = null;\n constructor(device, props = {}) {\n super(device, props);\n this.device = device;\n const framebuffer = props.framebuffer || device.canvasContext.getCurrentFramebuffer();\n const renderPassDescriptor = this.getRenderPassDescriptor(framebuffer);\n log.groupCollapsed(3, `new WebGPURenderPass(${this.id})`)();\n log.probe(3, JSON.stringify(renderPassDescriptor, null, 2))();\n log.groupEnd(3)();\n this.handle = this.props.handle || device.commandEncoder.beginRenderPass(renderPassDescriptor);\n this.handle.label = this.props.id;\n }\n destroy() { }\n end() {\n this.handle.end();\n }\n setPipeline(pipeline) {\n this.pipeline = cast(pipeline);\n this.handle.setPipeline(this.pipeline.handle);\n }\n /** Sets an array of bindings (uniform buffers, samplers, textures, ...) */\n setBindings(bindings) {\n this.pipeline?.setBindings(bindings);\n const bindGroup = this.pipeline?._getBindGroup();\n if (bindGroup) {\n this.handle.setBindGroup(0, bindGroup);\n }\n }\n setIndexBuffer(buffer, indexFormat, offset = 0, size) {\n this.handle.setIndexBuffer(cast(buffer).handle, indexFormat, offset, size);\n }\n setVertexBuffer(slot, buffer, offset = 0) {\n this.handle.setVertexBuffer(slot, cast(buffer).handle, offset);\n }\n draw(options) {\n if (options.indexCount) {\n this.handle.drawIndexed(options.indexCount, options.instanceCount, options.firstIndex, options.baseVertex, options.firstInstance);\n }\n else {\n this.handle.draw(options.vertexCount || 0, options.instanceCount || 1, options.firstIndex, options.firstInstance);\n }\n }\n drawIndirect() {\n // drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: number): void;\n // drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: number): void;\n }\n setParameters(parameters) {\n const { blendConstant, stencilReference, scissorRect, viewport } = parameters;\n if (blendConstant) {\n this.handle.setBlendConstant(blendConstant);\n }\n if (stencilReference) {\n this.handle.setStencilReference(stencilReference);\n }\n if (scissorRect) {\n this.handle.setScissorRect(scissorRect[0], scissorRect[1], scissorRect[2], scissorRect[3]);\n }\n // TODO - explain how 3 dimensions vs 2 in WebGL works.\n if (viewport) {\n this.handle.setViewport(viewport[0], viewport[1], viewport[2], viewport[3], viewport[4], viewport[5]);\n }\n }\n pushDebugGroup(groupLabel) {\n this.handle.pushDebugGroup(groupLabel);\n }\n popDebugGroup() {\n this.handle.popDebugGroup();\n }\n insertDebugMarker(markerLabel) {\n this.handle.insertDebugMarker(markerLabel);\n }\n // writeTimestamp(querySet: GPUQuerySet, queryIndex: number): void;\n // beginOcclusionQuery(queryIndex: number): void;\n // endOcclusionQuery(): void;\n // beginPipelineStatisticsQuery(querySet: GPUQuerySet, queryIndex: number): void;\n // endPipelineStatisticsQuery(querySet: GPUQuerySet, queryIndex: number): void;\n // executeBundles(bundles: Iterable<GPURenderBundle>): void;\n // INTERNAL\n /**\n * Partial render pass descriptor. Used by WebGPURenderPass.\n * @returns attachments fields of a renderpass descriptor.\n */\n getRenderPassDescriptor(framebuffer) {\n const renderPassDescriptor = {\n colorAttachments: []\n };\n renderPassDescriptor.colorAttachments = framebuffer.colorAttachments.map(colorAttachment => ({\n // clear values\n loadOp: this.props.clearColor !== false ? 'clear' : 'load',\n colorClearValue: this.props.clearColor || [0, 0, 0, 0],\n storeOp: this.props.discard ? 'discard' : 'store',\n // ...colorAttachment,\n view: colorAttachment.createView()\n }));\n if (framebuffer.depthStencilAttachment) {\n renderPassDescriptor.depthStencilAttachment = {\n view: framebuffer.depthStencilAttachment.createView()\n };\n const { depthStencilAttachment } = renderPassDescriptor;\n // DEPTH\n if (this.props.depthReadOnly) {\n depthStencilAttachment.depthReadOnly = true;\n }\n depthStencilAttachment.depthClearValue = this.props.clearDepth || 0;\n // WebGPU only wants us to set these parameters if the texture format actually has a depth aspect\n const hasDepthAspect = true;\n if (hasDepthAspect) {\n depthStencilAttachment.depthLoadOp = this.props.clearDepth !== false ? 'clear' : 'load';\n depthStencilAttachment.depthStoreOp = 'store'; // TODO - support 'discard'?\n }\n // WebGPU only wants us to set these parameters if the texture format actually has a stencil aspect\n const hasStencilAspect = false;\n if (hasStencilAspect) {\n depthStencilAttachment.stencilLoadOp = this.props.clearStencil !== false ? 'clear' : 'load';\n depthStencilAttachment.stencilStoreOp = 'store'; // TODO - support 'discard'?\n }\n }\n return renderPassDescriptor;\n }\n}\n", "import { ComputePass } from '@luma.gl/core';\nexport class WebGPUComputePass extends ComputePass {\n device;\n handle;\n _bindGroupLayout = null;\n constructor(device, props) {\n super(device, props);\n this.device = device;\n this.handle = this.props.handle || device.commandEncoder?.beginComputePass({\n label: this.props.id,\n // timestampWrites?: GPUComputePassTimestampWrites;\n });\n }\n /** @note no WebGPU destroy method, just gc */\n destroy() { }\n end() {\n this.handle.end();\n }\n setPipeline(pipeline) {\n const wgpuPipeline = pipeline;\n this.handle.setPipeline(wgpuPipeline.handle);\n this._bindGroupLayout = wgpuPipeline._getBindGroupLayout();\n }\n /** Sets an array of bindings (uniform buffers, samplers, textures, ...) */\n setBindings(bindings) {\n throw new Error('fix me');\n // const bindGroup = getBindGroup(this.device.handle, this._bindGroupLayout, this.props.bindings);\n // this.handle.setBindGroup(0, bindGroup);\n }\n /**\n * Dispatch work to be performed with the current ComputePipeline.\n * @param x X dimension of the grid of workgroups to dispatch.\n * @param y Y dimension of the grid of workgroups to dispatch.\n * @param z Z dimension of the grid of workgroups to dispatch.\n */\n dispatch(x, y, z) {\n this.handle.dispatchWorkgroups(x, y, z);\n }\n /**\n * Dispatch work to be performed with the current ComputePipeline.\n * @param indirectBuffer buffer must be a tightly packed block of three 32-bit unsigned integer values (12 bytes total), given in the same order as the arguments for dispatch()\n * @param indirectOffset\n */\n dispatchIndirect(indirectBuffer, indirectOffset = 0) {\n const webgpuBuffer = indirectBuffer;\n this.handle.dispatchWorkgroupsIndirect(webgpuBuffer.handle, indirectOffset);\n }\n pushDebugGroup(groupLabel) {\n this.handle.pushDebugGroup(groupLabel);\n }\n popDebugGroup() {\n this.handle.popDebugGroup();\n }\n insertDebugMarker(markerLabel) {\n this.handle.insertDebugMarker(markerLabel);\n }\n}\n", "// luma.gl, MIT license\n// Copyright (c) vis.gl contributors\nimport { VertexArray, log } from '@luma.gl/core';\nimport { getBrowser } from '@probe.gl/env';\n/** VertexArrayObject wrapper */\nexport class WebGPUVertexArray extends VertexArray {\n get [Symbol.toStringTag]() {\n return 'WebGPUVertexArray';\n }\n device;\n /** Vertex Array is a helper class under WebGPU */\n handle;\n /**\n * Attribute 0 can not be disable on most desktop OpenGL based browsers\n * TODO is this even an issue for WebGPU?\n */\n static isConstantAttributeZeroSupported(device) {\n return getBrowser() === 'Chrome';\n }\n // Create a VertexArray\n constructor(device, props) {\n super(device, props);\n this.device = device;\n }\n destroy() { }\n /**\n * Set an elements buffer, for indexed rendering.\n * Must be a Buffer bound to buffer with usage bit Buffer.INDEX set.\n */\n setIndexBuffer(buffer) {\n // assert(!elementBuffer || elementBuffer.glTarget === GL.ELEMENT_ARRAY_BUFFER, ERR_ELEMENTS);\n this.indexBuffer = buffer;\n }\n /** Set a bufferSlot in vertex attributes array to a buffer, enables the bufferSlot, sets divisor */\n setBuffer(bufferSlot, buffer) {\n // Sanity check target\n // if (buffer.glUsage === GL.ELEMENT_ARRAY_BUFFER) {\n // throw new Error('Use setIndexBuffer');\n // }\n this.attributes[bufferSlot] = buffer;\n }\n /** Set a location in vertex attributes array to a constant value, disables the location */\n setConstant(location, value) {\n log.warn(`${this.id} constant attributes not supported on WebGPU`);\n }\n bindBeforeRender(renderPass, firstIndex, indexCount) {\n const webgpuRenderPass = renderPass;\n const webgpuIndexBuffer = this.indexBuffer;\n if (webgpuIndexBuffer?.handle) {\n // Note we can't unset an index buffer\n log.warn('setting index buffer', webgpuIndexBuffer?.handle, webgpuIndexBuffer?.indexType)();\n webgpuRenderPass.handle.setIndexBuffer(webgpuIndexBuffer?.handle, webgpuIndexBuffer?.indexType);\n }\n for (let location = 0; location < this.maxVertexAttributes; location++) {\n const webgpuBuffer = this.attributes[location];\n if (webgpuBuffer?.handle) {\n log.warn(`setting vertex buffer ${location}`, webgpuBuffer?.handle)();\n webgpuRenderPass.handle.setVertexBuffer(location, webgpuBuffer?.handle);\n }\n }\n // TODO - emit warnings/errors/throw if constants have been set on this vertex array\n }\n unbindAfterRender(renderPass) {\n // On WebGPU we don't need to unbind. \n // In fact we can't easily do it. setIndexBuffer/setVertexBuffer don't accept null.\n // Unbinding presumably happens automatically when the render pass is ended.\n }\n}\n", "import { CanvasContext, log } from '@luma.gl/core';\nimport { getWebGPUTextureFormat } from './helpers/convert-texture-format';\nimport { WebGPUFramebuffer } from './resources/webgpu-framebuffer';\n/**\n * Holds a WebGPU Canvas Context\n * The primary job of the CanvasContext is to generate textures for rendering into the current canvas\n * It also manages canvas sizing calculations and resizing.\n */\nexport class WebGPUCanvasContext extends CanvasContext {\n device;\n gpuCanvasContext;\n /** Format of returned textures: \"bgra8unorm\", \"rgba8unorm\", \"rgba16float\". */\n // @ts-ignore - TODO - fix this\n format = navigator.gpu.getPreferredCanvasFormat();\n /** Default stencil format for depth textures */\n depthStencilFormat = 'depth24plus';\n depthStencilAttachment = null;\n constructor(device, adapter, props) {\n super(props);\n this.device = device;\n // TODO - hack to trigger resize?\n this.width = -1;\n this.height = -1;\n this._setAutoCreatedCanvasId(`${this.device.id}-canvas`);\n // @ts-ignore TODO - we don't handle OffscreenRenderingContext.\n this.gpuCanvasContext = this.canvas.getContext('webgpu');\n // TODO this has been replaced\n // this.format = this.gpuCanvasContext.getPreferredFormat(adapter);\n this.format = 'bgra8unorm';\n }\n /** Destroy any textures produced while configured and remove the context configuration. */\n destroy() {\n this.gpuCanvasContext.unconfigure();\n }\n /** Update framebuffer with properly resized \"swap chain\" texture views */\n getCurrentFramebuffer() {\n // Ensure the canvas context size is updated\n this.update();\n // Wrap the current canvas context texture in a luma.gl texture\n // const currentColorAttachment = this.device.createTexture({\n // id: 'default-render-target',\n // handle: this.gpuCanvasContext.getCurrentTexture(),\n // format: this.format,\n // width: this.width,\n // height: this.height\n // });\n // Wrap the current canvas context texture in a luma.gl texture \n const currentColorAttachment = this.getCurrentTexture();\n this.width = currentColorAttachment.width;\n this.height = currentColorAttachment.height;\n // Resize the depth stencil attachment\n this._createDepthStencilAttachment();\n return new WebGPUFramebuffer(this.device, {\n colorAttachments: [currentColorAttachment],\n depthStencilAttachment: this.depthStencilAttachment\n });\n }\n /** Resizes and updates render targets if necessary */\n update() {\n const [width, height] = this.getPixelSize();\n const sizeChanged = width !== this.width || height !== this.height;\n if (sizeChanged) {\n this.width = width;\n this.height = height;\n if (this.depthStencilAttachment) {\n this.depthStencilAttachment.destroy();\n this.depthStencilAttachment = null;\n }\n // Reconfigure the canvas size.\n // https://www.w3.org/TR/webgpu/#canvas-configuration\n this.gpuCanvasContext.configure({\n device: this.device.handle,\n format: getWebGPUTextureFormat(this.format),\n // Can be used to define e.g. -srgb views\n // viewFormats: [...]\n colorSpace: this.props.colorSpace,\n alphaMode: this.props.alphaMode\n });\n log.log(1, `Resized to ${this.width}x${this.height}px`)();\n }\n }\n resize(options) {\n this.update();\n }\n /** Wrap the current canvas context texture in a luma.gl texture */\n getCurrentTexture() {\n return this.device._createTexture({\n id: `${this.id}#color-texture`,\n handle: this.gpuCanvasContext.getCurrentTexture()\n });\n }\n /** We build render targets on demand (i.e. not when size changes but when about to render) */\n _createDepthStencilAttachment() {\n if (!this.depthStencilAttachment) {\n this.depthStencilAttachment = this.device.createTexture({\n id: `${this.id}#depth-stencil-texture`,\n format: this.depthStencilFormat,\n width: this.width,\n height: this.height,\n usage: GPUTextureUsage.RENDER_ATTACHMENT\n });\n }\n return this.depthStencilAttachment;\n }\n}\n", "import { Framebuffer } from '@luma.gl/core';\n/**\n * Create new textures with correct size for all attachments.\n * @note resize() destroys existing textures (if size has changed).\n */\nexport class WebGPUFramebuffer extends Framebuffer {\n device;\n constructor(device, props) {\n super(device, props);\n this.device = device;\n // Auto create textures for attachments if needed\n this.autoCreateAttachmentTextures();\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,IAAAA,gBAAgD;;;ACDhD,kBAAuB;AACvB,SAAS,cAAc,OAAO;AAF9B;AAGI,SAAO,MAAM,gBAAc,WAAM,SAAN,mBAAY,eAAc;AACzD;AACO,IAAM,eAAN,cAA2B,mBAAO;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY,QAAQ,OAAO;AACvB,UAAM,QAAQ,KAAK;AACnB,SAAK,SAAS;AACd,SAAK,aAAa,cAAc,KAAK;AACrC,UAAM,YAAY,QAAQ,MAAM,IAAI;AAEpC,UAAM,OAAO,KAAK,KAAK,KAAK,aAAa,CAAC,IAAI;AAC9C,SAAK,SAAS,KAAK,MAAM,UAAU,KAAK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OxC;AA2OQ,UAAM;AAAA,MAAE;AAAA,MAAQ,UAAU;AAAA,MAAG,UAAU;AAAA,MAAG;AAAA,MAAS,WAAW;AAAA,MAAG,SAAS;AAAA,MAAO,aAAa;AAAA,MAAc,qBAAqB;AAAA;AAAA;AAAA;AAAA,MAIjI,QAAQ,QAAQ;AAAA,MAAO,SAAS,QAAQ;AAAA,MAAQ,QAAQ;AAAA,IAAE,IAAI;AAC9D,UAAM,gBAAgB;AACtB,eAAK,WAAL,mBAAa,MAAM;AAAA;AAAA,MAEnB;AAAA,QACI;AAAA,QACA,QAAQ,CAAC,SAAS,OAAO;AAAA,MAC7B;AAAA;AAAA,MAEA;AAAA,QACI,SAAS,cAAc;AAAA,QACvB,QAAQ,CAAC,GAAG,GAAG,CAAC;AAAA;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACJ;AAAA;AAAA,MAEA,CAAC,OAAO,QAAQ,KAAK;AAAA;AAAA,EACzB;AACJ;AAlPO,IAAM,eAAN;AASH,cATS,cASF,QAAO;",
|
|
6
|
+
"names": ["import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "attribute", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core"]
|
|
7
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
// luma.gl, MIT license
|
|
2
|
+
// Copyright (c) vis.gl contributors
|
|
3
|
+
// WEBGPU ADAPTER
|
|
4
|
+
export { WebGPUDevice } from './adapter/webgpu-device';
|
|
5
|
+
// WEBGPU CLASSES (typically not accessed directly)
|
|
6
|
+
export { WebGPUBuffer } from './adapter/resources/webgpu-buffer';
|
|
7
|
+
export { WebGPUTexture } from './adapter/resources/webgpu-texture';
|
|
8
|
+
export { WebGPUSampler } from './adapter/resources/webgpu-sampler';
|
|
9
|
+
export { WebGPUShader } from './adapter/resources/webgpu-shader';
|