Skip to content

Conversation

@kainino0x
Copy link
Contributor

@kainino0x kainino0x commented Sep 22, 2020

This makes it possible for apps to check for individual extension
support (.has()), which would let the UA track privacy budgeting with
better granularity.

@litherum mentioned this topic today in the WGSL meeting, which got me thinking about it. Does this address the concern with this mechanism? (Unrelated to the WGSL topic.)


Preview | Diff

@kainino0x kainino0x requested review from kvark and litherum September 22, 2020 22:44
This makes it possible for apps to check for individual extension
support (`.has()`), which would let the UA track privacy budgeting with
better granularity.
@kainino0x kainino0x force-pushed the adapter-extensions-setlike branch from 1fb3f1e to 696f62a Compare September 22, 2020 22:45
kainino0x added a commit to kainino0x/gpuweb that referenced this pull request Sep 23, 2020
This allows apps to receive information about individual available
adapter limits, which which let the UA track privacy budgeting with
better granularity.

See also gpuweb#489, gpuweb#495; gpuweb#1098.
kainino0x added a commit to kainino0x/gpuweb that referenced this pull request Sep 23, 2020
This allows apps to request information about individual available
adapter limits, which lets the UA track privacy budgeting with
better granularity.

See also gpuweb#489, gpuweb#495; gpuweb#1098.
Copy link
Contributor

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar concern here (as with limits): what happens if the user doesn't check for extensions but still requests them? Vulkan validation layers, for example, complain about this, because such code is not portable.

@kainino0x
Copy link
Contributor Author

Guarding against that would only be a heuristic anyway, as we can't tell that the app didn't just query every extension, ignore the results and request some others. I think it should be a browser warning.

@kvark
Copy link
Contributor

kvark commented Sep 24, 2020

Let me explain in a bit more detail how I see this and the limits changes. The privacy budget idea makes the user agent to adjust the result of queries based on the very act of querying. This is a classical quantum behavior! Essentially, device geometry properties do not exist until discovered. So this is not a heuristic, it's somewhat straightforward: if you don't check for extension X (or limit L), then it's not there. If an app wants to check for all extensions, its their choice, but they should be aware that the privacy budget will quickly be depleted, and they aren't going to get all the extensions anyway.

@kainino0x
Copy link
Contributor Author

kainino0x commented Sep 25, 2020

It's well-defined, but it's still a heuristic relative to the behaviors we want to prevent (assuming capabilities that you don't know exist, and requesting capabilities that you don't need). It's not the only reasonable well-defined behavior, and I prefer a model where the state of the adapter is not mutable in that way, like:

  • Checking for a capability spends privacy budget
  • Enumerating the extensions spends privacy budget (same bits as checking the extensions set for exactly every extension known by the UA)
  • Attempting to create a device spends privacy budget (same bits as checking for all the capabilities requested by the device, even though that's more than the actual info you get from requesting a device and seeing if it succeeds)

@kainino0x
Copy link
Contributor Author

Matrix chat discussion. I think @kvark and I are on the same page now.

kainino0x added a commit to kainino0x/gpuweb that referenced this pull request Oct 1, 2020
This allows apps to request information about individual available
adapter limits, which lets the UA track privacy budgeting with
better granularity.

See also gpuweb#489, gpuweb#495; gpuweb#1098.
kainino0x added a commit to kainino0x/gpuweb that referenced this pull request Oct 1, 2020
This allows apps to request information about individual available
adapter limits, which lets the UA track privacy budgeting with
better granularity.

See also gpuweb#489, gpuweb#495; gpuweb#1098.
Copy link
Contributor

@kdashg kdashg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great even just as a UX improvement, vs an array.

@kainino0x
Copy link
Contributor Author

Resolved: It's agreed this is a strict improvement, so accepted. There's mixed desire to remove the possibility to enumerate the set, but it can be a later increment.

@kainino0x kainino0x self-assigned this Oct 5, 2020
@kainino0x kainino0x changed the title Make GPUAdapter.extensions a setlike interface Make GPUAdapter.features a setlike interface Oct 8, 2020
@kainino0x kainino0x merged commit db3d4c7 into gpuweb:main Oct 8, 2020
@kainino0x kainino0x deleted the adapter-extensions-setlike branch October 8, 2020 21:47
kainino0x added a commit to kainino0x/gpuweb that referenced this pull request Dec 3, 2020
kainino0x added a commit to kainino0x/gpuweb that referenced this pull request Dec 3, 2020
@kainino0x kainino0x mentioned this pull request Dec 3, 2020
kainino0x added a commit that referenced this pull request Dec 15, 2020
I think it's been determined that this API shouldn't consider privacy budgeting in it's design.

- UAs can still lazily-decide on GPULimits values.
- UAs can still do bucketing ahead of time, or even based on queries to GPULimits members.
- Apps can attempt requestDevice without checking limits, if they just want to know if their requested limits are supported.

Exact IDL interface is TBD, but editorial.

Needs more text to be filled out later. Also adds some other TODOs.

See also #489, #495; #1098, #1100.
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull request Sep 6, 2022
…puweb#1098)

* Add validation,resource_usages,texture,in_render_common:* - Part III

* Address reviewer's comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants