Skip to content

Commit

Permalink
Change deviceId to a string on advice from Ken Russell given previous…
Browse files Browse the repository at this point in the history
… experience from the ANGLE team generating a similar value
  • Loading branch information
toji committed Apr 28, 2022
1 parent a90aae9 commit be721c7
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions spec/index.bs
Expand Up @@ -1540,7 +1540,7 @@ including the absence of those values.
interface GPUAdapterInfo {
readonly attribute DOMString vendor;
readonly attribute DOMString architecture;
readonly attribute long deviceId;
readonly attribute DOMString device;
readonly attribute DOMString description;
};
</script>
Expand All @@ -1557,9 +1557,9 @@ interface GPUAdapterInfo {
The name of the family or class of GPUs the [=adapter=] belongs to, if avaliable. Empty
string otherwise.

: <dfn>deviceId</dfn>
: <dfn>device</dfn>
::
A vendor-specific ID for the [=adapter=], if available. `0` otherwise.
A vendor-specific identifier for the [=adapter=], if available. Empty string otherwise.

Note: This is a value that represents the type of adapter. For example, it may be a
[PCI device ID](https://pcisig.com/). It does not uniquely identify a given piece of
Expand Down Expand Up @@ -1601,14 +1601,15 @@ interface GPUAdapterInfo {
1. Set |adapterInfo|.{{GPUAdapterInfo/architecture}} to the empty string or a
reasonable approximation of the architecture as a [=normalized identifier string=].

1. If |unmaskedValues| [=set/contains=] `"deviceId"` and the deviceId is known:
1. Set |adapterInfo|.{{GPUAdapterInfo/deviceId}} to a vendor-specific numeric ID for
|adapter|.
1. If |unmaskedValues| [=set/contains=] `"device"` and the device is known:
1. Set |adapterInfo|.{{GPUAdapterInfo/device}} to a to a [=normalized identifier string=]
reprenting a vendor-specific indetifier for |adapter|.

Otherwise:

1. Set |adapterInfo|.{{GPUAdapterInfo/deviceId}} to `0` or a reasonable
approximation of the vendor-specific numeric ID for |adapter|.
1. Set |adapterInfo|.{{GPUAdapterInfo/device}} to to the empty string or a
reasonable approximation of a vendor-specific indetifier as a [=normalized identifier
string=].

1. If |unmaskedValues| [=set/contains=] `"description"` and a description is known:
1. Set |adapterInfo|.{{GPUAdapterInfo/description}} to a description of the |adapter| as
Expand Down Expand Up @@ -1636,6 +1637,7 @@ interface GPUAdapterInfo {
Examples of valid normalized identifier strings include:
- `gpu`
- `3d`
- `0x3b2f`
- `next-gen`
- `series-x20-ultra`
</div>
Expand Down

0 comments on commit be721c7

Please sign in to comment.