Removes the dependency on the piet crate and replaces all uses with the scene crate. Also does some cleanup of the scene API, renaming some types and moving them all to the crate root for better ergonomics.
* Fix call to removed encoded_scene method in pgpu-render
* Add new ImageFormat::Surface variant to select a pixel format that matches the platform specific surface format. This makes gradients consistent across platforms.
Removes the dependency on the piet crate and replaces all uses with the scene crate. Also does some cleanup of the scene API, renaming some types and moving them all to the crate root for better ergonomics.
* capi: Add PathIter type and support for encoding fills
* capi: Minimal support for brushes (solid color only)
* Add flush method to command buffers
* Better initial heuristic for memory buffer size based on target dimensions
This removes the GPU transform stage, changes shaders to reference transforms directly from the scene, and modifies the render context to maintain a transform stack.
This is the core logic for robust dynamic memory. There are changes to both shaders and the driver logic.
On the shader side, failure information is more useful and fine grained. In particular, it now reports which stage failed and how much memory would have been required to make that stage succeed.
On the driver side, there is a new RenderDriver abstraction which owns command buffers (and associated query pools) and runs the logic to retry and reallocate buffers when necessary. There's also a fairly significant rework of the logic to produce the config block, as that overlaps the robust memory.
The RenderDriver abstraction may not stay. It was done this way to minimize code disruption, but arguably it should just be combined with Renderer.
Another change: the GLSL length() method on a buffer requires additional infrastructure (at least on Metal, where it needs a binding of its own), so we now pass that in as a field in the config.
This also moves blend memory to its own buffer. This worked out well because coarse rasterization can simply report the size of the blend buffer and it can be reallocated without needing to rerun the pipeline. In the previous state, blend allocations and ptcl writes were interleaved in coarse rasterization, so a failure of the former would require rerunning coarse. This should fix#83 (finally!)
There are a few loose ends. The binaries haven't (yet) been updated (I've been testing using a hand-written test program). Gradients weren't touched so still have a fixed size allocation. And the logic to calculate the new buffer size on allocation failure could be smarter.
Closes#175