← gpu_metal · version 0.2.3
5 public items, in source order. Generated from the registry index, which re-derives them from the package source at publish time — so a signature here is the one that version actually ships.
pub fn table() -> i64
This backend's table, for gpu::open; 0 on a machine that is not a Mac. open answers null on a Mac with no Metal.
pub fn checked() -> boolean
Whether this library was built checked (c/checked.sh) and its checks are on. The library as it is published is not, and pays nothing for the checks: faults is then always 0.
Metal's own validation (MTL_DEBUG_LAYER=1) sees a wrong call of Metal. A checked build sees what it cannot: a buffer, texture, target or pipeline of this backend used after its release, released twice, or used after its device closed. The call is refused, counted, and written to stderr with the call it came from. GPU_METAL_DEBUG=abort stops the program at the first fault, GPU_METAL_DEBUG=0 turns the checks off.
pub fn check(on: boolean)
Turn a checked build's checks off, or on again. Ask before table(): a device opened through a table taken earlier keeps what that table did.
pub fn faults() -> integer
How many faults a checked build has seen in this program.
pub fn check_catches() -> integer
For this library's own tests: release one buffer of the window opened last twice, then give it to a draw, as no program can through gpu, and answer how many faults that added — 2 in a checked build with its checks on (and not set to abort), 0 otherwise.