* Use `add_plugins` as `add_plugin` is deprecated.
* Use `world.resource` instead of unwrapping `world.get_resource`
as it gives better error messages.
* Add the `VelloRenderer` to the render app in the `finish` method
as the `Renderer` is async and may not have initialized by the
time that the Vello plugin is being set up.
The git revision being used was from `0.11` while the current
release is `0.12`. `0.12` is used in `wgpu`, so this lets us
have a single `naga` crate being built.
This prevents having 2 versions of `pollster` pulled into the workspace.
The workspace provided `pollster` `0.3`, while `headless` was still
using `0.2.5`.
When the bounding boxes of a path and its clip are disjoint (i.e. they
do not intersect) the result of their intersection is a negative
rectangle.
When calculating the intersection of the bboxes, the binning stage
ensures that the bbox is non-negative. It then normalizes the
coordinates to bin dimensions and rounds the top-left corner down
to the neareast integer and the bottom-right corner up.
However this rounding causes zero-area bounding boxes to have a non-zero
area and sends the bottom-right corner to the placed in the next bin.
This causes fully clipped out draw objects to be included in binning,
with an incorrect clip bounding box that causes them to be erroneously
drawn with partial clipping.
`binning` now takes care around this logic to make sure that a zero-area
intersected-bbox gets skipped and clipped out. `tile_alloc`, also takes
care in its logic.
Fixes#286 and #333
Fixed several other shader validation errors caught when running
vello_shaders natively on Metal.
These were primarily caused by reading an invalid drawtag while
accessing the scene buffer. Scene buffer access in the offending
pipelines now initialize the draw tag to DRAWTAG_NOP if an
invocation ID would land beyond the valid index range of encoded draw
objects.
The number of global invocations for draw_leaf can exceed the size of
the draw_monoids buffer which gets conservatively set to the number of
draw objects. Added an explicit bounds check to prevent the invalid
write.
This is not an issue when targeting wgpu as the WGSL compiler emits
implicit bounds checking. When targeting Metal, we disable implicit
bounds checks as that requires an extra buffer binding containing buffer
sizes.
This was caught by Xcode's Metal shader validation and resulted in
visual artifacts in native rendering.
* Add GPU profiling
* Fix conditional compilation for `headless`
* Add full profiling
* Productionise
* Fix MacOS trace file
* Try to make it easier to tell what's important
* Resolve CI issues
This turns on clippy checking and also fixes all lints in the code.
Many lints are obvious improvements. Only a small number are slightly annoying, so I think overall worth having a vanilla default config.