mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Carry an extent hint on batch returns
This commit is contained in:
@@ -1330,7 +1330,7 @@ mod tests {
|
||||
|
||||
assert!(matches!(node.eval_batch(&scoped, 0..6, None), core_types::node::BatchStatus::NeedBuffer));
|
||||
let mut scratch = vec![std::mem::MaybeUninit::<u64>::uninit(); 6 * out.lane_stride() / 8];
|
||||
let core_types::node::BatchStatus::Filled(batch, finality) = node.eval_batch(&scoped, 0..6, Some(&mut scratch)) else {
|
||||
let core_types::node::BatchStatus::Filled(batch, finality, _) = node.eval_batch(&scoped, 0..6, Some(&mut scratch)) else {
|
||||
panic!("expected a filled batch");
|
||||
};
|
||||
assert_eq!(finality, core_types::gpoll::Finality::AllFinal);
|
||||
@@ -1389,7 +1389,7 @@ mod tests {
|
||||
let scoped = ctx.promoted(&head, 0);
|
||||
|
||||
let mut scratch = vec![std::mem::MaybeUninit::<u64>::uninit(); 6 * out.lane_stride() / 8];
|
||||
let core_types::node::BatchStatus::Filled(batch, _) = node.eval_batch(&scoped, 0..6, Some(&mut scratch)) else {
|
||||
let core_types::node::BatchStatus::Filled(batch, ..) = node.eval_batch(&scoped, 0..6, Some(&mut scratch)) else {
|
||||
panic!("expected a filled batch");
|
||||
};
|
||||
assert_eq!(batch.len(), 6);
|
||||
|
||||
@@ -171,8 +171,8 @@ where
|
||||
_ => return Err(GPoll::error("map content extent is not exact")),
|
||||
};
|
||||
match materialize_batch(content, ctx, 0..count as u64, arena) {
|
||||
BatchStatus::Lent(batch, _) => Ok(unsafe { core_types::node::List::new(batch) }),
|
||||
BatchStatus::Filled(batch, _) => Ok(unsafe { core_types::node::List::new(batch.into_shared()) }),
|
||||
BatchStatus::Lent(batch, ..) => Ok(unsafe { core_types::node::List::new(batch) }),
|
||||
BatchStatus::Filled(batch, ..) => Ok(unsafe { core_types::node::List::new(batch.into_shared()) }),
|
||||
BatchStatus::Pending => Err(GPoll::Pending),
|
||||
BatchStatus::Error(error) => Err(GPoll::Error(Box::new(error))),
|
||||
_ => Err(GPoll::error("map content could not materialize")),
|
||||
@@ -533,7 +533,7 @@ mod tests {
|
||||
let scoped = ctx.promoted(&head, 0);
|
||||
|
||||
let mut scratch = vec![std::mem::MaybeUninit::<u64>::uninit(); 5 * out.lane_stride() / 8];
|
||||
let core_types::node::BatchStatus::Filled(batch, _) = node.eval_batch(&scoped, 0..5, Some(&mut scratch)) else {
|
||||
let core_types::node::BatchStatus::Filled(batch, ..) = node.eval_batch(&scoped, 0..5, Some(&mut scratch)) else {
|
||||
panic!("expected a filled batch");
|
||||
};
|
||||
let batch = batch.into_shared();
|
||||
@@ -643,7 +643,7 @@ mod tests {
|
||||
let scoped = ctx.promoted(&head, 0);
|
||||
|
||||
let mut scratch = vec![std::mem::MaybeUninit::<u64>::uninit(); 3 * out.lane_stride() / 8];
|
||||
let core_types::node::BatchStatus::Filled(batch, _) = node.eval_batch(&scoped, 0..3, Some(&mut scratch)) else {
|
||||
let core_types::node::BatchStatus::Filled(batch, ..) = node.eval_batch(&scoped, 0..3, Some(&mut scratch)) else {
|
||||
panic!("expected a filled batch");
|
||||
};
|
||||
let batch = batch.into_shared();
|
||||
|
||||
@@ -1143,7 +1143,7 @@ mod graphene_test {
|
||||
// One u64 word per lane: the uninstalled layout keeps the f64 inline.
|
||||
let mut scratch = [const { MaybeUninit::uninit() }; 4];
|
||||
let status = erased.eval_batch(&ctx, 2..6, Some(&mut scratch));
|
||||
let BatchStatus::Filled(batch, finality) = status else {
|
||||
let BatchStatus::Filled(batch, finality, _) = status else {
|
||||
panic!("expected filled, got {status:?}");
|
||||
};
|
||||
let mut got = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user