-
Notifications
You must be signed in to change notification settings - Fork 345
Open
Labels
apiWebGPU APIWebGPU APIapi resolvedResolved - waiting for a change to the API specificationResolved - waiting for a change to the API specificationneeds-cts-issueThis change requires tests (or would need tests if accepted), but may not have a CTS issue filed yetThis change requires tests (or would need tests if accepted), but may not have a CTS issue filed yet
Milestone
Description
Quoting from https://crbug.com/dawn/2025:
Notice that the following yields false:
let adapter = await navigator.gpu.requestAdapter();
let requiredLimits = adapter.limits;
let device = await adapter.requestDevice({ requiredLimits });
device.limits.maxBufferSize == requiredLimits.maxBufferSizeWhereas the following yields true:
let adapter = await navigator.gpu.requestAdapter();
let requiredLimits = {};
requiredLimits.maxBufferSize = adapter.limits.maxBufferSize;
let device = await adapter.requestDevice({ requiredLimits });
device.limits.maxBufferSize == requiredLimits.maxBufferSizeAnd indeed the following also yields true (we copy every property from adapter.limits to requiredLimits manually here):
let adapter = await navigator.gpu.requestAdapter();
let requiredLimits = {};
requiredLimits.maxBufferSize = adapter.limits.maxBufferSize;
for (const key in adapter.limits) {
requiredLimits[key] = adapter.limits[key];
}
let device = await adapter.requestDevice({ requiredLimits });
device.limits.maxBufferSize == requiredLimits.maxBufferSizeI'd expect that requesting a device using requiredLimits as adapter.limits would be fine, however requiredLimits
apparently needs to be a plain JS object (whereas adapter.limits is an instance GPUSupportedLimits).
(I was requested to repost the issue here on the Dawn issue)
kainino0x and munrocket
Metadata
Metadata
Assignees
Labels
apiWebGPU APIWebGPU APIapi resolvedResolved - waiting for a change to the API specificationResolved - waiting for a change to the API specificationneeds-cts-issueThis change requires tests (or would need tests if accepted), but may not have a CTS issue filed yetThis change requires tests (or would need tests if accepted), but may not have a CTS issue filed yet