From e48c473a240a6f28b60db4ff6a72f68d339c9309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Tue, 5 Nov 2024 07:28:15 +0100 Subject: [PATCH] Add GPUDevice.adapterInfo (#161) --- dist/index.d.ts | 21 +++++++++++++++++++++ generated/index.d.ts | 16 ++++++++++++++++ gpuweb | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/dist/index.d.ts b/dist/index.d.ts index 049446a..7530f67 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1286,6 +1286,17 @@ interface GPURenderPipelineDescriptor } interface GPURequestAdapterOptions { + /** + * "Feature level" for the adapter request. + * The allowed feature level string values are: + * - `"core"` + * No effect. + * - `"compatibility"` + * No effect. + * Note: + * This value is reserved for future use as a way to opt into additional validation restrictions. + * Applications should not use this value at this time. + */ featureLevel?: string; /** * Optionally provides a hint indicating what class of adapter should be selected from @@ -2413,6 +2424,13 @@ interface GPUDevice * (which are exactly the ones with which it was created). */ readonly limits: GPUSupportedLimits; + /** + * Information about the physical adapter which created the device + * that this GPUDevice refers to. + * For a given GPUDevice, the GPUAdapterInfo values exposed are constant + * over time. + */ + readonly adapterInfo: GPUAdapterInfo; /** * The primary {@link GPUQueue} for this device. */ @@ -2421,6 +2439,9 @@ interface GPUDevice * Destroys the device, preventing further operations on it. * Outstanding asynchronous operations will fail. * Note: It is valid to destroy a device multiple times. + * Note: Since no further operations can be enqueued on this device, implementations can abort + * outstanding asynchronous operations immediately and free resource allocations, including + * mapped memory that was just unmapped. */ destroy(): undefined; /** diff --git a/generated/index.d.ts b/generated/index.d.ts index 94fbeda..4689b0f 100644 --- a/generated/index.d.ts +++ b/generated/index.d.ts @@ -1259,6 +1259,18 @@ interface GPURenderPipelineDescriptor } interface GPURequestAdapterOptions { + /** + * "Feature level" for the adapter request. + * The allowed feature level string values are: + *
+ * : "core" + * No effect. + * : "compatibility" + * No effect. + * Note: + * This value is reserved for future use as a way to opt into additional validation restrictions. + * Applications should not use this value at this time. + */ featureLevel?: string; powerPreference?: GPUPowerPreference; forceFallbackAdapter?: boolean; @@ -2198,11 +2210,15 @@ interface GPUDevice readonly __brand: "GPUDevice"; readonly features: GPUSupportedFeatures; readonly limits: GPUSupportedLimits; + readonly adapterInfo: GPUAdapterInfo; readonly queue: GPUQueue; /** * Destroys the device, preventing further operations on it. * Outstanding asynchronous operations will fail. * Note: It is valid to destroy a device multiple times. + * Note: Since no further operations can be enqueued on this device, implementations can abort + * outstanding asynchronous operations immediately and free resource allocations, including + * mapped memory that was just unmapped. */ destroy(): undefined; /** diff --git a/gpuweb b/gpuweb index b6a7642..8e44e1b 160000 --- a/gpuweb +++ b/gpuweb @@ -1 +1 @@ -Subproject commit b6a764223275356f485506693413d1bbfcb368b3 +Subproject commit 8e44e1b7d733ed56b6bf4f3797bd43450f6fe6e5