Expand description
Functionality related to device and adapter limits.
Β§Limit Bucketing
Web browsers make various information about their operating environment available to content to provide a better experience. For example, content is able to detect whether the device has a touch-screen, in order to provide an appropriate user interface.
Browser fingerprinting employs this information for the purpose of constructing a unique βfingerprintβ value that is unique to a single browser or shared among a relatively small number of browsers. Fingerprinting can be used for various purposes, including to identify and track users across different websites.
Limit bucketing can reduce the ability to fingerprint users based on GPU
hardware characteristics when using wgpu in applications like a web
browser.
When limit bucketing is enabled, the adapter limits offered by wgpu do not
necessarily reflect the exact capabilities of the hardware. Instead, the
hardware capabilities are rounded down to one of several pre-defined buckets.
The goal of doing this is for there to be enough devices assigned to each
bucket that knowledge of which bucket applies is minimally useful for
fingerprinting.
Limit bucketing may be requested by setting apply_limit_buckets in
[wgt::RequestAdapterOptions] or by setting apply_limit_buckets to
true when calling enumerate_adapters.
If your application does not expose wgpu to untrusted content, limit
bucketing is not necessary.
StructsΒ§
- Bucket π
- Bucketed
Adapter πInfo - Fields in [
wgt::AdapterInfo] relevant to limit bucketing. - Failed
Limit
ConstantsΒ§
- BUCKET_
A1 π - BUCKET_
A2 π - BUCKET_
DEFAULT π - BUCKET_
FALLBACK π - BUCKET_
I1 π - BUCKET_
LLVMPIPE π - BUCKET_
M1 π - BUCKET_
N1 π - BUCKET_
NO_ πF16 - BUCKET_
WARP π - EXEMPT_
FEATURES π - These features are left alone by limit bucketing. They will be exposed to higher layers whenever the device supports them, and they are not considered when determining bucket compatibility.
- UPLEVEL π
FunctionsΒ§
- apply_
limit_ buckets - Apply limit bucketing to the adapter limits and features in
raw. - buckets π
- Return the defined adapter feature/limit buckets
- check_
limits π