File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1686,9 +1686,17 @@ impl crate::Device for super::Device {
16861686
16871687 unsafe fn create_acceleration_structure (
16881688 & self ,
1689- _desc : & crate :: AccelerationStructureDescriptor ,
1689+ descriptor : & crate :: AccelerationStructureDescriptor ,
16901690 ) -> Result < super :: AccelerationStructure , crate :: DeviceError > {
1691- unimplemented ! ( )
1691+ // self.counters.acceleration_structures.add(1);
1692+ let device = self . shared . device . lock ( ) ;
1693+ autoreleasepool ( |_| {
1694+ Ok ( super :: AccelerationStructure {
1695+ raw : device
1696+ . newAccelerationStructureWithSize ( descriptor. size as usize )
1697+ . ok_or ( crate :: DeviceError :: OutOfMemory ) ?,
1698+ } )
1699+ } )
16921700 }
16931701
16941702 unsafe fn destroy_acceleration_structure (
You can’t perform that action at this time.
0 commit comments