summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/dts/lib.deno_webgpu.d.ts4
-rw-r--r--ext/webgpu/src/01_webgpu.js13
2 files changed, 8 insertions, 9 deletions
diff --git a/cli/dts/lib.deno_webgpu.d.ts b/cli/dts/lib.deno_webgpu.d.ts
index efcc8da4a..32f142768 100644
--- a/cli/dts/lib.deno_webgpu.d.ts
+++ b/cli/dts/lib.deno_webgpu.d.ts
@@ -143,8 +143,8 @@ declare class GPUDevice extends EventTarget implements GPUObjectBase {
| ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any)
| null;
- readonly features: ReadonlyArray<GPUFeatureName>;
- readonly limits: Record<string, number>;
+ readonly features: GPUSupportedFeatures;
+ readonly limits: GPUSupportedLimits;
readonly queue: GPUQueue;
destroy(): undefined;
diff --git a/ext/webgpu/src/01_webgpu.js b/ext/webgpu/src/01_webgpu.js
index 9b8c7eb50..caa103e62 100644
--- a/ext/webgpu/src/01_webgpu.js
+++ b/ext/webgpu/src/01_webgpu.js
@@ -25,7 +25,6 @@
Error,
MathMax,
ObjectDefineProperty,
- ObjectFreeze,
ObjectPrototypeIsPrototypeOf,
Promise,
PromiseAll,
@@ -344,8 +343,8 @@
const inner = new InnerGPUDevice({
rid,
adapter: this,
- features: ObjectFreeze(features),
- limits: ObjectFreeze(limits),
+ features: createGPUSupportedFeatures(features),
+ limits: createGPUSupportedLimits(limits),
});
return createGPUDevice(
descriptor.label ?? null,
@@ -744,8 +743,8 @@
* @typedef InnerGPUDeviceOptions
* @property {GPUAdapter} adapter
* @property {number | undefined} rid
- * @property {GPUFeatureName[]} features
- * @property {object} limits
+ * @property {GPUSupportedFeatures} features
+ * @property {GPUSupportedLimits} limits
*/
class InnerGPUDevice {
@@ -753,9 +752,9 @@
adapter;
/** @type {number | undefined} */
rid;
- /** @type {GPUFeatureName[]} */
+ /** @type {GPUSupportedFeatures} */
features;
- /** @type {object} */
+ /** @type {GPUSupportedLimits} */
limits;
/** @type {WeakRef<any>[]} */
resources;