Skip to content

Commit

Permalink
update submod
Browse files Browse the repository at this point in the history
  • Loading branch information
shiinamiyuki committed Sep 22, 2023
1 parent 4773de9 commit d0aa01c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions luisa_compute/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1530,10 +1530,7 @@ impl<T: Value> BufferVar<T> {
} else {
let node = new_node(
r.pools.as_ref().unwrap(),
Node::new(
CArc::new(Instruction::Buffer),
T::type_()
),
Node::new(CArc::new(Instruction::Buffer), T::type_()),
);
let i = r.captured_buffer.len();
r.captured_buffer
Expand Down Expand Up @@ -1811,6 +1808,11 @@ impl<T: IoTexel> Tex2dVar<T> {
);
})
}
pub fn size(&self) -> Expr<Uint2> {
Expr::<Uint2>::from_node(__current_scope(|b| {
b.call(Func::Texture2dSize, &[self.node], Uint2::type_())
}))
}
}

impl<T: IoTexel> Tex3dVar<T> {
Expand Down Expand Up @@ -1865,6 +1867,11 @@ impl<T: IoTexel> Tex3dVar<T> {
);
})
}
pub fn size(&self) -> Expr<Uint3> {
Expr::<Uint3>::from_node(__current_scope(|b| {
b.call(Func::Texture3dSize, &[self.node], Uint3::type_())
}))
}
}
#[derive(Clone)]
pub struct Tex3dVar<T: IoTexel> {
Expand Down

0 comments on commit d0aa01c

Please sign in to comment.