vello/piet-gpu-types/src/tilegroup.rs
Raph Levien 55e35dd879 Dynamic allocation of intermediate buffers
When the initial allocation is exceeded, do an atomic bump allocation.
This is done for both tilegroup instances and per tile command lists.
2020-04-25 10:45:47 -07:00

23 lines
536 B
Rust

use piet_gpu_derive::piet_gpu;
piet_gpu! {
#[gpu_write]
mod tilegroup {
struct Instance {
// Note: a better type would be `Ref<PietItem>` but to do that we
// would need cross-module references. Punt for now.
item_ref: u32,
// A better type would be Point.
offset: [f32; 2],
}
struct Jump {
new_ref: u32,
}
enum TileGroup {
Instance(Instance),
Jump(Jump),
End,
}
}
}