OOM on `GPUDevice.createBuffer` should throw a `RangeError`, not an `AbortError`
Categories
(Core :: Graphics: WebGPU, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox117 | --- | fixed |
People
(Reporter: ErichDonGubler, Assigned: ErichDonGubler)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
In cases where we actually try to allocate a Shmem
instance from a user-provided buffer size, we currently throw an AbortError
instead of a RangeError
. The WebGPU spec. states the definition of GPUBuffer
that we should use a RangeError
in all OOM cases:
Let data be ? CreateByteDataBlock(size).
Note: This may result in a
RangeError
being thrown. For consistency and predictability: …
Step to reproduce
-
Create a 64-bit (but not 32-bit) build of Firefox based on changes from bug 1838694 or later.
-
Run
./mach wpt '/_mozilla/webgpu/chunked/1/cts.https.html?q=webgpu:api,operation,buffers,map_oom:mappedAtCreation:*'
. Observe thatoom=true
test cases fail with an error like as follows:EXPECTATION FAILED: subcase: usage=1 THREW AbortError, instead of RangeError: AbortError: GPUDevice.createBuffer: Unable to allocate shmem of size 9007199254740984 shouldThrow@https://gpuweb.github.io/cts/out/common/framework/fixture.js:266:50 @https://gpuweb.github.io/cts/out/webgpu/api/operation/buffers/map_oom.spec.js:42:7
Alternatively, one can currently use https://gpuweb.github.io/cts/standalone/?q=webgpu:api,operation,buffers,map_oom:mappedAtCreation:oom=true;* to reproduce.
Assignee | ||
Comment 1•1 year ago
|
||
Depends on D181691
Comment 3•1 year ago
|
||
bugherder |
Description
•