open_async skipped the fallback request once any software adapter had
been tried, even when wgpu's fallback adapter was a different one. It
now skips only an adapter the ranked loop already tried.
request_device returns an error for limits above the adapter's, and open reports that adapter as DeviceFailed and tries the next one. A test now covers it, and the docs say so.
DeviceHealth::wait polls in slices of at most 100 ms and checks the
health between them, so a loss or an error other than out of memory
recorded elsewhere while the work has not finished ends the wait instead
of leaving it blocked. It takes a submission index, as wait_timeout
does, so work submitted during the wait does not extend it. The README
step that lists what to build again after a loss no longer repeats a
phrase.
wgpu's fallback adapter can open a software device that the listing did not
show. The notice that no software adapter was listed no longer stays on the
returned Opened in that case.
- choose and a named or software preference follow the newest-version
correction until the entry is its own newest version. An entry without
a bus id between two cards of one model no longer leaves the choice on
an entry that avoided() excludes. The host test accepts every safe
fallback, and None only when the Intel Vulkan entry is all there is.
- An optional experimental feature is no longer requested, so the device
opens without it instead of failing the adapter.
- A bounded wait stops after the current slice once another clone records
a loss or an error other than out of memory.
- Both loss writers record the loss before setting device_lost.
- Docs: recovery starts on device_status; the software notice shows only
when a software adapter opened; surfaces are configured from the new
adapter's capabilities; GPUInternalError on the browser backend panics
in wgpu 30 before the handler runs; late completion counts as Finished.
- craft-gpu's DeviceCaps gains `vendor_id` and `software` (serde
default 0 and false) and `has_feature`. craft-gpu-wgpu fills both.
- `Capabilities` holds a DeviceCaps and reads NV12, P010, 16-bit norm,
f16 and timestamps from its feature names and the vendor from its
vendor id. It derefs to DeviceCaps and converts both ways.
- `list_async` and `open_async` are `list` and `open` as futures, for a
wasm32 web worker. In a browser they request the adapter for the
preference's power; wgpu 30 does not pass the fallback-adapter option
to the browser, so `Software` there opens the browser's adapter.
- The README lists what a caller rebuilds after a device loss.
- device_caps (and Opened::device_caps) gives a device's
craft_gpu::DeviceCaps: the limits and enabled feature names the
device was opened with, in the form craft-gpu-wgpu reports.
- DeviceHealth::device_status reports a recorded loss as
GpuFault::DeviceLost, in the form of GpuContext::device_status, and a
Fault converts to a GpuFault (a loss to DeviceLost, an error to
Operation).
- wgpu keeps one device-lost callback per device, so a craft-gpu
context on a device DeviceHealth::watch watches reads the loss from
device_status instead of setting its own callback. The README says so.
- pollster comes from the workspace dependency.
After an out-of-memory error, `poll`, `wait` and the bounded waits still
run, so staging memory is reclaimed. `clear_out_of_memory` takes the count
from `out_of_memory_count` and clears only the errors seen up to it, so an
error that arrives while memory is freed stays recorded. A loss or another
error still stops polls and waits, also when an out-of-memory error
follows it.
A fault's text now holds wgpu's heading and each cause on one line, for
example "Validation Error: In Queue::submit: Buffer 'pc' has been
destroyed", instead of only "Validation Error". The text is built up to
200 characters without joining the whole message first.
`wait_slices` takes the elapsed time from a closure. The wait uses the
system clock, and the tests use a clock that does not move or one that
advances by each slice, so their results do not depend on scheduling.
pick now returns OpenError instead of a String, so a caller can tell
UnsafeDriver from NoAdapter. With no usable adapter it logs the listed
adapters and returns NoAdapter. egui-wgpu's selector takes a String, so
that caller converts with map_err(|e| e.to_string()).
The crate docs and README now say what applies in a browser: WebGPU
lists only the adapter the browser offers, a web build requests it with
Preference::power(), and Capabilities, Recovery and DeviceHealth (apart
from its blocking waits) work there.
Preference::Software took the first usable software entry without the
correction Auto, LowPower and Adapter apply. When one driver listed a
software adapter twice, a stale version could be chosen, and the fallback
order then left the newer one out. Every preference now goes through the
same correction.
- wait_timeout and wait_timeout_cancelable take a submission index
instead of an Option. Every 100 ms slice waits for that index, so
work submitted during the wait no longer moves the target and can no
longer make a healthy device time out. Pass queue.submit([]) to wait
for everything submitted so far.
- An uncaptured error counts as a device loss only when an error in
its source chain is wgpu's "Parent device is lost". A resource label
that contains those words, on its own line or not, is recorded as an
error.
Adds the adapter preference (Auto, low power, a named adapter, software)
with a key that survives a reordered adapter list and a driver update,
wgpu's adapter rule with corrections for drivers that crash, a ranked
fallback order ending in a software adapter, a capability report, and
device health that records a loss or an uncaptured error without a lock.