From d0aa01cb91bf3e908d9c3aa4b96833b7974586a7 Mon Sep 17 00:00:00 2001 From: Xiaochun Tong Date: Fri, 22 Sep 2023 19:15:30 -0400 Subject: [PATCH] update submod --- luisa_compute/src/resource.rs | 15 +++++++++++---- luisa_compute_sys/LuisaCompute | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/luisa_compute/src/resource.rs b/luisa_compute/src/resource.rs index 386f101..ac18f52 100644 --- a/luisa_compute/src/resource.rs +++ b/luisa_compute/src/resource.rs @@ -1530,10 +1530,7 @@ impl BufferVar { } 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 @@ -1811,6 +1808,11 @@ impl Tex2dVar { ); }) } + pub fn size(&self) -> Expr { + Expr::::from_node(__current_scope(|b| { + b.call(Func::Texture2dSize, &[self.node], Uint2::type_()) + })) + } } impl Tex3dVar { @@ -1865,6 +1867,11 @@ impl Tex3dVar { ); }) } + pub fn size(&self) -> Expr { + Expr::::from_node(__current_scope(|b| { + b.call(Func::Texture3dSize, &[self.node], Uint3::type_()) + })) + } } #[derive(Clone)] pub struct Tex3dVar { diff --git a/luisa_compute_sys/LuisaCompute b/luisa_compute_sys/LuisaCompute index d55d75f..c92380d 160000 --- a/luisa_compute_sys/LuisaCompute +++ b/luisa_compute_sys/LuisaCompute @@ -1 +1 @@ -Subproject commit d55d75f4ce7419ecd482d2375a2a1317ddc6a9b1 +Subproject commit c92380d9d69a814383ad8a80b14fcacbffd24ef8