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 May 21, 2022
1 parent fbf1f85 commit 2e1999f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions spec/index.bs
Expand Up @@ -1559,7 +1559,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 @@ -1576,9 +1576,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 @@ -1620,14 +1620,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 @@ -1655,6 +1656,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 2e1999f

Please sign in to comment.