refactor: Factoring out attribtues
This commit is contained in:
@@ -297,6 +297,18 @@ correctness requirement.
|
||||
| `valid_count` | host writes `0`; the validation pass fills the amount of valid entries |
|
||||
| attribute buffers | dense per-entry attribute payloads |
|
||||
|
||||
Build the layout from a producer payload with
|
||||
`CacheLayout::from_attributes(&A::LAYOUT, &extras)`: producer attributes become
|
||||
`CacheAttributeInit::External` and come first, `extras` are appended for
|
||||
GPU-only data.
|
||||
|
||||
Upload producer voxels with `CacheInsertionData::write_attributes(&queue, voxels)`.
|
||||
It accepts a slice in `[entry][child]` order (the child order is
|
||||
`x + 4*y + 16*z`), validates that `A::LAYOUT` is an `External` prefix of the
|
||||
cache layout with matching word counts and labels, and writes one buffer per
|
||||
attribute. It returns the entry count to write to `page_count_buffer`. The
|
||||
`DontTouch` attributes after the producer prefix are left untouched.
|
||||
|
||||
`InsertionInformation<N>` is just `children: [ChildInformation; 64]`, where each
|
||||
`ChildInformation` uses the four-state encoding below.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user