refactor: fixing type inconsistencies in cache types

This commit is contained in:
2026-11-18 00:01:47 +01:00
parent 95a45a57d7
commit b65632aab3
6 changed files with 54 additions and 46 deletions
+5 -3
View File
@@ -84,6 +84,9 @@ struct RequestMeta {
- `table_slot` is table-private placement and may change while the anchor
stays the same. It is deliberately not part of a request key.
`node_id` and `producer_id` are `StructureLocator` and `ProducerId` on the Rust
side (transparent over `u32`); the layout above is the GPU wire layout.
### 2.2 Response
One `CacheInsertionData` entry per produced node. Entries do **not** have to be in
@@ -331,9 +334,8 @@ production types are the durable contract; the driver is still the playground.
Defines a more ambitious interface:
```rust
pub struct ProducerId(pub u32);
pub struct StructureLocator(pub u32);
pub use crate::voxel_cache::schema::StructureAnchor;
// Identity types live in vxls-voxel-cache::schema and are re-exported here.
pub use voxel_cache::schema::{ProducerId, StructureAnchor, StructureLocator};
pub trait VoxelAttributes<const N: usize> {
fn attribute_count() -> usize;
+5
View File
@@ -81,6 +81,11 @@ position plus a version word. The anchor is the structure identity, so child
requests inherit it from their parent page and producers never need a host-side
identity directory. `LocationPage` is 24 bytes.
On the Rust side, `node_id` and `producer_id` are the typed
`StructureLocator` and `ProducerId` newtypes (both `#[repr(transparent)]`
over `u32`), so the on-GPU layout above is unchanged. The same applies to
`RequestInformation` and `InsertionParent`.
### 2.3 Depth page
```rust