Skip to main content

engage/generated/unity_engine/rendering/universal/
deferredshaderdata.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-rendering-universal-deferredshaderdata-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        valuetype::{IValueType, ValueType},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/rendering/universal/deferredshaderdata/DeferredShaderData.md"))]
14    #[::unity::class(namespace = "UnityEngine.Rendering.Universal", name = "DeferredShaderData")]
15    #[parent(crate::system::object::Object)]
16    pub struct DeferredShaderData {
17        #[static_field]
18        #[rename(name = "m_Instance")]
19        pub m_instance: crate::unity_engine::rendering::universal::deferredshaderdata::DeferredShaderData,
20        #[offset(24)]
21        #[rename(name = "m_Buffers")]
22        pub m_buffers: ::unity::Array<crate::unity_engine::computebuffer::ComputeBuffer>,
23        #[offset(32)]
24        #[rename(name = "m_BufferInfos")]
25        pub m_buffer_infos: ::unity::Array<crate::unity_engine::rendering::universal::deferredshaderdata::DeferredShaderData_ComputeBufferInfo>,
26        #[offset(40)]
27        #[rename(name = "m_BufferCount")]
28        pub m_buffer_count: i32,
29        #[offset(44)]
30        #[rename(name = "m_CachedBufferIndex")]
31        pub m_cached_buffer_index: i32,
32        #[offset(48)]
33        #[rename(name = "m_FrameIndex")]
34        pub m_frame_index: u32,
35    }
36
37    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/rendering/universal/deferredshaderdata/DeferredShaderData_ComputeBufferInfo.md"))]
38    #[repr(C)]
39    #[derive(::core::clone::Clone, ::core::marker::Copy)]
40    pub struct DeferredShaderData_ComputeBufferInfo {
41        pub frame_used: u32,
42        pub r#type: crate::unity_engine::computebuffertype::ComputeBufferType,
43    }
44    impl ::unity::ClassIdentity for DeferredShaderData_ComputeBufferInfo {
45        const NAME: &'static str = "DeferredShaderData.ComputeBufferInfo";
46        const NAMESPACE: &'static str = "UnityEngine.Rendering.Universal";
47
48        fn class() -> ::unity::Class {
49            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
50            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
51        }
52    }
53    impl ::unity::IlType for DeferredShaderData_ComputeBufferInfo {
54        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
55            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
56        }
57    }
58}
59
60#[cfg(feature = "unity_engine-rendering-universal-deferredshaderdata-types")]
61pub use __types::*;
62
63#[cfg(feature = "unity_engine-rendering-universal-deferredshaderdata")]
64impl DeferredShaderData {
65    #[doc = "`get_instance()` overload"]
66    pub fn get_instance() -> crate::unity_engine::rendering::universal::deferredshaderdata::DeferredShaderData {
67        unsafe {
68            ::unity::il2cpp_call!((::unity::module_base()+0x2ee3e20usize)as*mut u8,crate::unity_engine::rendering::universal::deferredshaderdata::DeferredShaderData;
69            )
70        }
71    }
72
73    #[doc = "`IsLessCircular(u32, u32)` overload"]
74    pub fn is_less_circular(a: impl ::core::convert::Into<u32>, b: impl ::core::convert::Into<u32>) -> bool {
75        unsafe {
76            ::unity::il2cpp_call!((::unity::module_base()+0x2ee4440usize)as*mut u8,bool;
77(u32)::core::convert::Into::into(a),(u32)::core::convert::Into::into(b))
78        }
79    }
80
81    #[doc = "`Align(i32, i32)` overload"]
82    pub fn align(s: impl ::core::convert::Into<i32>, alignment: impl ::core::convert::Into<i32>) -> i32 {
83        unsafe {
84            ::unity::il2cpp_call!((::unity::module_base()+0x2ee4570usize)as*mut u8,i32;
85(i32)::core::convert::Into::into(s),(i32)::core::convert::Into::into(alignment))
86        }
87    }
88
89    #[doc = "`.cctor()` overload"]
90    pub fn cctor() -> () {
91        unsafe {
92            ::unity::il2cpp_call!((::unity::module_base()+0x2ee4590usize)as*mut u8,();
93            )
94        }
95    }
96}
97
98#[cfg(feature = "unity_engine-rendering-universal-deferredshaderdata")]
99pub trait IDeferredShaderDataMethods: IDeferredShaderData {
100    #[doc = "`.ctor()` overload"]
101    fn ctor(self) -> () {
102        unsafe {
103            let __receiver = <DeferredShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
104            ::unity::il2cpp_call!((::unity::module_base()+0x2ee3d40usize)as*mut u8,();
105(DeferredShaderData)__receiver)
106        }
107    }
108    #[doc = "`Dispose()` overload"]
109    fn dispose(self) -> () {
110        unsafe {
111            let __receiver = <DeferredShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
112            {
113                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
114                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
115                    panic!(
116                        "unity: virtual slot {}
117 out of range (vtable len {}
118) on the runtime class behind {}
119 (method `{}
120`)",
121                        4usize,
122                        __vt.len(),
123                        <DeferredShaderData as ::unity::ClassIdentity>::NAME,
124                        "Dispose",
125                    )
126                });
127                let __inner: extern "C" fn(DeferredShaderData, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
128                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
129                __inner(__receiver, __mi)
130            }
131        }
132    }
133    #[doc = "`ResetBuffers()` overload"]
134    fn reset_buffers(self) -> () {
135        unsafe {
136            let __receiver = <DeferredShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
137            ::unity::il2cpp_call!((::unity::module_base()+0x2ee3fe0usize)as*mut u8,();
138(DeferredShaderData)__receiver)
139        }
140    }
141    fn reserve_buffer<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
142        self,
143        count: impl ::core::convert::Into<i32>,
144        as_c_buffer: impl ::core::convert::Into<bool>,
145    ) -> crate::unity_engine::computebuffer::ComputeBuffer {
146        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
147            ::unity::lookup::method_info_on_class(<DeferredShaderData as ::unity::ClassIdentity>::class(), "ReserveBuffer", 2)
148        });
149        #[allow(clippy::type_complexity)]
150        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
151            ::std::sync::OnceLock::new();
152        let _ = false;
153        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
154            ::core::result::Result::Ok(mi) => *mi,
155            ::core::result::Result::Err(e) => {
156                panic!(
157                    "method lookup failed: {}
158::{}
159: {}
160",
161                    <DeferredShaderData as ::unity::ClassIdentity>::NAME,
162                    "ReserveBuffer",
163                    e
164                )
165            },
166        };
167        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
168        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
169        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
170            let mut __guard = __cache.lock().unwrap();
171            *__guard
172                .entry(__key)
173                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
174        };
175        unsafe {
176            let __receiver = <DeferredShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
177            let __f: extern "C" fn(DeferredShaderData, i32, bool, ::unity::OptionalMethod) -> crate::unity_engine::computebuffer::ComputeBuffer =
178                ::core::mem::transmute(__inflated.method_ptr);
179            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
180            __f(
181                __receiver,
182                ::core::convert::Into::into(count),
183                ::core::convert::Into::into(as_c_buffer),
184                ::core::option::Option::Some(__mi_opaque),
185            )
186        }
187    }
188    #[doc = "`GetOrUpdateBuffer(i32, i32, bool)` overload"]
189    fn get_or_update_buffer(
190        self,
191        count: impl ::core::convert::Into<i32>,
192        stride: impl ::core::convert::Into<i32>,
193        is_constant_buffer: impl ::core::convert::Into<bool>,
194    ) -> crate::unity_engine::computebuffer::ComputeBuffer {
195        unsafe {
196            let __receiver = <DeferredShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
197            ::unity::il2cpp_call!((::unity::module_base()+0x2ee4060usize)as*mut u8,crate::unity_engine::computebuffer::ComputeBuffer;
198(DeferredShaderData)__receiver,(i32)::core::convert::Into::into(count),(i32)::core::convert::Into::into(stride),(bool)::core::convert::Into::into(is_constant_buffer))
199        }
200    }
201}
202
203#[cfg(feature = "unity_engine-rendering-universal-deferredshaderdata")]
204impl<__T: IDeferredShaderData> IDeferredShaderDataMethods for __T {}
205
206#[cfg(feature = "unity_engine-rendering-universal-deferredshaderdata")]
207impl DeferredShaderData {
208    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
209        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
210    }
211
212    pub fn get_instance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
213        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
214    }
215
216    pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
217        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
218    }
219
220    pub fn reset_buffers_method_info() -> &'static ::unity::il2cpp::MethodInfo {
221        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
222    }
223
224    pub fn get_or_update_buffer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
225        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
226    }
227
228    pub fn is_less_circular_method_info() -> &'static ::unity::il2cpp::MethodInfo {
229        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
230    }
231
232    pub fn align_method_info() -> &'static ::unity::il2cpp::MethodInfo {
233        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
234    }
235
236    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
237        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
238    }
239}
240
241#[cfg(feature = "unity_engine-rendering-universal-deferredshaderdata")]
242impl DeferredShaderData {
243    #[doc = "Direct (non-virtual) call to `DeferredShaderData`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
244    pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
245        let __mi = Self::dispose_method_info();
246        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
247        __inner(this.into(), ::core::option::Option::None)
248    }
249}
250
251#[cfg(feature = "unity_engine-rendering-universal-deferredshaderdata")]
252impl DeferredShaderData {
253    #[doc = "`.ctor()` — no args"]
254    pub fn new() -> Self {
255        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
256            panic!(
257                "{}
258::{}
259 failed to instantiate",
260                ::core::stringify!(DeferredShaderData),
261                ::core::stringify!(new),
262            )
263        });
264        <Self as IDeferredShaderDataMethods>::ctor(this);
265        this
266    }
267}
268
269#[cfg(feature = "unity_engine-rendering-universal-deferredshaderdata")]
270#[doc(hidden)]
271pub mod prelude {
272    pub use super::{DeferredShaderData, DeferredShaderData_ComputeBufferInfo, IDeferredShaderData, IDeferredShaderDataMethods};
273    #[cfg(feature = "system-object")]
274    pub use crate::system::object::IObjectMethods;
275    #[cfg(feature = "system-valuetype")]
276    pub use crate::system::valuetype::IValueTypeMethods;
277    pub use crate::system::{object::IObject, valuetype::IValueType};
278}