mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-11 04:51:32 +11:00
343e4c3075
Adds a binning stage. This is a first draft, and a number of loose ends exist.
20 lines
413 B
Rust
20 lines
413 B
Rust
use piet_gpu_derive::piet_gpu;
|
|
|
|
// The output of the binning stage, organized as a linked list of chunks.
|
|
|
|
piet_gpu! {
|
|
#[gpu_write]
|
|
mod bins {
|
|
struct BinInstance {
|
|
element_ix: u32,
|
|
}
|
|
|
|
struct BinChunk {
|
|
// First chunk can have n = 0, subsequent ones not.
|
|
n: u32,
|
|
next: Ref<BinChunk>,
|
|
// Instances follow
|
|
}
|
|
}
|
|
}
|