Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

kainino0x
Copy link
Contributor

requestAdapter should delay until it can make the best choice about what adapter to return.

@kainino0x
Copy link
Contributor Author

(Note of course this is a chance to the design document/rationale - not the spec.)


`GPU.requestAdapter` requests an adapter from the user agent.
It returns a Promise which resolves when an adapter is ready.
The Promise may not resolve for a long time - for example, the browser
Copy link
Contributor

Choose a reason for hiding this comment

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

IDK that we need to describe why the adapter creation can be delayed: the explanation here is very graphics-centric. What if a backgrounded tab wants WebGPU just to perform computations? (I mean, it would be ok to disallow it to avoid cryptomining in the background but the explanation is still very graphics-centric.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think these descriptions are graphic-centric. They just assume you don't want background tabs consuming a lot of system resources (compute or memory). In any case this is just part of the design doc so I don't think that's necessarily a problem.

@kainino0x
Copy link
Contributor Author

kainino0x commented Feb 3, 2020

Discussed in meeting.

  • MM: Browser policies should consider compute-only applications. We would need a signal. KN: We talked about an 'allowComputeOnly' flag for headless GPUs or VPUs. Good point that it would be a really useful signal here too.

(Decided to merge now though.)

@kainino0x kainino0x force-pushed the requestAdapter-delay branch 2 times, most recently from 9a83c08 to 4df5e27 Compare February 4, 2020 00:09
@kainino0x kainino0x force-pushed the requestAdapter-delay branch from 4df5e27 to 23966d5 Compare February 4, 2020 00:35
@kainino0x kainino0x merged commit a8d1858 into gpuweb:master Feb 4, 2020
@kainino0x kainino0x deleted the requestAdapter-delay branch February 4, 2020 00:36
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull request Sep 6, 2022
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.

2 participants