Skip to content

Commit

Permalink
Add GPUDevice.adapterInfo (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois authored Nov 5, 2024
1 parent f73b2d7 commit e48c473
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
21 changes: 21 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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;
/**
Expand Down
16 changes: 16 additions & 0 deletions generated/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,18 @@ interface GPURenderPipelineDescriptor
}

interface GPURequestAdapterOptions {
/**
* "Feature level" for the adapter request.
* The allowed <dfn dfn for="">feature level string</dfn> values are:
* <dl dfn-type=dfn dfn-for="feature level string">
* : <dfn noexport>"core"</dfn>
* No effect.
* : <dfn noexport>"compatibility"</dfn>
* 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;
Expand Down Expand Up @@ -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;
/**
Expand Down
2 changes: 1 addition & 1 deletion gpuweb
Submodule gpuweb updated 1 files
+64 −64 spec/index.bs

0 comments on commit e48c473

Please sign in to comment.