mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-08 20:01:30 +11:00
0c0c61dc82
* Add counts to offsets when comparing against buffer size limits * Remove multiplication by 4 in blend buffer allocation (we use units of u32) * Move buffer sizes from BumpAllocators to Config * Add comments about early exit
19 lines
534 B
WebGPU Shading Language
19 lines
534 B
WebGPU Shading Language
// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
|
|
|
|
// Bitflags for each stage that can fail allocation.
|
|
let STAGE_BINNING: u32 = 0x1u;
|
|
let STAGE_TILE_ALLOC: u32 = 0x2u;
|
|
let STAGE_PATH_COARSE: u32 = 0x4u;
|
|
let STAGE_COARSE: u32 = 0x8u;
|
|
|
|
// This must be kept in sync with the struct in src/render.rs
|
|
struct BumpAllocators {
|
|
// Bitmask of stages that have failed allocation.
|
|
failed: atomic<u32>,
|
|
binning: atomic<u32>,
|
|
ptcl: atomic<u32>,
|
|
tile: atomic<u32>,
|
|
segments: atomic<u32>,
|
|
blend: atomic<u32>,
|
|
}
|