2.8.1. Machine-specific limits
WebGPU can expose a lot of detail on the underlying GPU architecture and the device geometry. This includes available physical adapters, many limits on the GPU and CPU resources that could be used (such as the maximum texture size), and any optional hardware-specific capabilities that are available.
WebGPU可以公开很多关于底层GPU架构和设备几何结构的细节。这包括可用的物理适配器、对可使用的GPU和CPU资源的许多限制(如最大纹理大小)以及任何可选的硬件特定功能。
User agents are not obligated to expose the real hardware limits, they are in full contol of how much the machine specifics are exposed. One strategy to reduce fingeprinting is binning all the target platforms into a few number of bins. In general, the privacy impact of exposing the hardware limits matches the one of WebGL.
用户代理没有义务公开真正的硬件限制,他们完全控制机器细节的公开程度。减少fingeprinting的一个策略是将所有目标平台放入几个箱子中。一般来说,公开硬件限制对隐私的影响与WebGL的影响相匹配。
The default limits are also deliberately high enough to allow most application to work without requesting higher limits. All the usage of the API is validated according to the requested limits, so the actual hardware capabilities are not exposed to the users by accident.
默认限制也有意设置得足够高,以允许大多数应用程序在不请求更高限制的情况下工作。API的所有使用都是根据请求的限制进行验证的,因此实际的硬件功能不会意外地暴露给用户。
2.8.2. Machine-specific artifacts
There are some machine-specific rasterization/precision artifacts and performance differences that can be observed roughly in the same way as in WebGL. This applies to rasterization coverage and patterns, interpolation precision of the varyings between shader stages, compute unit scheduling, and more aspects of execution.
存在一些特定于机器的光栅化/精度瑕疵和性能差异,其观察方式与WebGL大致相同。这适用于光栅化覆盖率和模式、着色器阶段之间变量的插值精度、计算单元调度以及执行的更多方面。
Generally, rasterization and precision fingerprints are identical across most or all of the devices of each vendor. Performance differences are relatively intractable, but also relatively low-signal (as with JS execution performance).
通常,每个供应商的大部分或所有设备上的光栅化和精确指纹都是相同的。性能差异比较棘手,但信号也相对较低(与JS执行性能一样)。
Privacy-critical applications and user agents should utilize software implementations to eliminate such artifacts.
隐私关键型应用程序和用户代理应利用软件实现消除此类组件。
2.8.3. Machine-specific performance
Another factor for differentiating users is measuring the performance of specific operations on the GPU. Even with low precision timing, repeated execution of an operation can show if the user’s machine is fast at specific workloads. This is a fairly common vector (present in both WebGL and Javascript), but it’s also low-signal and relatively intractable to truly normalize.
区分用户的另一个因素是衡量GPU上特定操作的性能。即使使用低精度计时,重复执行操作也可以显示用户的机器在特定工作负载下是否快速。这是一个相当常见的向量(存在于WebGL和Javascript中),但它也是一个低信号,要真正规范化它相对困难。
WebGPU compute pipelines expose access to GPU unobstructed by the fixed-function hardware. This poses an additional risk for unique device fingerprinting. User agents can take steps to dissociate logical GPU invocations with actual compute units to reduce this risk.
WebGPU计算管道公开对GPU的访问,不受固定功能硬件的阻碍。这给独特的设备指纹识别带来了额外的风险。用户代理可以采取步骤将逻辑GPU调用与实际计算单元分离,以降低这种风险。
2.8.4. User Agent State
This specification doesn’t define any additional user-agent state for an origin. However it is expected that user agents will have compilation caches for the result of expensive compilation like GPUShaderModule, GPURenderPipeline and GPUComputePipeline. These caches are important to improve the loading time of WebGPU applications after the first visit.
此规范没有为源定义任何其他用户代理状态。但是,预计用户代理将为昂贵的编译结果(如GPUShaderModule、GPURenderPipeline和GPUComputePipeline)提供编译缓存。这些缓存对于提高首次访问后WebGPU应用程序的加载时间非常重要。
For the specification, these caches are indifferentiable from incredibly fast compilation, but for applications it would be easy to measure how long createComputePipelineAsync() takes to resolve. This can leak information across origins (like “did the user access a site with this specific shader”) so user agents should follow the best practices in storage partitioning.
对于规范来说,这些缓存与异常快速的编译是不可区分的,但是对于应用程序来说,很容易测量createComputePipelineAsync()解析所需的时间。这可能会跨源泄漏信息(如“用户是否使用此特定着色器访问了站点”),因此用户代理应遵循存储分区中的最佳做法。
The system’s GPU driver may also have its own cache of compiled shaders and pipelines. User agents may want to disable these when at all possible, or add per-partition data to shaders in ways that will make the GPU driver consider them different.
系统的GPU驱动程序也可能有自己的编译着色器和管道缓存。用户代理可能想在所有可能的情况下禁用这些,或者将每个分区数据添加到着色器中,这将使GPU驱动程序认为它们是不同的。