@luma.gl/webgpu
Advanced tools
Comparing version 9.0.0-alpha.53 to 9.0.0-alpha.54
@@ -17,2 +17,11 @@ /// <reference types="dist" /> | ||
} | ||
/** Maps the memory so that it can be read * | ||
// abstract mapAsync(mode, byteOffset, byteLength): Promise<void> | ||
/** Get the mapped range of data for reading or writing * | ||
// abstract getMappedRange(byteOffset, byteLength): ArrayBuffer; | ||
/** unmap makes the contents of the buffer available to the GPU again * | ||
// abstract unmap(): void; | ||
*/ | ||
//# sourceMappingURL=webgpu-buffer.d.ts.map |
{ | ||
"name": "@luma.gl/webgpu", | ||
"version": "9.0.0-alpha.53", | ||
"version": "9.0.0-alpha.54", | ||
"description": "WebGPU adapter for the luma.gl API", | ||
@@ -40,7 +40,7 @@ "type": "module", | ||
"@babel/runtime": "^7.0.0", | ||
"@luma.gl/core": "9.0.0-alpha.53", | ||
"@luma.gl/core": "9.0.0-alpha.54", | ||
"@probe.gl/env": "^4.0.2", | ||
"@webgpu/types": "^0.1.34" | ||
}, | ||
"gitHead": "f8939f1cf52a15f11ec053d4906e40f0b2a86836" | ||
"gitHead": "6028eb651303eadbc8f25e86d135d28f118fa3cf" | ||
} |
@@ -96,1 +96,53 @@ // WEBGPU Buffer implementation | ||
} | ||
/* | ||
// Convenience API | ||
/** Read data from the buffer * | ||
async readAsync(options: { | ||
byteOffset?: number, | ||
byteLength?: number, | ||
map?: boolean, | ||
unmap?: boolean | ||
}): Promise<ArrayBuffer> { | ||
if (options.map ?? true) { | ||
await this.mapAsync(Buffer.MAP_READ, options.byteOffset, options.byteLength); | ||
} | ||
const arrayBuffer = this.getMappedRange(options.byteOffset, options.byteLength); | ||
if (options.unmap ?? true) { | ||
this.unmap(); | ||
} | ||
return arrayBuffer; | ||
} | ||
/** Write data to the buffer * | ||
async writeAsync(options: { | ||
data: ArrayBuffer, | ||
byteOffset?: number, | ||
byteLength?: number, | ||
map?: boolean, | ||
unmap?: boolean | ||
}): Promise<void> { | ||
if (options.map ?? true) { | ||
await this.mapAsync(Buffer.MAP_WRITE, options.byteOffset, options.byteLength); | ||
} | ||
const arrayBuffer = this.getMappedRange(options.byteOffset, options.byteLength); | ||
const destArray = new Uint8Array(arrayBuffer); | ||
const srcArray = new Uint8Array(options.data); | ||
destArray.set(srcArray); | ||
if (options.unmap ?? true) { | ||
this.unmap(); | ||
} | ||
} | ||
*/ | ||
// Mapped API (WebGPU) | ||
/** Maps the memory so that it can be read * | ||
// abstract mapAsync(mode, byteOffset, byteLength): Promise<void> | ||
/** Get the mapped range of data for reading or writing * | ||
// abstract getMappedRange(byteOffset, byteLength): ArrayBuffer; | ||
/** unmap makes the contents of the buffer available to the GPU again * | ||
// abstract unmap(): void; | ||
*/ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
649068
9352
+ Added@luma.gl/core@9.0.0-alpha.54(transitive)
- Removed@luma.gl/core@9.0.0-alpha.53(transitive)
Updated@luma.gl/core@9.0.0-alpha.54