Skip to content

Commit e48c473

Browse files
Add GPUDevice.adapterInfo (#161)
1 parent f73b2d7 commit e48c473

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

dist/index.d.ts

+21
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,17 @@ interface GPURenderPipelineDescriptor
12861286
}
12871287

12881288
interface GPURequestAdapterOptions {
1289+
/**
1290+
* "Feature level" for the adapter request.
1291+
* The allowed feature level string values are:
1292+
* - `"core"`
1293+
* No effect.
1294+
* - `"compatibility"`
1295+
* No effect.
1296+
* Note:
1297+
* This value is reserved for future use as a way to opt into additional validation restrictions.
1298+
* Applications should not use this value at this time.
1299+
*/
12891300
featureLevel?: string;
12901301
/**
12911302
* Optionally provides a hint indicating what class of adapter should be selected from
@@ -2413,6 +2424,13 @@ interface GPUDevice
24132424
* (which are exactly the ones with which it was created).
24142425
*/
24152426
readonly limits: GPUSupportedLimits;
2427+
/**
2428+
* Information about the physical adapter which created the device
2429+
* that this GPUDevice refers to.
2430+
* For a given GPUDevice, the GPUAdapterInfo values exposed are constant
2431+
* over time.
2432+
*/
2433+
readonly adapterInfo: GPUAdapterInfo;
24162434
/**
24172435
* The primary {@link GPUQueue} for this device.
24182436
*/
@@ -2421,6 +2439,9 @@ interface GPUDevice
24212439
* Destroys the device, preventing further operations on it.
24222440
* Outstanding asynchronous operations will fail.
24232441
* Note: It is valid to destroy a device multiple times.
2442+
* Note: Since no further operations can be enqueued on this device, implementations can abort
2443+
* outstanding asynchronous operations immediately and free resource allocations, including
2444+
* mapped memory that was just unmapped.
24242445
*/
24252446
destroy(): undefined;
24262447
/**

generated/index.d.ts

+16
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,18 @@ interface GPURenderPipelineDescriptor
12591259
}
12601260

12611261
interface GPURequestAdapterOptions {
1262+
/**
1263+
* "Feature level" for the adapter request.
1264+
* The allowed <dfn dfn for="">feature level string</dfn> values are:
1265+
* <dl dfn-type=dfn dfn-for="feature level string">
1266+
* : <dfn noexport>"core"</dfn>
1267+
* No effect.
1268+
* : <dfn noexport>"compatibility"</dfn>
1269+
* No effect.
1270+
* Note:
1271+
* This value is reserved for future use as a way to opt into additional validation restrictions.
1272+
* Applications should not use this value at this time.
1273+
*/
12621274
featureLevel?: string;
12631275
powerPreference?: GPUPowerPreference;
12641276
forceFallbackAdapter?: boolean;
@@ -2198,11 +2210,15 @@ interface GPUDevice
21982210
readonly __brand: "GPUDevice";
21992211
readonly features: GPUSupportedFeatures;
22002212
readonly limits: GPUSupportedLimits;
2213+
readonly adapterInfo: GPUAdapterInfo;
22012214
readonly queue: GPUQueue;
22022215
/**
22032216
* Destroys the device, preventing further operations on it.
22042217
* Outstanding asynchronous operations will fail.
22052218
* Note: It is valid to destroy a device multiple times.
2219+
* Note: Since no further operations can be enqueued on this device, implementations can abort
2220+
* outstanding asynchronous operations immediately and free resource allocations, including
2221+
* mapped memory that was just unmapped.
22062222
*/
22072223
destroy(): undefined;
22082224
/**

gpuweb

0 commit comments

Comments
 (0)