From https://gpuweb.github.io/gpuweb/#issue-414eeb44
In #1098 GPUAdapter.features was converted to use a setlike interface in order to allow privacy budget tracking. GPUDevice.features doesn't need the same privacy budget monitoring, because it can only contain feature names that the developer explicitly reqested, but it may still be preferable from an ergonomics standpoint to use the same interface in both places.
As it stands today, you have an odd disconnected in how you access the two interfaces:
if(adapter.features.has("feature-name")) {
// ...
}
if (device.features.indexOf("feature-name") != -1) {
// ...
}
If we were to make both of these use the same interface, it would probably be a good idea to rename the interface from GPUAdapterFeatures to something more generic. The spec issue suggests GPUSupportedFeatures, which sounds fine to me.
From https://gpuweb.github.io/gpuweb/#issue-414eeb44
In #1098
GPUAdapter.featureswas converted to use asetlikeinterface in order to allow privacy budget tracking.GPUDevice.featuresdoesn't need the same privacy budget monitoring, because it can only contain feature names that the developer explicitly reqested, but it may still be preferable from an ergonomics standpoint to use the same interface in both places.As it stands today, you have an odd disconnected in how you access the two interfaces:
If we were to make both of these use the same interface, it would probably be a good idea to rename the interface from
GPUAdapterFeaturesto something more generic. The spec issue suggestsGPUSupportedFeatures, which sounds fine to me.