mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-11 04:51:32 +11:00
55e35dd879
When the initial allocation is exceeded, do an atomic bump allocation. This is done for both tilegroup instances and per tile command lists.
23 lines
536 B
Rust
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,
|
|
}
|
|
}
|
|
}
|