use_device(
dev) ->ok,err
Bind the compute device the spheres draw on, or unbind it
dev is a device from vk.open. After the call, canvas:sphere_tex
dispatches on it when the call qualifies: no height, no source that is
the canvas itself, a box of 16384 pixels or more. Every other call, and
every call with gpu = false or under LILUSH_GFX_GPU=0, draws on the
CPU from the same parse. The bytes are the CPU's.
The spheres dispatch on the device's second lane where vk.open took one,
and on the first otherwise. So a program's own dispatches on the first lane
hold a sphere up only where the device has one queue, or does not let the
lane past them; device_stats names the lane.
A call with later = true is submitted and returns a ticket that
canvas:sphere_land composites later, at most four open at once; the
canvas documents the ticket's rules.
Nil unbinds. A device without fp64, on its own word, is refused and the
binding standing stays: the shader computes in doubles. Binding builds the
sphere pipeline; lavapipe compiles it through LLVM at the first draw, about
half a second once a process. A device that refuses three submits in a
row, or is lost, is unbound by itself, and the frame that found it out is
drawn on the CPU; device_stats says so. Closing the device unbinds it.
Unbinding drops the open tickets and lets go of every buffer a surface
took at a land; the program writes them again from then on. Another
device bound in its place unbinds it the same way, before the new pipeline
is built: a binding that fails past the fp64 word leaves nothing bound.
Bind before the first frame: the thread pool starts on the first job that wants it, and a driver loaded after that is not seen by its hands.