1#[repr(C)]
2#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
3pub struct __BindgenBitfieldUnit<Storage> {
4 storage: Storage,
5}
6impl<Storage> __BindgenBitfieldUnit<Storage> {
7 #[inline]
8 pub const fn new(storage: Storage) -> Self {
9 Self { storage }
10 }
11}
12impl<Storage> __BindgenBitfieldUnit<Storage>
13where
14 Storage: AsRef<[u8]> + AsMut<[u8]>,
15{
16 #[inline]
17 pub fn get_bit(&self, index: usize) -> bool {
18 debug_assert!(index / 8 < self.storage.as_ref().len());
19 let byte_index = index / 8;
20 let byte = self.storage.as_ref()[byte_index];
21 let bit_index = if cfg!(target_endian = "big") {
22 7 - (index % 8)
23 } else {
24 index % 8
25 };
26 let mask = 1 << bit_index;
27 byte & mask == mask
28 }
29 #[inline]
30 pub fn set_bit(&mut self, index: usize, val: bool) {
31 debug_assert!(index / 8 < self.storage.as_ref().len());
32 let byte_index = index / 8;
33 let byte = &mut self.storage.as_mut()[byte_index];
34 let bit_index = if cfg!(target_endian = "big") {
35 7 - (index % 8)
36 } else {
37 index % 8
38 };
39 let mask = 1 << bit_index;
40 if val {
41 *byte |= mask;
42 } else {
43 *byte &= !mask;
44 }
45 }
46 #[inline]
47 pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
48 debug_assert!(bit_width <= 64);
49 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
50 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
51 let mut val = 0;
52 for i in 0..(bit_width as usize) {
53 if self.get_bit(i + bit_offset) {
54 let index = if cfg!(target_endian = "big") {
55 bit_width as usize - 1 - i
56 } else {
57 i
58 };
59 val |= 1 << index;
60 }
61 }
62 val
63 }
64 #[inline]
65 pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
66 debug_assert!(bit_width <= 64);
67 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
68 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
69 for i in 0..(bit_width as usize) {
70 let mask = 1 << i;
71 let val_bit_is_set = val & mask == mask;
72 let index = if cfg!(target_endian = "big") {
73 bit_width as usize - 1 - i
74 } else {
75 i
76 };
77 self.set_bit(index + bit_offset, val_bit_is_set);
78 }
79 }
80}
81#[repr(C)]
82pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
83impl<T> __BindgenUnionField<T> {
84 #[inline]
85 pub const fn new() -> Self {
86 __BindgenUnionField(::std::marker::PhantomData)
87 }
88 #[inline]
89 pub unsafe fn as_ref(&self) -> &T {
90 ::std::mem::transmute(self)
91 }
92 #[inline]
93 pub unsafe fn as_mut(&mut self) -> &mut T {
94 ::std::mem::transmute(self)
95 }
96}
97impl<T> ::std::default::Default for __BindgenUnionField<T> {
98 #[inline]
99 fn default() -> Self {
100 Self::new()
101 }
102}
103impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
104 #[inline]
105 fn clone(&self) -> Self {
106 Self::new()
107 }
108}
109impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
110impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
111 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
112 fmt.write_str("__BindgenUnionField")
113 }
114}
115impl<T> ::std::hash::Hash for __BindgenUnionField<T> {
116 fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {}
117}
118impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
119 fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
120 true
121 }
122}
123impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
124pub const __SAL_H_VERSION: u32 = 180000000;
125pub const __bool_true_false_are_defined: u32 = 1;
126pub const TM_TT_TYPE__SHADER_SYSTEM_REPOSITORY: &'static [u8; 28usize] =
127 b"tm_shader_system_repository\0";
128pub const TM_TT_TYPE__SHADER_SYSTEM_STAGE_DECLARATION: &'static [u8; 35usize] =
129 b"tm_shader_system_stage_declaration\0";
130pub const TM_TT_TYPE__SHADER_SYSTEM_DECLARATION: &'static [u8; 29usize] =
131 b"tm_shader_system_declaration\0";
132pub const TM_TT_TYPE__SHADER_SYSTEM_RENDER_STATE_BLOCK: &'static [u8; 36usize] =
133 b"tm_shader_system_render_state_block\0";
134pub const TM_TT_TYPE__SHADER_SYSTEM_SAMPLER_STATE_BLOCK: &'static [u8; 37usize] =
135 b"tm_shader_system_sampler_state_block\0";
136pub const TM_TT_TYPE__SHADER_SYSTEM_REQUEST: &'static [u8; 25usize] = b"tm_shader_system_request\0";
137pub const TM_TT_TYPE__SHADER_SYSTEM_CONSTANT: &'static [u8; 26usize] =
138 b"tm_shader_system_constant\0";
139pub const TM_TT_TYPE__SHADER_SYSTEM_RESOURCE: &'static [u8; 26usize] =
140 b"tm_shader_system_resource\0";
141pub const TM_TT_TYPE__SHADER_SYSTEM_PAYLOAD: &'static [u8; 25usize] = b"tm_shader_system_payload\0";
142pub const TM_TT_TYPE__SHADER_SYSTEM_EXPORT: &'static [u8; 30usize] =
143 b"tm_shader_system_stage_export\0";
144pub const TM_TT_TYPE__SHADER_SYSTEM_INCLUDE: &'static [u8; 25usize] = b"tm_shader_system_include\0";
145pub const TM_TT_TYPE__SHADER_SYSTEM_VARIATION: &'static [u8; 27usize] =
146 b"tm_shader_system_variation\0";
147pub const TM_TT_TYPE__SHADER_SYSTEM_VARIATION_SYSTEM: &'static [u8; 34usize] =
148 b"tm_shader_system_variation_system\0";
149pub const TM_TT_TYPE__SHADER_SYSTEM_COMPILE_CONFIGURATION: &'static [u8; 39usize] =
150 b"tm_shader_system_compile_configuration\0";
151pub const TM_TT_TYPE__SHADER_SYSTEM_COMPILE_BRANCH: &'static [u8; 32usize] =
152 b"tm_shader_system_compile_branch\0";
153pub const TM_TT_TYPE__SHADER_SYSTEM_PASS_CONDITION: &'static [u8; 32usize] =
154 b"tm_shader_system_pass_condition\0";
155pub const TM_TT_TYPE__SHADER_SYSTEM_PASS: &'static [u8; 22usize] = b"tm_shader_system_pass\0";
156pub const TM_TT_TYPE__SHADER_SYSTEM_COMPILE_CONTEXT: &'static [u8; 33usize] =
157 b"tm_shader_system_compile_context\0";
158pub const TM_TT_TYPE__SHADER_SYSTEM_COMPILED_RESULT: &'static [u8; 33usize] =
159 b"tm_shader_system_compiled_result\0";
160pub const TM_TT_TYPE__SHADER_SYSTEM__CONSTANT_NODE__SETTINGS: &'static [u8; 40usize] =
161 b"tm_shader_system_constant_node_settings\0";
162pub const TM_TT_TYPE__SHADER_SYSTEM_CREATION_GRAPH_NODE_RESOURCE_ASPECT: &'static [u8; 53usize] =
163 b"tm_shader_system_creation_graph_node_resource_aspect\0";
164pub const TM_TT_TYPE__SHADER_SYSTEM_CREATION_GRAPH_NODE_DEFINE: &'static [u8; 44usize] =
165 b"tm_shader_system_creation_graph_node_define\0";
166pub const TM_TT_TYPE__SHADER_SYSTEM_CREATION_GRAPH_NODE_ACTION: &'static [u8; 44usize] =
167 b"tm_shader_system_creation_graph_node_action\0";
168pub const TM_TT_TYPE__SHADER_SYSTEM_CREATION_GRAPH_NODE_CONNECTOR_SETTING_OPTION:
169 &'static [u8; 62usize] = b"tm_shader_system_creation_graph_node_connector_setting_option\0";
170pub const TM_TT_TYPE__SHADER_SYSTEM_CREATION_GRAPH_NODE_CONNECTOR_SETTING: &'static [u8; 55usize] =
171 b"tm_shader_system_creation_graph_node_connector_setting\0";
172pub const TM_TT_TYPE__SHADER_SYSTEM_CREATION_GRAPH_NODE_CONNECTOR_SETTINGS: &'static [u8; 56usize] =
173 b"tm_shader_system_creation_graph_node_connector_settings\0";
174pub const TM_TT_TYPE__SHADER_SYSTEM_CREATION_GRAPH_NODE_CONNECTOR: &'static [u8; 47usize] =
175 b"tm_shader_system_creation_graph_node_connector\0";
176pub const TM_TT_TYPE__SHADER_SYSTEM_CREATION_GRAPH_NODE_CONNECTOR_TYPE_OF: &'static [u8; 55usize] =
177 b"tm_shader_system_creation_graph_node_connector_type_of\0";
178pub const TM_TT_TYPE__SHADER_SYSTEM_CREATION_GRAPH_NODE: &'static [u8; 37usize] =
179 b"tm_shader_system_creation_graph_node\0";
180pub const TM_TT_TYPE__SHADER_SYSTEM_CREATION_GRAPH_NODE_EVALUTAION_CONTEXT_NAME:
181 &'static [u8; 61usize] = b"tm_shader_system_creation_graph_node_evaluation_context_name\0";
182extern "C" {
183 pub fn __va_start(arg1: *mut *mut ::std::os::raw::c_char, ...);
184}
185pub type __vcrt_bool = bool;
186extern "C" {
187 pub fn __security_init_cookie();
188}
189extern "C" {
190 pub fn __security_check_cookie(_StackCookie: usize);
191}
192extern "C" {
193 pub fn __report_gsfailure(_StackCookie: usize);
194}
195extern "C" {
196 pub static mut __security_cookie: usize;
197}
198#[repr(C)]
199#[derive(Copy, Clone)]
200pub union TtIdTBindgenTy1 {
201 pub u64_: u64,
202 pub __bindgen_anon_1: TtIdTBindgenTy1BindgenTy1,
203}
204#[repr(C)]
205#[repr(align(8))]
206#[derive(Default, Copy, Clone)]
207pub struct TtIdTBindgenTy1BindgenTy1 {
208 pub _bitfield_align_1: [u32; 0],
209 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
210}
211impl TtIdTBindgenTy1BindgenTy1 {
212 #[inline]
213 pub fn type_(&self) -> u64 {
214 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 10u8) as u64) }
215 }
216 #[inline]
217 pub fn set_type(&mut self, val: u64) {
218 unsafe {
219 let val: u64 = ::std::mem::transmute(val);
220 self._bitfield_1.set(0usize, 10u8, val as u64)
221 }
222 }
223 #[inline]
224 pub fn generation(&self) -> u64 {
225 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 22u8) as u64) }
226 }
227 #[inline]
228 pub fn set_generation(&mut self, val: u64) {
229 unsafe {
230 let val: u64 = ::std::mem::transmute(val);
231 self._bitfield_1.set(10usize, 22u8, val as u64)
232 }
233 }
234 #[inline]
235 pub fn index(&self) -> u64 {
236 unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 32u8) as u64) }
237 }
238 #[inline]
239 pub fn set_index(&mut self, val: u64) {
240 unsafe {
241 let val: u64 = ::std::mem::transmute(val);
242 self._bitfield_1.set(32usize, 32u8, val as u64)
243 }
244 }
245 #[inline]
246 pub fn new_bitfield_1(
247 type_: u64,
248 generation: u64,
249 index: u64,
250 ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
251 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
252 __bindgen_bitfield_unit.set(0usize, 10u8, {
253 let type_: u64 = unsafe { ::std::mem::transmute(type_) };
254 type_ as u64
255 });
256 __bindgen_bitfield_unit.set(10usize, 22u8, {
257 let generation: u64 = unsafe { ::std::mem::transmute(generation) };
258 generation as u64
259 });
260 __bindgen_bitfield_unit.set(32usize, 32u8, {
261 let index: u64 = unsafe { ::std::mem::transmute(index) };
262 index as u64
263 });
264 __bindgen_bitfield_unit
265 }
266}
267impl Default for TtIdTBindgenTy1 {
268 fn default() -> Self {
269 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
270 unsafe {
271 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
272 s.assume_init()
273 }
274 }
275}
276pub const TM_SHADER_CONSTANT_TYPE_BOOL: ShaderConstantType = 0;
277pub const TM_SHADER_CONSTANT_TYPE_INT: ShaderConstantType = 1;
278pub const TM_SHADER_CONSTANT_TYPE_UINT: ShaderConstantType = 2;
279pub const TM_SHADER_CONSTANT_TYPE_HALF: ShaderConstantType = 3;
280pub const TM_SHADER_CONSTANT_TYPE_FLOAT: ShaderConstantType = 4;
281pub const TM_SHADER_CONSTANT_TYPE_DOUBLE: ShaderConstantType = 5;
282pub const TM_SHADER_CONSTANT_TYPE_STRUCT: ShaderConstantType = 6;
283pub const TM_SHADER_CONSTANT_TYPE_CONSERVATIVE_DEPTH_LESS_EQUAL: ShaderConstantType = 7;
284pub const TM_SHADER_CONSTANT_TYPE_CONSERVATIVE_DEPTH_GREATER_EQUAL: ShaderConstantType = 8;
285pub const TM_SHADER_CONSTANT_TYPE_DEPTH: ShaderConstantType = 9;
286pub const TM_SHADER_CONSTANT_TYPE_STENCIL_REF: ShaderConstantType = 10;
287pub const TM_SHADER_CONSTANT_TYPE_MAX_TYPES: ShaderConstantType = 11;
288pub type ShaderConstantType = ::std::os::raw::c_int;
289#[repr(C)]
290pub struct ShaderConstantT {
291 pub __bindgen_anon_1: ShaderConstantTBindgenTy1,
292 pub type_: ShaderConstantType,
293 pub __bindgen_anon_2: ShaderConstantTBindgenTy2,
294 pub elements: u32,
295 pub _padding_40: [::std::os::raw::c_char; 4usize],
296}
297#[repr(C)]
298pub struct ShaderConstantTBindgenTy1 {
299 pub name: __BindgenUnionField<*const ::std::os::raw::c_char>,
300 pub hashed_name: __BindgenUnionField<StrhashT>,
301 pub bindgen_union_field: u64,
302}
303impl Default for ShaderConstantTBindgenTy1 {
304 fn default() -> Self {
305 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
306 unsafe {
307 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
308 s.assume_init()
309 }
310 }
311}
312#[repr(C)]
313#[derive(Copy, Clone)]
314pub union ShaderConstantTBindgenTy2 {
315 pub __bindgen_anon_1: ShaderConstantTBindgenTy2BindgenTy1,
316 pub struct_size: u32,
317}
318#[repr(C)]
319#[derive(Default, Copy, Clone)]
320pub struct ShaderConstantTBindgenTy2BindgenTy1 {
321 pub rows: u8,
322 pub columns: u8,
323}
324impl Default for ShaderConstantTBindgenTy2 {
325 fn default() -> Self {
326 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
327 unsafe {
328 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
329 s.assume_init()
330 }
331 }
332}
333impl Default for ShaderConstantT {
334 fn default() -> Self {
335 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
336 unsafe {
337 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
338 s.assume_init()
339 }
340 }
341}
342pub const TM_SHADER_RESOURCE_TYPE_BUFFER: ShaderResourceType = 0;
343pub const TM_SHADER_RESOURCE_TYPE_TEXTURE_1D: ShaderResourceType = 1;
344pub const TM_SHADER_RESOURCE_TYPE_TEXTURE_2D: ShaderResourceType = 2;
345pub const TM_SHADER_RESOURCE_TYPE_TEXTURE_3D: ShaderResourceType = 3;
346pub const TM_SHADER_RESOURCE_TYPE_TEXTURE_CUBE: ShaderResourceType = 4;
347pub const TM_SHADER_RESOURCE_TYPE_TEXTURE_1D_ARRAY: ShaderResourceType = 5;
348pub const TM_SHADER_RESOURCE_TYPE_TEXTURE_2D_ARRAY: ShaderResourceType = 6;
349pub const TM_SHADER_RESOURCE_TYPE_TEXTURE_CUBE_ARRAY: ShaderResourceType = 7;
350pub const TM_SHADER_RESOURCE_TYPE_SAMPLER: ShaderResourceType = 8;
351pub const TM_SHADER_RESOURCE_TYPE_SAMPLER_COMPARISON: ShaderResourceType = 9;
352pub const TM_SHADER_RESOURCE_TYPE_ACCELERATION_STRUCTURE: ShaderResourceType = 10;
353pub const TM_SHADER_RESOURCE_TYPE_MAX_TYPES: ShaderResourceType = 11;
354pub type ShaderResourceType = ::std::os::raw::c_int;
355#[repr(C)]
356pub struct ShaderResourceT {
357 pub __bindgen_anon_1: ShaderResourceTBindgenTy1,
358 pub element_type: *const ::std::os::raw::c_char,
359 pub static_resource_name: *const ::std::os::raw::c_char,
360 pub static_resource: u32,
361 pub elements: u32,
362 pub type_: ShaderResourceType,
363 pub requested_view_aspect: u8,
364 pub uav: bool,
365 pub _padding_74: [::std::os::raw::c_char; 2usize],
366}
367#[repr(C)]
368pub struct ShaderResourceTBindgenTy1 {
369 pub name: __BindgenUnionField<*const ::std::os::raw::c_char>,
370 pub hashed_name: __BindgenUnionField<StrhashT>,
371 pub bindgen_union_field: u64,
372}
373impl Default for ShaderResourceTBindgenTy1 {
374 fn default() -> Self {
375 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
376 unsafe {
377 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
378 s.assume_init()
379 }
380 }
381}
382impl Default for ShaderResourceT {
383 fn default() -> Self {
384 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
385 unsafe {
386 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
387 s.assume_init()
388 }
389 }
390}
391#[repr(C)]
392pub struct ShaderPayloadT {
393 pub __bindgen_anon_1: ShaderPayloadTBindgenTy1,
394 pub num_fields: u32,
395 pub _padding_87: [::std::os::raw::c_char; 4usize],
396 pub fields: *const ShaderConstantT,
397}
398#[repr(C)]
399pub struct ShaderPayloadTBindgenTy1 {
400 pub name: __BindgenUnionField<*const ::std::os::raw::c_char>,
401 pub hashed_name: __BindgenUnionField<StrhashT>,
402 pub bindgen_union_field: u64,
403}
404impl Default for ShaderPayloadTBindgenTy1 {
405 fn default() -> Self {
406 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
407 unsafe {
408 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
409 s.assume_init()
410 }
411 }
412}
413impl Default for ShaderPayloadT {
414 fn default() -> Self {
415 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
416 unsafe {
417 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
418 s.assume_init()
419 }
420 }
421}
422pub const TM_SHADER_SYSTEM_SEMANTIC_POSITION: ShaderSystemSemanticType = 0;
423pub const TM_SHADER_SYSTEM_SEMANTIC_DISPATCH_THREAD_ID: ShaderSystemSemanticType = 1;
424pub const TM_SHADER_SYSTEM_SEMANTIC_GROUP_ID: ShaderSystemSemanticType = 2;
425pub const TM_SHADER_SYSTEM_SEMANTIC_GROUP_INDEX: ShaderSystemSemanticType = 3;
426pub const TM_SHADER_SYSTEM_SEMANTIC_GROUP_THREAD_ID: ShaderSystemSemanticType = 4;
427pub const TM_SHADER_SYSTEM_SEMANTIC_INSTANCE_ID: ShaderSystemSemanticType = 5;
428pub const TM_SHADER_SYSTEM_SEMANTIC_PRIMITIVE_ID: ShaderSystemSemanticType = 6;
429pub const TM_SHADER_SYSTEM_SEMANTIC_VERTEX_ID: ShaderSystemSemanticType = 7;
430pub const TM_SHADER_SYSTEM_SEMANTIC_IS_FRONT_FACE_ID: ShaderSystemSemanticType = 8;
431pub const TM_SHADER_SYSTEM_SEMANTIC_OUTPUT_CONTROL_POINT_ID: ShaderSystemSemanticType = 9;
432pub const TM_SHADER_SYSTEM_SEMANTIC_DOMAIN_LOCATION: ShaderSystemSemanticType = 10;
433pub const TM_SHADER_SYSTEM_SEMANTIC_MAX_SEMANTICS: ShaderSystemSemanticType = 11;
434pub type ShaderSystemSemanticType = ::std::os::raw::c_int;
435pub const TM_SHADER_INTERPOLATION_MODIFIER_LINEAR: ShaderInterpolationModifierType = 0;
436pub const TM_SHADER_INTERPOLATION_MODIFIER_CENTROID: ShaderInterpolationModifierType = 1;
437pub const TM_SHADER_INTERPOLATION_MODIFIER_NOINTERPOLATION: ShaderInterpolationModifierType = 2;
438pub const TM_SHADER_INTERPOLATION_MODIFIER_NOPERSPECTIVE: ShaderInterpolationModifierType = 3;
439pub const TM_SHADER_INTERPOLATION_MODIFIER_SAMPLE: ShaderInterpolationModifierType = 4;
440pub const TM_SHADER_INTERPOLATION_MODIFIER_MAX_MODIFIERS: ShaderInterpolationModifierType = 5;
441pub type ShaderInterpolationModifierType = ::std::os::raw::c_int;
442#[repr(C)]
443pub struct ShaderStageExportT {
444 pub requested: bool,
445 pub _padding_118: [::std::os::raw::c_char; 7usize],
446 pub constant: ShaderConstantT,
447 pub interpolation_modifier: u32,
448 pub _padding_121: [::std::os::raw::c_char; 4usize],
449}
450impl Default for ShaderStageExportT {
451 fn default() -> Self {
452 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
453 unsafe {
454 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
455 s.assume_init()
456 }
457 }
458}
459pub const TM_SHADER_TESS_ATTRIBUTE_DOMAIN_VALUE_TRIANGLE: ShaderTessAttributeDomain = 0;
460pub const TM_SHADER_TESS_ATTRIBUTE_DOMAIN_VALUE_QUAD: ShaderTessAttributeDomain = 1;
461pub const TM_SHADER_TESS_ATTRIBUTE_DOMAIN_VALUE_ISOLINE: ShaderTessAttributeDomain = 2;
462pub const TM_SHADER_TESS_ATTRIBUTE_DOMAIN_VALUE_MAX_VALUES: ShaderTessAttributeDomain = 3;
463pub type ShaderTessAttributeDomain = ::std::os::raw::c_int;
464pub const TM_SHADER_HULL_ATTRIBUTE_OUTPUT_VALUE_POINT: ShaderHullAttributeOutputTopology = 0;
465pub const TM_SHADER_HULL_ATTRIBUTE_OUTPUT_VALUE_LINE: ShaderHullAttributeOutputTopology = 1;
466pub const TM_SHADER_HULL_ATTRIBUTE_OUTPUT_VALUE_TRIANGLE_CW: ShaderHullAttributeOutputTopology = 2;
467pub const TM_SHADER_HULL_ATTRIBUTE_OUTPUT_VALUE_TRIANGLE_CCW: ShaderHullAttributeOutputTopology = 3;
468pub const TM_SHADER_HULL_ATTRIBUTE_OUTPUT_VALUE_MAX_VALUES: ShaderHullAttributeOutputTopology = 4;
469pub type ShaderHullAttributeOutputTopology = ::std::os::raw::c_int;
470pub const TM_SHADER_HULL_ATTRIBUTE_PARTITIONING_VALUE_INTEGER: ShaderHullAttributePartitioning = 0;
471pub const TM_SHADER_HULL_ATTRIBUTE_PARTITIONING_VALUE_FRACTIONAL_EVEN:
472 ShaderHullAttributePartitioning = 1;
473pub const TM_SHADER_HULL_ATTRIBUTE_PARTITIONING_VALUE_FRACTIONAL_ODD:
474 ShaderHullAttributePartitioning = 2;
475pub const TM_SHADER_HULL_ATTRIBUTE_PARTITIONING_VALUE_POW2: ShaderHullAttributePartitioning = 3;
476pub const TM_SHADER_HULL_ATTRIBUTE_PARTITIONING_VALUE_MAX_VALUES: ShaderHullAttributePartitioning =
477 4;
478pub type ShaderHullAttributePartitioning = ::std::os::raw::c_int;
479pub const TM_SHADER_GEOMETRY_ATTRIBUTE_INSTANCE: ShaderAttributeType = 0;
480pub const TM_SHADER_TESS_ATTRIBUTE_DOMAIN: ShaderAttributeType = 1;
481pub const TM_SHADER_HULL_ATTRIBUTE_MAX_TESS_FACTOR: ShaderAttributeType = 2;
482pub const TM_SHADER_HULL_ATTRIBUTE_OUTPUT_CONTROL_POINTS: ShaderAttributeType = 3;
483pub const TM_SHADER_HULL_ATTRIBUTE_OUTPUT_TOPOLOGY: ShaderAttributeType = 4;
484pub const TM_SHADER_HULL_ATTRIBUTE_PARTITIONING: ShaderAttributeType = 5;
485pub const TM_SHADER_HULL_ATTRIBUTE_PATCH_CONSTANT_FUNCTION: ShaderAttributeType = 6;
486pub const TM_SHADER_PIXEL_ATTRIBUTE_EARLY_DEPTH_STENCIL: ShaderAttributeType = 7;
487pub const TM_SHADER_COMPUTE_ATTRIBUTE_NUM_THREADS: ShaderAttributeType = 8;
488pub const TM_SHADER_SURFACE_ATTRIBUTE_PAYLOAD: ShaderAttributeType = 9;
489pub const TM_SHADER_ATTRIBUTE_MAX_ATTRIBUTES: ShaderAttributeType = 10;
490pub type ShaderAttributeType = ::std::os::raw::c_int;
491pub const TM_SHADER_STAGE_ATTRIBUTE_MAX_STRING_LENGTH: ::std::os::raw::c_int = 64;
492pub type _bindgen_ty_1 = ::std::os::raw::c_int;
493#[repr(C)]
494#[derive(Copy, Clone)]
495pub struct ShaderStageAttributeT {
496 pub type_: ShaderAttributeType,
497 pub _padding_190: [::std::os::raw::c_char; 4usize],
498 pub __bindgen_anon_1: ShaderStageAttributeTBindgenTy1,
499}
500#[repr(C)]
501#[derive(Copy, Clone)]
502pub union ShaderStageAttributeTBindgenTy1 {
503 pub boolean: bool,
504 pub values: [u32; 4usize],
505 pub value: u32,
506 pub string: [::std::os::raw::c_char; 64usize],
507}
508impl Default for ShaderStageAttributeTBindgenTy1 {
509 fn default() -> Self {
510 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
511 unsafe {
512 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
513 s.assume_init()
514 }
515 }
516}
517impl Default for ShaderStageAttributeT {
518 fn default() -> Self {
519 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
520 unsafe {
521 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
522 s.assume_init()
523 }
524 }
525}
526extern "C" {
527 pub static tm_shader_constant_type_to_bytes: [u32; 11usize];
528}
529#[repr(C)]
530#[derive(Copy, Clone)]
531pub union ShaderSystemClTypeT {
532 pub uint64: u64,
533 pub boolean: bool,
534}
535impl Default for ShaderSystemClTypeT {
536 fn default() -> Self {
537 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
538 unsafe {
539 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
540 s.assume_init()
541 }
542 }
543}
544#[repr(C)]
545#[derive(Copy, Clone)]
546pub struct ShaderO {
547 _unused: [u8; 0],
548}
549#[repr(C)]
550#[derive(Copy, Clone)]
551pub struct ShaderSystemIoO {
552 _unused: [u8; 0],
553}
554#[repr(C)]
555#[derive(Copy, Clone)]
556pub struct ShaderBlobHeaderT {
557 _unused: [u8; 0],
558}
559#[repr(C)]
560#[derive(Copy, Clone)]
561pub struct ShaderSystemO {
562 _unused: [u8; 0],
563}
564#[repr(C)]
565pub struct CreationGraphUpdateShaderConstantResourceT {
566 pub draw_calls: *mut CreationGraphOutputT,
567 pub cbuffers: *const ShaderConstantBufferInstanceT,
568 pub io_interface: TtIdT,
569 pub entity_id: u64,
570 pub entity_ctx: *mut EntityContextO,
571}
572impl Default for CreationGraphUpdateShaderConstantResourceT {
573 fn default() -> Self {
574 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
575 unsafe {
576 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
577 s.assume_init()
578 }
579 }
580}
581#[repr(C)]
582#[derive(Copy, Clone)]
583pub struct ShaderDeclarationO {
584 _unused: [u8; 0],
585}
586pub const TM_SHADER_STAGE_VERTEX: ::std::os::raw::c_int = 1;
587pub const TM_SHADER_STAGE_HULL: ::std::os::raw::c_int = 2;
588pub const TM_SHADER_STAGE_DOMAIN: ::std::os::raw::c_int = 4;
589pub const TM_SHADER_STAGE_GEOMETRY: ::std::os::raw::c_int = 8;
590pub const TM_SHADER_STAGE_PIXEL: ::std::os::raw::c_int = 16;
591pub const TM_SHADER_STAGE_COMPUTE: ::std::os::raw::c_int = 32;
592pub const TM_SHADER_STAGE_RAYGEN: ::std::os::raw::c_int = 64;
593pub const TM_SHADER_STAGE_ANY_HIT: ::std::os::raw::c_int = 128;
594pub const TM_SHADER_STAGE_CLOSEST_HIT: ::std::os::raw::c_int = 256;
595pub const TM_SHADER_STAGE_MISS: ::std::os::raw::c_int = 512;
596pub const TM_SHADER_STAGE_INTERSECTION: ::std::os::raw::c_int = 1024;
597pub const TM_SHADER_STAGE_ALL: ::std::os::raw::c_int = 2047;
598pub const TM_SHADER_STAGE_MAX_STAGES: ::std::os::raw::c_int = 11;
599pub type _bindgen_ty_2 = ::std::os::raw::c_int;
600pub const TM_SHADER_SYSTEM_MAX_PASSES: ::std::os::raw::c_int = 16;
601pub const TM_SHADER_SYSTEM_MAX_ACTIVE_SYSTEMS: ::std::os::raw::c_int = 16;
602pub type _bindgen_ty_3 = ::std::os::raw::c_int;
603#[repr(C)]
604#[derive(Default, Copy, Clone)]
605pub struct ShaderDeclarationApi {
606 pub clear: ::std::option::Option<unsafe extern "C" fn(inst: *mut ShaderDeclarationO)>,
607 pub append_declaration: ::std::option::Option<
608 unsafe extern "C" fn(inst: *mut ShaderDeclarationO, src: *const ShaderDeclarationO),
609 >,
610 pub append_render_states: ::std::option::Option<
611 unsafe extern "C" fn(
612 inst: *mut ShaderDeclarationO,
613 block_type: u32,
614 states: *const RendererStateValuePairT,
615 num_states: u32,
616 ),
617 >,
618 pub append_serialized_render_states: ::std::option::Option<
619 unsafe extern "C" fn(inst: *mut ShaderDeclarationO, block_type: u32, data: *const u8),
620 >,
621 pub append_static_sampler_states: ::std::option::Option<
622 unsafe extern "C" fn(
623 inst: *mut ShaderDeclarationO,
624 state_block_name_hash: StrhashT,
625 states: *const RendererStateValuePairT,
626 num_states: u32,
627 ),
628 >,
629 pub request_channel: ::std::option::Option<
630 unsafe extern "C" fn(
631 inst: *mut ShaderDeclarationO,
632 stage_flag: u32,
633 channel_name: *const ::std::os::raw::c_char,
634 ),
635 >,
636 pub set_constant: ::std::option::Option<
637 unsafe extern "C" fn(inst: *mut ShaderDeclarationO, constant: ShaderConstantT),
638 >,
639 pub set_resource: ::std::option::Option<
640 unsafe extern "C" fn(inst: *mut ShaderDeclarationO, resource: ShaderResourceT),
641 >,
642 pub set_payload: ::std::option::Option<
643 unsafe extern "C" fn(inst: *mut ShaderDeclarationO, payload: ShaderPayloadT),
644 >,
645 pub set_stage_export: ::std::option::Option<
646 unsafe extern "C" fn(
647 inst: *mut ShaderDeclarationO,
648 stage_flag: u32,
649 stage_export: ShaderStageExportT,
650 ),
651 >,
652 pub set_stage_system_semantic_import: ::std::option::Option<
653 unsafe extern "C" fn(
654 inst: *mut ShaderDeclarationO,
655 stage_flag: u32,
656 type_: ShaderSystemSemanticType,
657 ),
658 >,
659 pub set_stage_system_semantic_export: ::std::option::Option<
660 unsafe extern "C" fn(
661 inst: *mut ShaderDeclarationO,
662 stage_flag: u32,
663 type_: ShaderSystemSemanticType,
664 ),
665 >,
666 pub set_stage_attribute: ::std::option::Option<
667 unsafe extern "C" fn(
668 inst: *mut ShaderDeclarationO,
669 stage_flag: u32,
670 attr: ShaderStageAttributeT,
671 ),
672 >,
673 pub append_patch_code: ::std::option::Option<
674 unsafe extern "C" fn(
675 inst: *mut ShaderDeclarationO,
676 domain: u32,
677 code: *const ::std::os::raw::c_char,
678 source_file: *const ::std::os::raw::c_char,
679 source_line: u32,
680 ),
681 >,
682 pub append_code: ::std::option::Option<
683 unsafe extern "C" fn(
684 inst: *mut ShaderDeclarationO,
685 stage_flag: u32,
686 code: *const ::std::os::raw::c_char,
687 source_file: *const ::std::os::raw::c_char,
688 source_line: u32,
689 ),
690 >,
691 pub append_common_code: ::std::option::Option<
692 unsafe extern "C" fn(
693 inst: *mut ShaderDeclarationO,
694 code: *const ::std::os::raw::c_char,
695 source_file: *const ::std::os::raw::c_char,
696 source_line: u32,
697 ),
698 >,
699}
700#[repr(C)]
701#[derive(Copy, Clone)]
702pub struct ShaderSystemContextO {
703 _unused: [u8; 0],
704}
705#[repr(C)]
706#[derive(Default, Copy, Clone)]
707pub struct ShaderSystemApi {
708 pub create_context: ::std::option::Option<
709 unsafe extern "C" fn(
710 allocator: *mut AllocatorI,
711 render_graph: *mut RenderGraphO,
712 ) -> *mut ShaderSystemContextO,
713 >,
714 pub clone_context: ::std::option::Option<
715 unsafe extern "C" fn(
716 src_context: *const ShaderSystemContextO,
717 allocator: *mut AllocatorI,
718 ) -> *mut ShaderSystemContextO,
719 >,
720 pub destroy_context:
721 ::std::option::Option<unsafe extern "C" fn(context: *mut ShaderSystemContextO)>,
722 pub set_render_graph: ::std::option::Option<
723 unsafe extern "C" fn(context: *mut ShaderSystemContextO, render_graph: *mut RenderGraphO),
724 >,
725 pub activate_system: ::std::option::Option<
726 unsafe extern "C" fn(
727 context: *mut ShaderSystemContextO,
728 system: *mut ShaderSystemO,
729 cbuffer_instances: *const ShaderConstantBufferInstanceT,
730 num_cbuffer_instances: u32,
731 rbinder_instances: *const ShaderResourceBinderInstanceT,
732 num_rbinder_instances: u32,
733 ),
734 >,
735 pub deactivate_system: ::std::option::Option<
736 unsafe extern "C" fn(context: *mut ShaderSystemContextO, system: *mut ShaderSystemO),
737 >,
738}
739pub const TM_SHADER_SYSTEM_UNINITIALIZED_INSTANCE: ::std::os::raw::c_int = -1;
740pub type _bindgen_ty_4 = ::std::os::raw::c_int;
741#[repr(C)]
742#[derive(Default, Copy, Clone)]
743pub struct ShaderConstantBufferInstanceT {
744 pub instance_id: u32,
745}
746#[repr(C)]
747#[derive(Default, Copy, Clone)]
748pub struct ShaderResourceBinderInstanceT {
749 pub instance_id: u32,
750}
751#[repr(C)]
752#[derive(Copy, Clone)]
753pub struct ShaderConstantUpdateT {
754 pub instance_id: u32,
755 pub constant_offset: u32,
756 pub first_byte: u32,
757 pub num_bytes: u32,
758 pub data: *const ::std::os::raw::c_void,
759}
760impl Default for ShaderConstantUpdateT {
761 fn default() -> Self {
762 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
763 unsafe {
764 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
765 s.assume_init()
766 }
767 }
768}
769#[repr(C)]
770#[derive(Copy, Clone)]
771pub struct ShaderResourceUpdateT {
772 pub instance_id: u32,
773 pub resource_slot: u32,
774 pub first_resource: u32,
775 pub num_resources: u32,
776 pub resources: *const RendererHandleT,
777 pub resources_view_aspect_flags: *const u32,
778}
779impl Default for ShaderResourceUpdateT {
780 fn default() -> Self {
781 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
782 unsafe {
783 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
784 s.assume_init()
785 }
786 }
787}
788#[repr(C)]
789#[derive(Copy, Clone)]
790pub struct ShaderIoO {
791 _unused: [u8; 0],
792}
793#[repr(C)]
794#[derive(Default, Copy, Clone)]
795pub struct ShaderApi {
796 pub create_constant_buffer_instances: ::std::option::Option<
797 unsafe extern "C" fn(
798 io: *mut ShaderIoO,
799 num_instances: u32,
800 result: *mut ShaderConstantBufferInstanceT,
801 ),
802 >,
803 pub create_constant_buffer_instances_from_template: ::std::option::Option<
804 unsafe extern "C" fn(
805 io: *mut ShaderIoO,
806 resource_buffer: *mut RendererResourceCommandBufferO,
807 num_instances: u32,
808 result: *mut ShaderConstantBufferInstanceT,
809 cbuf_template: ShaderConstantBufferInstanceT,
810 ),
811 >,
812 pub destroy_constant_buffer_instances: ::std::option::Option<
813 unsafe extern "C" fn(
814 io: *mut ShaderIoO,
815 instances: *mut ShaderConstantBufferInstanceT,
816 num_instances: u32,
817 ),
818 >,
819 pub create_resource_binder_instances: ::std::option::Option<
820 unsafe extern "C" fn(
821 io: *mut ShaderIoO,
822 num_instances: u32,
823 result: *mut ShaderResourceBinderInstanceT,
824 ),
825 >,
826 pub destroy_resource_binder_instances: ::std::option::Option<
827 unsafe extern "C" fn(
828 io: *mut ShaderIoO,
829 instances: *mut ShaderResourceBinderInstanceT,
830 num_instances: u32,
831 ),
832 >,
833 pub reflect_constants: ::std::option::Option<
834 unsafe extern "C" fn(
835 io: *mut ShaderIoO,
836 num_constants: *mut u32,
837 constants: *mut ShaderConstantT,
838 constant_offsets: *mut u32,
839 ),
840 >,
841 pub lookup_constant: ::std::option::Option<
842 unsafe extern "C" fn(
843 io: *mut ShaderIoO,
844 name: StrhashT,
845 constant: *mut ShaderConstantT,
846 constant_offset: *mut u32,
847 ) -> bool,
848 >,
849 pub update_constants: ::std::option::Option<
850 unsafe extern "C" fn(
851 io: *mut ShaderIoO,
852 resource_buffer: *mut RendererResourceCommandBufferO,
853 constant_updates: *const ShaderConstantUpdateT,
854 num_updates: u32,
855 ),
856 >,
857 pub update_constants_raw: ::std::option::Option<
858 unsafe extern "C" fn(
859 io: *mut ShaderIoO,
860 resource_buffer: *mut RendererResourceCommandBufferO,
861 instance_ids: *const u32,
862 data: *mut *const ::std::os::raw::c_void,
863 offset: u32,
864 size: u32,
865 num_updates: u32,
866 ),
867 >,
868 pub update_constant_buffer_instances_from_template: ::std::option::Option<
869 unsafe extern "C" fn(
870 io: *mut ShaderIoO,
871 resource_buffer: *mut RendererResourceCommandBufferO,
872 num_instances: u32,
873 instances: *mut ShaderConstantBufferInstanceT,
874 cbuf_template: ShaderConstantBufferInstanceT,
875 ),
876 >,
877 pub read_constant_buffer: ::std::option::Option<
878 unsafe extern "C" fn(
879 io: *mut ShaderIoO,
880 instance: ShaderConstantBufferInstanceT,
881 ) -> *const ::std::os::raw::c_void,
882 >,
883 pub reflect_resources: ::std::option::Option<
884 unsafe extern "C" fn(
885 io: *mut ShaderIoO,
886 num_resources: *mut u32,
887 resources: *mut ShaderResourceT,
888 resource_slots: *mut u32,
889 ),
890 >,
891 pub lookup_resource: ::std::option::Option<
892 unsafe extern "C" fn(
893 io: *mut ShaderIoO,
894 name: StrhashT,
895 resource: *mut ShaderResourceT,
896 resource_slot: *mut u32,
897 ) -> bool,
898 >,
899 pub update_resources: ::std::option::Option<
900 unsafe extern "C" fn(
901 io: *mut ShaderIoO,
902 resource_buffer: *mut RendererResourceCommandBufferO,
903 resource_updates: *const ShaderResourceUpdateT,
904 num_updates: u32,
905 ),
906 >,
907 pub read_resource_slot: ::std::option::Option<
908 unsafe extern "C" fn(
909 io: *mut ShaderIoO,
910 instance: ShaderResourceBinderInstanceT,
911 slot: u32,
912 aspects: *mut *const u32,
913 ) -> *const RendererHandleT,
914 >,
915 pub max_passes: ::std::option::Option<unsafe extern "C" fn(shader: *mut ShaderO) -> u8>,
916 pub assemble_shader_infos: ::std::option::Option<
917 unsafe extern "C" fn(
918 shader: *mut ShaderO,
919 state_override_blocks: *const RendererHandleT,
920 num_state_override_blocks: u32,
921 context: *const ShaderSystemContextO,
922 visibility_context: StrhashT,
923 resource_buffer: *mut RendererResourceCommandBufferO,
924 cbuf_instances: *const ShaderConstantBufferInstanceT,
925 rbinder_instances: *const ShaderResourceBinderInstanceT,
926 num_shaders: u32,
927 results: *mut RendererShaderInfoT,
928 ) -> u8,
929 >,
930 pub shader_io:
931 ::std::option::Option<unsafe extern "C" fn(shader: *mut ShaderO) -> *mut ShaderIoO>,
932 pub system_io:
933 ::std::option::Option<unsafe extern "C" fn(system: *mut ShaderSystemO) -> *mut ShaderIoO>,
934 pub name: ::std::option::Option<unsafe extern "C" fn(shader: *const ShaderO) -> StrhashT>,
935 pub shader_version: ::std::option::Option<unsafe extern "C" fn(shader: *const ShaderO) -> u32>,
936 pub system_version:
937 ::std::option::Option<unsafe extern "C" fn(system: *const ShaderSystemO) -> u32>,
938}
939pub const TM_SHADER_STATE_OVERRIDE_DOUBLE_SIDED: ShaderStateOverrides = 0;
940pub const TM_SHADER_STATE_OVERRIDE_FRONT_FACE_CW: ShaderStateOverrides = 1;
941pub const TM_SHADER_STATE_OVERRIDE_DEPTH_TEST_GREATER_EQUAL: ShaderStateOverrides = 2;
942pub const TM_SHADER_STATE_OVERRIDE_DEPTH_TEST_LESS: ShaderStateOverrides = 3;
943pub const TM_SHADER_STATE_OVERRIDE_MAX_SHADER_STATE_OVERRIDES: ShaderStateOverrides = 4;
944pub type ShaderStateOverrides = ::std::os::raw::c_int;
945#[repr(C)]
946#[derive(Copy, Clone)]
947pub struct ShaderRepositoryO {
948 _unused: [u8; 0],
949}
950pub const TM_SHADER_SYSTEM_BACKGROUND_CREATE_STATUS_SUCCESS: ShaderSystemBackgroundStatus = 0;
951pub const TM_SHADER_SYSTEM_BACKGROUND_CREATE_STATUS_CANCEL: ShaderSystemBackgroundStatus = 1;
952pub const TM_SHADER_SYSTEM_BACKGROUND_CREATE_STATUS_ERROR: ShaderSystemBackgroundStatus = 2;
953pub type ShaderSystemBackgroundStatus = ::std::os::raw::c_int;
954#[repr(C)]
955#[derive(Copy, Clone)]
956pub struct ShaderSystemBackgroundCreateI {
957 pub user_data: *mut ::std::os::raw::c_void,
958 pub done: ::std::option::Option<
959 unsafe extern "C" fn(
960 status: ShaderSystemBackgroundStatus,
961 blob: *const ShaderBlobHeaderT,
962 blob_size: u64,
963 user_data: *mut ::std::os::raw::c_void,
964 ),
965 >,
966}
967impl Default for ShaderSystemBackgroundCreateI {
968 fn default() -> Self {
969 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
970 unsafe {
971 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
972 s.assume_init()
973 }
974 }
975}
976#[repr(C)]
977#[derive(Default, Copy, Clone)]
978pub struct ShaderRepositoryApi {
979 pub create: ::std::option::Option<
980 unsafe extern "C" fn(
981 system_io: *mut ShaderSystemIoO,
982 a: *mut AllocatorI,
983 backend: *mut RendererBackendI,
984 shader_compiler_api: *mut RendererShaderCompilerApi,
985 tt: *mut TheTruthO,
986 ) -> *mut ShaderRepositoryO,
987 >,
988 pub destroy: ::std::option::Option<
989 unsafe extern "C" fn(
990 inst: *mut ShaderRepositoryO,
991 resource_buffer: *mut RendererResourceCommandBufferO,
992 ),
993 >,
994 pub set_the_truth: ::std::option::Option<
995 unsafe extern "C" fn(inst: *mut ShaderRepositoryO, tt: *mut TheTruthO),
996 >,
997 pub create_truth_types: ::std::option::Option<unsafe extern "C" fn(tt: *mut TheTruthO)>,
998 pub import_truth_declaration_from_config: ::std::option::Option<
999 unsafe extern "C" fn(
1000 inst: *mut ShaderRepositoryO,
1001 config: *const ConfigI,
1002 pi: *const JsonParseInfoT,
1003 name: StrhashT,
1004 validity_hash: u64,
1005 time_stamp: *const FileTimeO,
1006 filename: *const ::std::os::raw::c_char,
1007 ) -> TtIdT,
1008 >,
1009 pub destroy_truth_declaration:
1010 ::std::option::Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT)>,
1011 pub lookup_truth_declaration: ::std::option::Option<
1012 unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> TtIdT,
1013 >,
1014 pub lookup_declaration_validity_hash:
1015 ::std::option::Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, id: TtIdT) -> u64>,
1016 pub load_shader_declaration: ::std::option::Option<
1017 unsafe extern "C" fn(
1018 inst: *mut ShaderRepositoryO,
1019 declaration: *mut ShaderDeclarationO,
1020 id: TtIdT,
1021 ),
1022 >,
1023 pub last_modified: ::std::option::Option<
1024 unsafe extern "C" fn(inst: *mut ShaderRepositoryO, id: TtIdT, modified: *mut FileTimeO),
1025 >,
1026 pub host_save_state: ::std::option::Option<
1027 unsafe extern "C" fn(
1028 inst: *mut ShaderRepositoryO,
1029 carray: *mut *mut ::std::os::raw::c_char,
1030 a: *mut AllocatorI,
1031 ),
1032 >,
1033 pub client_load_state: ::std::option::Option<
1034 unsafe extern "C" fn(
1035 inst: *mut ShaderRepositoryO,
1036 tt: *mut TheTruthO,
1037 state: *mut *const ::std::os::raw::c_char,
1038 ),
1039 >,
1040 pub create_shader_declaration: ::std::option::Option<
1041 unsafe extern "C" fn(
1042 inst: *mut ShaderRepositoryO,
1043 a: *mut AllocatorI,
1044 ) -> *mut ShaderDeclarationO,
1045 >,
1046 pub destroy_shader_declaration: ::std::option::Option<
1047 unsafe extern "C" fn(inst: *mut ShaderRepositoryO, declaration: *mut ShaderDeclarationO),
1048 >,
1049 pub generate_system_includes: ::std::option::Option<
1050 unsafe extern "C" fn(
1051 inst: *mut ShaderRepositoryO,
1052 output_path: *const ::std::os::raw::c_char,
1053 ),
1054 >,
1055 pub update_shaders_from_directory: ::std::option::Option<
1056 unsafe extern "C" fn(
1057 inst: *mut ShaderRepositoryO,
1058 dir: *const ::std::os::raw::c_char,
1059 recursive: bool,
1060 allocator: *mut AllocatorI,
1061 res_buf: *mut RendererResourceCommandBufferO,
1062 ),
1063 >,
1064 pub allocator: ::std::option::Option<
1065 unsafe extern "C" fn(inst: *mut ShaderRepositoryO) -> *mut AllocatorI,
1066 >,
1067 pub refresh_truth_shaders:
1068 ::std::option::Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO)>,
1069 pub lookup_or_create_shader: ::std::option::Option<
1070 unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> *mut ShaderO,
1071 >,
1072 pub lookup_or_create_system: ::std::option::Option<
1073 unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> *mut ShaderSystemO,
1074 >,
1075 pub create_shader_from_blob: ::std::option::Option<
1076 unsafe extern "C" fn(
1077 inst: *mut ShaderRepositoryO,
1078 res_buf: *mut RendererResourceCommandBufferO,
1079 shader_blob: *const ShaderBlobHeaderT,
1080 ) -> *mut ShaderO,
1081 >,
1082 pub compile_shader: ::std::option::Option<
1083 unsafe extern "C" fn(
1084 inst: *mut ShaderRepositoryO,
1085 res_buf: *mut RendererResourceCommandBufferO,
1086 shader: *mut ShaderO,
1087 active_shader_stages: u32,
1088 active_systems_bitmask: u64,
1089 active_system_names: *const StrhashT,
1090 active_systems: *mut *const ShaderDeclarationO,
1091 num_active_systems: u32,
1092 declarations: *mut *const ShaderDeclarationO,
1093 num_declarations: u32,
1094 validity_hash: u64,
1095 ) -> bool,
1096 >,
1097 pub create_from_declaration: ::std::option::Option<
1098 unsafe extern "C" fn(
1099 inst: *mut ShaderRepositoryO,
1100 res_buf: *mut RendererResourceCommandBufferO,
1101 declaration: TtIdT,
1102 name: StrhashT,
1103 generated_code: *mut ShaderDeclarationO,
1104 creation_graph_data: *const ShaderCreationGraphDataO,
1105 ) -> bool,
1106 >,
1107 pub background_create_from_declaration: ::std::option::Option<
1108 unsafe extern "C" fn(
1109 inst: *mut ShaderRepositoryO,
1110 declaration: TtIdT,
1111 name: StrhashT,
1112 generated_code: *mut ShaderDeclarationO,
1113 creation_graph_data: *const ShaderCreationGraphDataO,
1114 callback: *const ShaderSystemBackgroundCreateI,
1115 ),
1116 >,
1117 pub destroy_shader:
1118 ::std::option::Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT)>,
1119 pub destroy_system:
1120 ::std::option::Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT)>,
1121 pub lookup_shader: ::std::option::Option<
1122 unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> *mut ShaderO,
1123 >,
1124 pub lookup_system: ::std::option::Option<
1125 unsafe extern "C" fn(inst: *mut ShaderRepositoryO, name: StrhashT) -> *mut ShaderSystemO,
1126 >,
1127 pub recycle_resources:
1128 ::std::option::Option<unsafe extern "C" fn(inst: *mut ShaderRepositoryO)>,
1129 pub shader_state_override: ::std::option::Option<
1130 unsafe extern "C" fn(
1131 inst: *mut ShaderRepositoryO,
1132 state_override: ShaderStateOverrides,
1133 ) -> RendererHandleT,
1134 >,
1135 pub lookup_shader_blob: ::std::option::Option<
1136 unsafe extern "C" fn(
1137 inst: *mut ShaderRepositoryO,
1138 name: StrhashT,
1139 size: *mut u64,
1140 ) -> *const ShaderBlobHeaderT,
1141 >,
1142}
1143#[repr(C)]
1144#[derive(Copy, Clone)]
1145pub struct CreationGraphInterpreterO {
1146 _unused: [u8; 0],
1147}
1148#[repr(C)]
1149#[derive(Copy, Clone)]
1150pub struct CreationGraphNodeTypeI {
1151 _unused: [u8; 0],
1152}
1153#[repr(C)]
1154#[derive(Copy, Clone)]
1155pub struct CreationGraphInterpreterWireContentT {
1156 _unused: [u8; 0],
1157}
1158#[repr(C)]
1159#[derive(Copy, Clone)]
1160pub struct ConnectorTypeT {
1161 _unused: [u8; 0],
1162}
1163#[repr(C)]
1164#[derive(Copy, Clone)]
1165pub struct CreationGraphInstanceT {
1166 _unused: [u8; 0],
1167}
1168#[repr(C)]
1169#[derive(Copy, Clone)]
1170pub struct ShaderCreationGraphDataO {
1171 pub allocator: *mut AllocatorI,
1172 pub connected_inputs: *mut bool,
1173 pub actions: *mut TtIdT,
1174 pub settings: *mut TtIdT,
1175}
1176impl Default for ShaderCreationGraphDataO {
1177 fn default() -> Self {
1178 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1179 unsafe {
1180 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1181 s.assume_init()
1182 }
1183 }
1184}
1185#[repr(C)]
1186#[derive(Default, Copy, Clone)]
1187pub struct ShaderCreationGraphApi {
1188 pub create_truth_types: ::std::option::Option<unsafe extern "C" fn(tt: *mut TheTruthO)>,
1189 pub compile_data_to_wire: ::std::option::Option<
1190 unsafe extern "C" fn(
1191 inst: *mut CreationGraphInstanceT,
1192 wire: u32,
1193 tt: *const TheTruthO,
1194 data_id: TtIdT,
1195 to_type_hash: StrhashT,
1196 ) -> bool,
1197 >,
1198 pub node_from_declaration: ::std::option::Option<
1199 unsafe extern "C" fn(
1200 tt: *mut TheTruthO,
1201 declaration: TtIdT,
1202 node: *mut CreationGraphNodeTypeI,
1203 a: *mut AllocatorI,
1204 ),
1205 >,
1206 pub register_static_graph_nodes:
1207 ::std::option::Option<unsafe extern "C" fn(reg: *mut ApiRegistryApi, load: bool)>,
1208 pub wire_result_as_string: ::std::option::Option<
1209 unsafe extern "C" fn(
1210 tt: *const TheTruthO,
1211 ta: *mut TempAllocatorI,
1212 cw: *const CreationGraphInterpreterWireContentT,
1213 requested_type: *const ConnectorTypeT,
1214 ) -> *const ::std::os::raw::c_char,
1215 >,
1216}
1217pub const TM_TT_PROP__SHADER_REPOSITORY__DECLARATIONS: ::std::os::raw::c_int = 0;
1218pub const TM_TT_PROP__SHADER_REPOSITORY__MATERIALS: ::std::os::raw::c_int = 1;
1219pub type _bindgen_ty_5 = ::std::os::raw::c_int;
1220pub const TM_TT_PROP__SHADER_STAGE_DECLARATION__CODE: ::std::os::raw::c_int = 0;
1221pub const TM_TT_PROP__SHADER_STAGE_DECLARATION__CODE_LINE_NUMBER: ::std::os::raw::c_int = 1;
1222pub const TM_TT_PROP__SHADER_STAGE_DECLARATION__STAGE_EXPORTS: ::std::os::raw::c_int = 2;
1223pub const TM_TT_PROP__SHADER_STAGE_DECLARATION__SYSTEM_SEMANTICS_IMPORTS: ::std::os::raw::c_int = 3;
1224pub const TM_TT_PROP__SHADER_STAGE_DECLARATION__SYSTEM_SEMANTICS_EXPORTS: ::std::os::raw::c_int = 4;
1225pub const TM_TT_PROP__SHADER_STAGE_DECLARATION__STAGE_ATTRIBUTES: ::std::os::raw::c_int = 5;
1226pub const TM_TT_PROP__SHADER_STAGE_DECLARATION__CONDITION: ::std::os::raw::c_int = 6;
1227pub type _bindgen_ty_6 = ::std::os::raw::c_int;
1228pub const TM_TT_PROP__SHADER_DECLARATION__NAME: ::std::os::raw::c_int = 0;
1229pub const TM_TT_PROP__SHADER_DECLARATION__COMPILABLE: ::std::os::raw::c_int = 1;
1230pub const TM_TT_PROP__SHADER_DECLARATION__SYSTEM: ::std::os::raw::c_int = 2;
1231pub const TM_TT_PROP__SHADER_DECLARATION__CREATION_GRAPH_NODE: ::std::os::raw::c_int = 3;
1232pub const TM_TT_PROP__SHADER_DECLARATION__INCLUDES: ::std::os::raw::c_int = 4;
1233pub const TM_TT_PROP__SHADER_DECLARATION__VARIATIONS: ::std::os::raw::c_int = 5;
1234pub const TM_TT_PROP__SHADER_DECLARATION__COMPILE_CONFIGURATIONS: ::std::os::raw::c_int = 6;
1235pub const TM_TT_PROP__SHADER_DECLARATION__COMPILE_CONTEXTS: ::std::os::raw::c_int = 7;
1236pub const TM_TT_PROP__SHADER_DECLARATION__FILENAME: ::std::os::raw::c_int = 8;
1237pub const TM_TT_PROP__SHADER_DECLARATION__VALIDITY_HASH: ::std::os::raw::c_int = 9;
1238pub const TM_TT_PROP__SHADER_DECLARATION__LAST_MODIFIED: ::std::os::raw::c_int = 10;
1239pub const TM_TT_PROP__SHADER_DECLARATION__REQUESTS: ::std::os::raw::c_int = 11;
1240pub const TM_TT_PROP__SHADER_DECLARATION__CONSTANTS: ::std::os::raw::c_int = 12;
1241pub const TM_TT_PROP__SHADER_DECLARATION__RESOURCES: ::std::os::raw::c_int = 13;
1242pub const TM_TT_PROP__SHADER_DECLARATION__PAYLOADS: ::std::os::raw::c_int = 14;
1243pub const TM_TT_PROP__SHADER_DECLARATION__RENDER_STATE_BLOCKS: ::std::os::raw::c_int = 15;
1244pub const TM_TT_PROP__SHADER_DECLARATION__SAMPLER_STATE_BLOCKS: ::std::os::raw::c_int = 16;
1245pub const TM_TT_PROP__SHADER_DECLARATION__COMMON_CODE: ::std::os::raw::c_int = 17;
1246pub const TM_TT_PROP__SHADER_DECLARATION__COMMON_CODE_LINE_NUMBER: ::std::os::raw::c_int = 18;
1247pub const TM_TT_PROP__SHADER_DECLARATION__FUNCTION_CODE: ::std::os::raw::c_int = 19;
1248pub const TM_TT_PROP__SHADER_DECLARATION__FUNCTION_CODE_LINE_NUMBER: ::std::os::raw::c_int = 20;
1249pub const TM_TT_PROP__SHADER_DECLARATION__VERTEX_STAGE: ::std::os::raw::c_int = 21;
1250pub const TM_TT_PROP__SHADER_DECLARATION__HULL_STAGE: ::std::os::raw::c_int = 22;
1251pub const TM_TT_PROP__SHADER_DECLARATION__DOMAIN_STAGE: ::std::os::raw::c_int = 23;
1252pub const TM_TT_PROP__SHADER_DECLARATION__GEOMETRY_STAGE: ::std::os::raw::c_int = 24;
1253pub const TM_TT_PROP__SHADER_DECLARATION__PIXEL_STAGE: ::std::os::raw::c_int = 25;
1254pub const TM_TT_PROP__SHADER_DECLARATION__COMPUTE_STAGE: ::std::os::raw::c_int = 26;
1255pub const TM_TT_PROP__SHADER_DECLARATION__RAYGEN_STAGE: ::std::os::raw::c_int = 27;
1256pub const TM_TT_PROP__SHADER_DECLARATION__ANY_HIT_STAGE: ::std::os::raw::c_int = 28;
1257pub const TM_TT_PROP__SHADER_DECLARATION__CLOSEST_HIT_STAGE: ::std::os::raw::c_int = 29;
1258pub const TM_TT_PROP__SHADER_DECLARATION__MISS_STAGE: ::std::os::raw::c_int = 30;
1259pub const TM_TT_PROP__SHADER_DECLARATION__INTERSECTION_STAGE: ::std::os::raw::c_int = 31;
1260pub const TM_TT_PROP__SHADER_DECLARATION__HULL_PATCH: ::std::os::raw::c_int = 32;
1261pub const TM_TT_PROP__SHADER_DECLARATION__HULL_PATCH_LINE_NUMBER: ::std::os::raw::c_int = 33;
1262pub type _bindgen_ty_7 = ::std::os::raw::c_int;
1263pub const TM_TT_PROP__RENDER_STATE_BLOCK__TYPE: ::std::os::raw::c_int = 0;
1264pub const TM_TT_PROP__RENDER_STATE_BLOCK__STATES: ::std::os::raw::c_int = 1;
1265pub type _bindgen_ty_8 = ::std::os::raw::c_int;
1266pub const TM_TT_PROP__SAMPLER_STATE_BLOCK__NAME: ::std::os::raw::c_int = 0;
1267pub const TM_TT_PROP__SAMPLER_STATE_BLOCK__STATES: ::std::os::raw::c_int = 1;
1268pub type _bindgen_ty_9 = ::std::os::raw::c_int;
1269pub const TM_TT_PROP__SHADER_REQUEST__TYPE_NAME: ::std::os::raw::c_int = 0;
1270pub const TM_TT_PROP__SHADER_REQUEST__CHANNEL_NAME: ::std::os::raw::c_int = 1;
1271pub type _bindgen_ty_10 = ::std::os::raw::c_int;
1272pub const TM_TT_PROP__SHADER_CONSTANT__NAME: ::std::os::raw::c_int = 0;
1273pub const TM_TT_PROP__SHADER_CONSTANT__TYPE: ::std::os::raw::c_int = 1;
1274pub const TM_TT_PROP__SHADER_CONSTANT__ROWS: ::std::os::raw::c_int = 2;
1275pub const TM_TT_PROP__SHADER_CONSTANT__COLUMNS: ::std::os::raw::c_int = 3;
1276pub const TM_TT_PROP__SHADER_CONSTANT__STRUCT_SIZE: ::std::os::raw::c_int = 4;
1277pub const TM_TT_PROP__SHADER_CONSTANT__ELEMENTS: ::std::os::raw::c_int = 5;
1278pub type _bindgen_ty_11 = ::std::os::raw::c_int;
1279pub const TM_TT_PROP__SHADER_RESOURCE__NAME: ::std::os::raw::c_int = 0;
1280pub const TM_TT_PROP__SHADER_RESOURCE__TYPE: ::std::os::raw::c_int = 1;
1281pub const TM_TT_PROP__SHADER_RESOURCE__ELEMENT_TYPE: ::std::os::raw::c_int = 2;
1282pub const TM_TT_PROP__SHADER_RESOURCE__ELEMENTS: ::std::os::raw::c_int = 3;
1283pub const TM_TT_PROP__SHADER_RESOURCE__STATIC_RESOURCE: ::std::os::raw::c_int = 4;
1284pub const TM_TT_PROP__SHADER_RESOURCE__UAV: ::std::os::raw::c_int = 5;
1285pub type _bindgen_ty_12 = ::std::os::raw::c_int;
1286pub const TM_TT_PROP__SHADER_PAYLOAD__NAME: ::std::os::raw::c_int = 0;
1287pub const TM_TT_PROP__SHADER_PAYLOAD__FIELDS: ::std::os::raw::c_int = 1;
1288pub type _bindgen_ty_13 = ::std::os::raw::c_int;
1289pub const TM_TT_PROP__STAGE_EXPORT__CONSTANT: ::std::os::raw::c_int = 0;
1290pub const TM_TT_PROP__STAGE_EXPORT__INTERPOLATION_MODIFIER: ::std::os::raw::c_int = 1;
1291pub const TM_TT_PROP__STAGE_EXPORT__CHANNEL_REQUESTED: ::std::os::raw::c_int = 2;
1292pub type _bindgen_ty_14 = ::std::os::raw::c_int;
1293pub const TM_TT_PROP__INCLUDE__NAME: ::std::os::raw::c_int = 0;
1294pub type _bindgen_ty_15 = ::std::os::raw::c_int;
1295pub const TM_TT_PROP__VARIATION__SYSTEMS: ::std::os::raw::c_int = 0;
1296pub type _bindgen_ty_16 = ::std::os::raw::c_int;
1297pub const TM_TT_PROP__VARIATION__SYSTEM__NAME: ::std::os::raw::c_int = 0;
1298pub type _bindgen_ty_17 = ::std::os::raw::c_int;
1299pub const TM_TT_PROP__COMPILE_CONFIGURATION__NAME: ::std::os::raw::c_int = 0;
1300pub const TM_TT_PROP__COMPILE_CONFIGURATION__VARIATIONS: ::std::os::raw::c_int = 1;
1301pub type _bindgen_ty_18 = ::std::os::raw::c_int;
1302pub const TM_TT_PROP__COMPILE_BRANCH__CONDITION: ::std::os::raw::c_int = 0;
1303pub const TM_TT_PROP__COMPILE_BRANCH__THEN: ::std::os::raw::c_int = 1;
1304pub const TM_TT_PROP__COMPILE_BRANCH__ELSE: ::std::os::raw::c_int = 2;
1305pub type _bindgen_ty_19 = ::std::os::raw::c_int;
1306pub const TM_TT_PROP__PASS_CONDITION__SYSTEMS_ACTIVE: ::std::os::raw::c_int = 0;
1307pub type _bindgen_ty_20 = ::std::os::raw::c_int;
1308pub const TM_TT_PROP__PASS__LAYER: ::std::os::raw::c_int = 0;
1309pub const TM_TT_PROP__PASS__CONDITION: ::std::os::raw::c_int = 1;
1310pub const TM_TT_PROP__PASS__ENABLE_SYSTEMS: ::std::os::raw::c_int = 2;
1311pub const TM_TT_PROP__PASS__RENDER_STATE_BLOCKS: ::std::os::raw::c_int = 3;
1312pub const TM_TT_PROP__PASS__COMPILE_CONFIGURATION: ::std::os::raw::c_int = 4;
1313pub type _bindgen_ty_21 = ::std::os::raw::c_int;
1314pub const TM_TT_PROP__COMPILE_CONTEXT__NAME: ::std::os::raw::c_int = 0;
1315pub const TM_TT_PROP__COMPILE_CONTEXT__PASSES: ::std::os::raw::c_int = 1;
1316pub type _bindgen_ty_22 = ::std::os::raw::c_int;
1317pub const TM_TT_PROP__SHADER_SYSTEM_COMPILED_RESULT__NAME: ::std::os::raw::c_int = 0;
1318pub const TM_TT_PROP__SHADER_SYSTEM_COMPILED_RESULT__BUFFER: ::std::os::raw::c_int = 1;
1319pub type _bindgen_ty_23 = ::std::os::raw::c_int;
1320pub const TM_TT_PROP__SHADER_SYSTEM__CONSTANT_NODE__VALUE_TYPE_HASH: ::std::os::raw::c_int = 0;
1321pub const TM_TT_PROP__SHADER_SYSTEM__CONSTANT_NODE__VALUE: ::std::os::raw::c_int = 1;
1322pub type _bindgen_ty_24 = ::std::os::raw::c_int;
1323pub const TM_TT_PROP__CREATION_GRAPH_NODE_RESOURCE_ASPECT__RESOURCE: ::std::os::raw::c_int = 0;
1324pub const TM_TT_PROP__CREATION_GRAPH_NODE_RESOURCE_ASPECT__ASPECT: ::std::os::raw::c_int = 1;
1325pub type _bindgen_ty_25 = ::std::os::raw::c_int;
1326pub const TM_TT_PROP__CREATION_GRAPH_NODE_DEFINE__NAME: ::std::os::raw::c_int = 0;
1327pub type _bindgen_ty_26 = ::std::os::raw::c_int;
1328pub const TM_TT_PROP__CREATION_GRAPH_NODE_ACTION__NAME_HASH: ::std::os::raw::c_int = 0;
1329pub const TM_TT_PROP__CREATION_GRAPH_NODE_ACTION__RESOURCE_ASPECTS: ::std::os::raw::c_int = 1;
1330pub const TM_TT_PROP__CREATION_GRAPH_NODE_ACTION__DEFINES: ::std::os::raw::c_int = 2;
1331pub const TM_TT_PROP__CREATION_GRAPH_NODE_ACTION__REQUESTS: ::std::os::raw::c_int = 3;
1332pub const TM_TT_PROP__CREATION_GRAPH_NODE_ACTION__ENABLE_SYSTEMS: ::std::os::raw::c_int = 4;
1333pub const TM_TT_PROP__CREATION_GRAPH_NODE_ACTION__RENDER_STATE_BLOCKS: ::std::os::raw::c_int = 5;
1334pub type _bindgen_ty_27 = ::std::os::raw::c_int;
1335pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR_SETTING_OPTION__DISPLAY_NAME:
1336 ::std::os::raw::c_int = 0;
1337pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR_SETTING_OPTION__DISPLAY_TOOLTIP:
1338 ::std::os::raw::c_int = 1;
1339pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR_SETTING_OPTION__ACTION: ::std::os::raw::c_int =
1340 2;
1341pub type _bindgen_ty_28 = ::std::os::raw::c_int;
1342pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR_SETTING__DISPLAY_NAME: ::std::os::raw::c_int =
1343 0;
1344pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR_SETTING__DISPLAY_TOOLTIP:
1345 ::std::os::raw::c_int = 1;
1346pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR_SETTING__SETTING_CONDITION:
1347 ::std::os::raw::c_int = 2;
1348pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR_SETTING__OPTIONS: ::std::os::raw::c_int = 3;
1349pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR_SETTING__BOOL_ACTION: ::std::os::raw::c_int =
1350 4;
1351pub type _bindgen_ty_29 = ::std::os::raw::c_int;
1352pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR_SETTINGS__OBJECT_TYPE_HASH:
1353 ::std::os::raw::c_int = 0;
1354pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR_SETTINGS__SETTINGS: ::std::os::raw::c_int = 1;
1355pub type _bindgen_ty_30 = ::std::os::raw::c_int;
1356pub const TM_SHADER_SYSTEM__NODE_CONNECTOR__EVALUATION_STAGE__VERTEX: ::std::os::raw::c_int = 0;
1357pub const TM_SHADER_SYSTEM__NODE_CONNECTOR__EVALUATION_STAGE__HULL: ::std::os::raw::c_int = 1;
1358pub const TM_SHADER_SYSTEM__NODE_CONNECTOR__EVALUATION_STAGE__DOMAIN: ::std::os::raw::c_int = 2;
1359pub const TM_SHADER_SYSTEM__NODE_CONNECTOR__EVALUATION_STAGE__GEOMETRY: ::std::os::raw::c_int = 3;
1360pub const TM_SHADER_SYSTEM__NODE_CONNECTOR__EVALUATION_STAGE__PIXEL: ::std::os::raw::c_int = 4;
1361pub const TM_SHADER_SYSTEM__NODE_CONNECTOR__EVALUATION_STAGE__COMPUTE: ::std::os::raw::c_int = 5;
1362pub const TM_SHADER_SYSTEM__NODE_CONNECTOR__EVALUATION_STAGE__RAYGEN: ::std::os::raw::c_int = 6;
1363pub const TM_SHADER_SYSTEM__NODE_CONNECTOR__EVALUATION_STAGE__ANY_HIT: ::std::os::raw::c_int = 7;
1364pub const TM_SHADER_SYSTEM__NODE_CONNECTOR__EVALUATION_STAGE__CLOSEST_HIT: ::std::os::raw::c_int =
1365 8;
1366pub const TM_SHADER_SYSTEM__NODE_CONNECTOR__EVALUATION_STAGE__MISS: ::std::os::raw::c_int = 9;
1367pub const TM_SHADER_SYSTEM__NODE_CONNECTOR__EVALUATION_STAGE__INTERSECTION: ::std::os::raw::c_int =
1368 10;
1369pub const TM_SHADER_SYSTEM__NODE_CONNECTOR__EVALUATION_STAGE__MAX_STAGES: ::std::os::raw::c_int =
1370 11;
1371pub type _bindgen_ty_31 = ::std::os::raw::c_int;
1372extern "C" {
1373 pub static mut tm_shader_system__node__connector__evaluation_stage_names:
1374 [*const ::std::os::raw::c_char; 11usize];
1375}
1376pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__NAME: ::std::os::raw::c_int = 0;
1377pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__DISPLAY_NAME: ::std::os::raw::c_int = 1;
1378pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__DISPLAY_TOOLTIP: ::std::os::raw::c_int = 2;
1379pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__TARGET_NAME: ::std::os::raw::c_int = 3;
1380pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__TARGET_ELEMENT: ::std::os::raw::c_int = 4;
1381pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__CONNECTOR_FLAG: ::std::os::raw::c_int = 5;
1382pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__IS_OPTIONAL: ::std::os::raw::c_int = 6;
1383pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__TYPE: ::std::os::raw::c_int = 7;
1384pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__STRUCT_NAME: ::std::os::raw::c_int = 8;
1385pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__ROWS: ::std::os::raw::c_int = 9;
1386pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__COLUMNS: ::std::os::raw::c_int = 10;
1387pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__TYPE_OF: ::std::os::raw::c_int = 11;
1388pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__EVALUATION_STAGE: ::std::os::raw::c_int = 12;
1389pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__SETTINGS: ::std::os::raw::c_int = 13;
1390pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__EVALUATION_CONTEXTS: ::std::os::raw::c_int =
1391 14;
1392pub type _bindgen_ty_32 = ::std::os::raw::c_int;
1393pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__TYPE_OF__CONNECTOR: ::std::os::raw::c_int = 0;
1394pub const TM_TT_PROP__CREATION_GRAPH_NODE__CONNECTOR__TYPE_OF__REQUESTED_CHANNEL:
1395 ::std::os::raw::c_int = 1;
1396pub type _bindgen_ty_33 = ::std::os::raw::c_int;
1397pub const TM_TT_PROP__CREATION_GRAPH_NODE__DECLARATION_NAME: ::std::os::raw::c_int = 0;
1398pub const TM_TT_PROP__CREATION_GRAPH_NODE__NODE_NAME: ::std::os::raw::c_int = 1;
1399pub const TM_TT_PROP__CREATION_GRAPH_NODE__DISPLAY_NAME: ::std::os::raw::c_int = 2;
1400pub const TM_TT_PROP__CREATION_GRAPH_NODE__CATEGORY: ::std::os::raw::c_int = 3;
1401pub const TM_TT_PROP__CREATION_GRAPH_NODE__INCLUDES: ::std::os::raw::c_int = 4;
1402pub const TM_TT_PROP__CREATION_GRAPH_NODE__ACTIONS: ::std::os::raw::c_int = 5;
1403pub const TM_TT_PROP__CREATION_GRAPH_NODE__INPUTS: ::std::os::raw::c_int = 6;
1404pub const TM_TT_PROP__CREATION_GRAPH_NODE__OUTPUTS: ::std::os::raw::c_int = 7;
1405pub type _bindgen_ty_34 = ::std::os::raw::c_int;
1406pub const TM_TT_PROP__EVALUATION_CONTEXT_NAME: ::std::os::raw::c_int = 0;
1407pub type _bindgen_ty_35 = ::std::os::raw::c_int;
1408#[repr(C)]
1409#[derive(Default, Copy, Clone)]
1410pub struct CreationGraphOutputT {
1411 pub _address: u8,
1412}
1413
1414use const_cstr::{const_cstr, ConstCStr};
1417
1418use crate::foundation::VersionT;
1419
1420use crate::foundation::*;
1421use crate::plugins::entity::*;
1422use crate::plugins::render_graph::RenderGraphO;
1423use crate::plugins::renderer::*;
1424
1425impl ShaderDeclarationApi {
1426 pub unsafe fn clear(&self, inst: *mut ShaderDeclarationO) {
1427 self.clear.unwrap()(inst)
1428 }
1429
1430 pub unsafe fn append_declaration(
1431 &self,
1432 inst: *mut ShaderDeclarationO,
1433 src: *const ShaderDeclarationO,
1434 ) {
1435 self.append_declaration.unwrap()(inst, src)
1436 }
1437
1438 pub unsafe fn append_render_states(
1439 &self,
1440 inst: *mut ShaderDeclarationO,
1441 block_type: u32,
1442 states: *const RendererStateValuePairT,
1443 num_states: u32,
1444 ) {
1445 self.append_render_states.unwrap()(inst, block_type, states, num_states)
1446 }
1447
1448 pub unsafe fn append_serialized_render_states(
1449 &self,
1450 inst: *mut ShaderDeclarationO,
1451 block_type: u32,
1452 data: *const u8,
1453 ) {
1454 self.append_serialized_render_states.unwrap()(inst, block_type, data)
1455 }
1456
1457 pub unsafe fn append_static_sampler_states(
1458 &self,
1459 inst: *mut ShaderDeclarationO,
1460 state_block_name_hash: StrhashT,
1461 states: *const RendererStateValuePairT,
1462 num_states: u32,
1463 ) {
1464 self.append_static_sampler_states.unwrap()(inst, state_block_name_hash, states, num_states)
1465 }
1466
1467 pub unsafe fn request_channel(
1468 &self,
1469 inst: *mut ShaderDeclarationO,
1470 stage_flag: u32,
1471 channel_name: *const ::std::os::raw::c_char,
1472 ) {
1473 self.request_channel.unwrap()(inst, stage_flag, channel_name)
1474 }
1475
1476 pub unsafe fn set_constant(&self, inst: *mut ShaderDeclarationO, constant: ShaderConstantT) {
1477 self.set_constant.unwrap()(inst, constant)
1478 }
1479
1480 pub unsafe fn set_resource(&self, inst: *mut ShaderDeclarationO, resource: ShaderResourceT) {
1481 self.set_resource.unwrap()(inst, resource)
1482 }
1483
1484 pub unsafe fn set_payload(&self, inst: *mut ShaderDeclarationO, payload: ShaderPayloadT) {
1485 self.set_payload.unwrap()(inst, payload)
1486 }
1487
1488 pub unsafe fn set_stage_export(
1489 &self,
1490 inst: *mut ShaderDeclarationO,
1491 stage_flag: u32,
1492 stage_export: ShaderStageExportT,
1493 ) {
1494 self.set_stage_export.unwrap()(inst, stage_flag, stage_export)
1495 }
1496
1497 pub unsafe fn set_stage_system_semantic_import(
1498 &self,
1499 inst: *mut ShaderDeclarationO,
1500 stage_flag: u32,
1501 type_: ShaderSystemSemanticType,
1502 ) {
1503 self.set_stage_system_semantic_import.unwrap()(inst, stage_flag, type_)
1504 }
1505
1506 pub unsafe fn set_stage_system_semantic_export(
1507 &self,
1508 inst: *mut ShaderDeclarationO,
1509 stage_flag: u32,
1510 type_: ShaderSystemSemanticType,
1511 ) {
1512 self.set_stage_system_semantic_export.unwrap()(inst, stage_flag, type_)
1513 }
1514
1515 pub unsafe fn set_stage_attribute(
1516 &self,
1517 inst: *mut ShaderDeclarationO,
1518 stage_flag: u32,
1519 attr: ShaderStageAttributeT,
1520 ) {
1521 self.set_stage_attribute.unwrap()(inst, stage_flag, attr)
1522 }
1523
1524 pub unsafe fn append_patch_code(
1525 &self,
1526 inst: *mut ShaderDeclarationO,
1527 domain: u32,
1528 code: *const ::std::os::raw::c_char,
1529 source_file: *const ::std::os::raw::c_char,
1530 source_line: u32,
1531 ) {
1532 self.append_patch_code.unwrap()(inst, domain, code, source_file, source_line)
1533 }
1534
1535 pub unsafe fn append_code(
1536 &self,
1537 inst: *mut ShaderDeclarationO,
1538 stage_flag: u32,
1539 code: *const ::std::os::raw::c_char,
1540 source_file: *const ::std::os::raw::c_char,
1541 source_line: u32,
1542 ) {
1543 self.append_code.unwrap()(inst, stage_flag, code, source_file, source_line)
1544 }
1545
1546 pub unsafe fn append_common_code(
1547 &self,
1548 inst: *mut ShaderDeclarationO,
1549 code: *const ::std::os::raw::c_char,
1550 source_file: *const ::std::os::raw::c_char,
1551 source_line: u32,
1552 ) {
1553 self.append_common_code.unwrap()(inst, code, source_file, source_line)
1554 }
1555}
1556
1557impl crate::Api for ShaderDeclarationApi {
1558 const NAME: ConstCStr = const_cstr!("tm_shader_declaration_api");
1559 const VERSION: VersionT = VersionT {
1560 major: 1u32,
1561 minor: 0u32,
1562 patch: 0u32,
1563 };
1564}
1565
1566impl ShaderSystemApi {
1567 pub unsafe fn create_context(
1568 &self,
1569 allocator: *mut AllocatorI,
1570 render_graph: *mut RenderGraphO,
1571 ) -> *mut ShaderSystemContextO {
1572 self.create_context.unwrap()(allocator, render_graph)
1573 }
1574
1575 pub unsafe fn clone_context(
1576 &self,
1577 src_context: *const ShaderSystemContextO,
1578 allocator: *mut AllocatorI,
1579 ) -> *mut ShaderSystemContextO {
1580 self.clone_context.unwrap()(src_context, allocator)
1581 }
1582
1583 pub unsafe fn destroy_context(&self, context: *mut ShaderSystemContextO) {
1584 self.destroy_context.unwrap()(context)
1585 }
1586
1587 pub unsafe fn set_render_graph(
1588 &self,
1589 context: *mut ShaderSystemContextO,
1590 render_graph: *mut RenderGraphO,
1591 ) {
1592 self.set_render_graph.unwrap()(context, render_graph)
1593 }
1594
1595 pub unsafe fn activate_system(
1596 &self,
1597 context: *mut ShaderSystemContextO,
1598 system: *mut ShaderSystemO,
1599 cbuffer_instances: *const ShaderConstantBufferInstanceT,
1600 num_cbuffer_instances: u32,
1601 rbinder_instances: *const ShaderResourceBinderInstanceT,
1602 num_rbinder_instances: u32,
1603 ) {
1604 self.activate_system.unwrap()(
1605 context,
1606 system,
1607 cbuffer_instances,
1608 num_cbuffer_instances,
1609 rbinder_instances,
1610 num_rbinder_instances,
1611 )
1612 }
1613
1614 pub unsafe fn deactivate_system(
1615 &self,
1616 context: *mut ShaderSystemContextO,
1617 system: *mut ShaderSystemO,
1618 ) {
1619 self.deactivate_system.unwrap()(context, system)
1620 }
1621}
1622
1623impl crate::Api for ShaderSystemApi {
1624 const NAME: ConstCStr = const_cstr!("tm_shader_system_api");
1625 const VERSION: VersionT = VersionT {
1626 major: 1u32,
1627 minor: 0u32,
1628 patch: 0u32,
1629 };
1630}
1631
1632impl ShaderApi {
1633 pub unsafe fn create_constant_buffer_instances(
1634 &self,
1635 io: *mut ShaderIoO,
1636 num_instances: u32,
1637 result: *mut ShaderConstantBufferInstanceT,
1638 ) {
1639 self.create_constant_buffer_instances.unwrap()(io, num_instances, result)
1640 }
1641
1642 pub unsafe fn create_constant_buffer_instances_from_template(
1643 &self,
1644 io: *mut ShaderIoO,
1645 resource_buffer: *mut RendererResourceCommandBufferO,
1646 num_instances: u32,
1647 result: *mut ShaderConstantBufferInstanceT,
1648 cbuf_template: ShaderConstantBufferInstanceT,
1649 ) {
1650 self.create_constant_buffer_instances_from_template.unwrap()(
1651 io,
1652 resource_buffer,
1653 num_instances,
1654 result,
1655 cbuf_template,
1656 )
1657 }
1658
1659 pub unsafe fn destroy_constant_buffer_instances(
1660 &self,
1661 io: *mut ShaderIoO,
1662 instances: *mut ShaderConstantBufferInstanceT,
1663 num_instances: u32,
1664 ) {
1665 self.destroy_constant_buffer_instances.unwrap()(io, instances, num_instances)
1666 }
1667
1668 pub unsafe fn create_resource_binder_instances(
1669 &self,
1670 io: *mut ShaderIoO,
1671 num_instances: u32,
1672 result: *mut ShaderResourceBinderInstanceT,
1673 ) {
1674 self.create_resource_binder_instances.unwrap()(io, num_instances, result)
1675 }
1676
1677 pub unsafe fn destroy_resource_binder_instances(
1678 &self,
1679 io: *mut ShaderIoO,
1680 instances: *mut ShaderResourceBinderInstanceT,
1681 num_instances: u32,
1682 ) {
1683 self.destroy_resource_binder_instances.unwrap()(io, instances, num_instances)
1684 }
1685
1686 pub unsafe fn reflect_constants(
1687 &self,
1688 io: *mut ShaderIoO,
1689 num_constants: *mut u32,
1690 constants: *mut ShaderConstantT,
1691 constant_offsets: *mut u32,
1692 ) {
1693 self.reflect_constants.unwrap()(io, num_constants, constants, constant_offsets)
1694 }
1695
1696 pub unsafe fn lookup_constant(
1697 &self,
1698 io: *mut ShaderIoO,
1699 name: StrhashT,
1700 constant: *mut ShaderConstantT,
1701 constant_offset: *mut u32,
1702 ) -> bool {
1703 self.lookup_constant.unwrap()(io, name, constant, constant_offset)
1704 }
1705
1706 pub unsafe fn update_constants(
1707 &self,
1708 io: *mut ShaderIoO,
1709 resource_buffer: *mut RendererResourceCommandBufferO,
1710 constant_updates: *const ShaderConstantUpdateT,
1711 num_updates: u32,
1712 ) {
1713 self.update_constants.unwrap()(io, resource_buffer, constant_updates, num_updates)
1714 }
1715
1716 pub unsafe fn update_constants_raw(
1717 &self,
1718 io: *mut ShaderIoO,
1719 resource_buffer: *mut RendererResourceCommandBufferO,
1720 instance_ids: *const u32,
1721 data: *mut *const ::std::os::raw::c_void,
1722 offset: u32,
1723 size: u32,
1724 num_updates: u32,
1725 ) {
1726 self.update_constants_raw.unwrap()(
1727 io,
1728 resource_buffer,
1729 instance_ids,
1730 data,
1731 offset,
1732 size,
1733 num_updates,
1734 )
1735 }
1736
1737 pub unsafe fn update_constant_buffer_instances_from_template(
1738 &self,
1739 io: *mut ShaderIoO,
1740 resource_buffer: *mut RendererResourceCommandBufferO,
1741 num_instances: u32,
1742 instances: *mut ShaderConstantBufferInstanceT,
1743 cbuf_template: ShaderConstantBufferInstanceT,
1744 ) {
1745 self.update_constant_buffer_instances_from_template.unwrap()(
1746 io,
1747 resource_buffer,
1748 num_instances,
1749 instances,
1750 cbuf_template,
1751 )
1752 }
1753
1754 pub unsafe fn read_constant_buffer(
1755 &self,
1756 io: *mut ShaderIoO,
1757 instance: ShaderConstantBufferInstanceT,
1758 ) -> *const ::std::os::raw::c_void {
1759 self.read_constant_buffer.unwrap()(io, instance)
1760 }
1761
1762 pub unsafe fn reflect_resources(
1763 &self,
1764 io: *mut ShaderIoO,
1765 num_resources: *mut u32,
1766 resources: *mut ShaderResourceT,
1767 resource_slots: *mut u32,
1768 ) {
1769 self.reflect_resources.unwrap()(io, num_resources, resources, resource_slots)
1770 }
1771
1772 pub unsafe fn lookup_resource(
1773 &self,
1774 io: *mut ShaderIoO,
1775 name: StrhashT,
1776 resource: *mut ShaderResourceT,
1777 resource_slot: *mut u32,
1778 ) -> bool {
1779 self.lookup_resource.unwrap()(io, name, resource, resource_slot)
1780 }
1781
1782 pub unsafe fn update_resources(
1783 &self,
1784 io: *mut ShaderIoO,
1785 resource_buffer: *mut RendererResourceCommandBufferO,
1786 resource_updates: *const ShaderResourceUpdateT,
1787 num_updates: u32,
1788 ) {
1789 self.update_resources.unwrap()(io, resource_buffer, resource_updates, num_updates)
1790 }
1791
1792 pub unsafe fn read_resource_slot(
1793 &self,
1794 io: *mut ShaderIoO,
1795 instance: ShaderResourceBinderInstanceT,
1796 slot: u32,
1797 aspects: *mut *const u32,
1798 ) -> *const RendererHandleT {
1799 self.read_resource_slot.unwrap()(io, instance, slot, aspects)
1800 }
1801
1802 pub unsafe fn max_passes(&self, shader: *mut ShaderO) -> u8 {
1803 self.max_passes.unwrap()(shader)
1804 }
1805
1806 pub unsafe fn assemble_shader_infos(
1807 &self,
1808 shader: *mut ShaderO,
1809 state_override_blocks: *const RendererHandleT,
1810 num_state_override_blocks: u32,
1811 context: *const ShaderSystemContextO,
1812 visibility_context: StrhashT,
1813 resource_buffer: *mut RendererResourceCommandBufferO,
1814 cbuf_instances: *const ShaderConstantBufferInstanceT,
1815 rbinder_instances: *const ShaderResourceBinderInstanceT,
1816 num_shaders: u32,
1817 results: *mut RendererShaderInfoT,
1818 ) -> u8 {
1819 self.assemble_shader_infos.unwrap()(
1820 shader,
1821 state_override_blocks,
1822 num_state_override_blocks,
1823 context,
1824 visibility_context,
1825 resource_buffer,
1826 cbuf_instances,
1827 rbinder_instances,
1828 num_shaders,
1829 results,
1830 )
1831 }
1832
1833 pub unsafe fn shader_io(&self, shader: *mut ShaderO) -> *mut ShaderIoO {
1834 self.shader_io.unwrap()(shader)
1835 }
1836
1837 pub unsafe fn system_io(&self, system: *mut ShaderSystemO) -> *mut ShaderIoO {
1838 self.system_io.unwrap()(system)
1839 }
1840
1841 pub unsafe fn name(&self, shader: *const ShaderO) -> StrhashT {
1842 self.name.unwrap()(shader)
1843 }
1844
1845 pub unsafe fn shader_version(&self, shader: *const ShaderO) -> u32 {
1846 self.shader_version.unwrap()(shader)
1847 }
1848
1849 pub unsafe fn system_version(&self, system: *const ShaderSystemO) -> u32 {
1850 self.system_version.unwrap()(system)
1851 }
1852}
1853
1854impl crate::Api for ShaderApi {
1855 const NAME: ConstCStr = const_cstr!("tm_shader_api");
1856 const VERSION: VersionT = VersionT {
1857 major: 1u32,
1858 minor: 0u32,
1859 patch: 0u32,
1860 };
1861}
1862
1863impl ShaderRepositoryApi {
1864 pub unsafe fn create(
1865 &self,
1866 system_io: *mut ShaderSystemIoO,
1867 a: *mut AllocatorI,
1868 backend: *mut RendererBackendI,
1869 shader_compiler_api: *mut RendererShaderCompilerApi,
1870 tt: *mut TheTruthO,
1871 ) -> *mut ShaderRepositoryO {
1872 self.create.unwrap()(system_io, a, backend, shader_compiler_api, tt)
1873 }
1874
1875 pub unsafe fn destroy(
1876 &self,
1877 inst: *mut ShaderRepositoryO,
1878 resource_buffer: *mut RendererResourceCommandBufferO,
1879 ) {
1880 self.destroy.unwrap()(inst, resource_buffer)
1881 }
1882
1883 pub unsafe fn set_the_truth(&self, inst: *mut ShaderRepositoryO, tt: *mut TheTruthO) {
1884 self.set_the_truth.unwrap()(inst, tt)
1885 }
1886
1887 pub unsafe fn create_truth_types(&self, tt: *mut TheTruthO) {
1888 self.create_truth_types.unwrap()(tt)
1889 }
1890
1891 pub unsafe fn import_truth_declaration_from_config(
1892 &self,
1893 inst: *mut ShaderRepositoryO,
1894 config: *const ConfigI,
1895 pi: *const JsonParseInfoT,
1896 name: StrhashT,
1897 validity_hash: u64,
1898 time_stamp: *const FileTimeO,
1899 filename: *const ::std::os::raw::c_char,
1900 ) -> TtIdT {
1901 self.import_truth_declaration_from_config.unwrap()(
1902 inst,
1903 config,
1904 pi,
1905 name,
1906 validity_hash,
1907 time_stamp,
1908 filename,
1909 )
1910 }
1911
1912 pub unsafe fn destroy_truth_declaration(&self, inst: *mut ShaderRepositoryO, name: StrhashT) {
1913 self.destroy_truth_declaration.unwrap()(inst, name)
1914 }
1915
1916 pub unsafe fn lookup_truth_declaration(
1917 &self,
1918 inst: *mut ShaderRepositoryO,
1919 name: StrhashT,
1920 ) -> TtIdT {
1921 self.lookup_truth_declaration.unwrap()(inst, name)
1922 }
1923
1924 pub unsafe fn lookup_declaration_validity_hash(
1925 &self,
1926 inst: *mut ShaderRepositoryO,
1927 id: TtIdT,
1928 ) -> u64 {
1929 self.lookup_declaration_validity_hash.unwrap()(inst, id)
1930 }
1931
1932 pub unsafe fn load_shader_declaration(
1933 &self,
1934 inst: *mut ShaderRepositoryO,
1935 declaration: *mut ShaderDeclarationO,
1936 id: TtIdT,
1937 ) {
1938 self.load_shader_declaration.unwrap()(inst, declaration, id)
1939 }
1940
1941 pub unsafe fn last_modified(
1942 &self,
1943 inst: *mut ShaderRepositoryO,
1944 id: TtIdT,
1945 modified: *mut FileTimeO,
1946 ) {
1947 self.last_modified.unwrap()(inst, id, modified)
1948 }
1949
1950 pub unsafe fn host_save_state(
1951 &self,
1952 inst: *mut ShaderRepositoryO,
1953 carray: *mut *mut ::std::os::raw::c_char,
1954 a: *mut AllocatorI,
1955 ) {
1956 self.host_save_state.unwrap()(inst, carray, a)
1957 }
1958
1959 pub unsafe fn client_load_state(
1960 &self,
1961 inst: *mut ShaderRepositoryO,
1962 tt: *mut TheTruthO,
1963 state: *mut *const ::std::os::raw::c_char,
1964 ) {
1965 self.client_load_state.unwrap()(inst, tt, state)
1966 }
1967
1968 pub unsafe fn create_shader_declaration(
1969 &self,
1970 inst: *mut ShaderRepositoryO,
1971 a: *mut AllocatorI,
1972 ) -> *mut ShaderDeclarationO {
1973 self.create_shader_declaration.unwrap()(inst, a)
1974 }
1975
1976 pub unsafe fn destroy_shader_declaration(
1977 &self,
1978 inst: *mut ShaderRepositoryO,
1979 declaration: *mut ShaderDeclarationO,
1980 ) {
1981 self.destroy_shader_declaration.unwrap()(inst, declaration)
1982 }
1983
1984 pub unsafe fn generate_system_includes(
1985 &self,
1986 inst: *mut ShaderRepositoryO,
1987 output_path: *const ::std::os::raw::c_char,
1988 ) {
1989 self.generate_system_includes.unwrap()(inst, output_path)
1990 }
1991
1992 pub unsafe fn update_shaders_from_directory(
1993 &self,
1994 inst: *mut ShaderRepositoryO,
1995 dir: *const ::std::os::raw::c_char,
1996 recursive: bool,
1997 allocator: *mut AllocatorI,
1998 res_buf: *mut RendererResourceCommandBufferO,
1999 ) {
2000 self.update_shaders_from_directory.unwrap()(inst, dir, recursive, allocator, res_buf)
2001 }
2002
2003 pub unsafe fn allocator(&self, inst: *mut ShaderRepositoryO) -> *mut AllocatorI {
2004 self.allocator.unwrap()(inst)
2005 }
2006
2007 pub unsafe fn refresh_truth_shaders(&self, inst: *mut ShaderRepositoryO) {
2008 self.refresh_truth_shaders.unwrap()(inst)
2009 }
2010
2011 pub unsafe fn lookup_or_create_shader(
2012 &self,
2013 inst: *mut ShaderRepositoryO,
2014 name: StrhashT,
2015 ) -> *mut ShaderO {
2016 self.lookup_or_create_shader.unwrap()(inst, name)
2017 }
2018
2019 pub unsafe fn lookup_or_create_system(
2020 &self,
2021 inst: *mut ShaderRepositoryO,
2022 name: StrhashT,
2023 ) -> *mut ShaderSystemO {
2024 self.lookup_or_create_system.unwrap()(inst, name)
2025 }
2026
2027 pub unsafe fn create_shader_from_blob(
2028 &self,
2029 inst: *mut ShaderRepositoryO,
2030 res_buf: *mut RendererResourceCommandBufferO,
2031 shader_blob: *const ShaderBlobHeaderT,
2032 ) -> *mut ShaderO {
2033 self.create_shader_from_blob.unwrap()(inst, res_buf, shader_blob)
2034 }
2035
2036 pub unsafe fn compile_shader(
2037 &self,
2038 inst: *mut ShaderRepositoryO,
2039 res_buf: *mut RendererResourceCommandBufferO,
2040 shader: *mut ShaderO,
2041 active_shader_stages: u32,
2042 active_systems_bitmask: u64,
2043 active_system_names: *const StrhashT,
2044 active_systems: *mut *const ShaderDeclarationO,
2045 num_active_systems: u32,
2046 declarations: *mut *const ShaderDeclarationO,
2047 num_declarations: u32,
2048 validity_hash: u64,
2049 ) -> bool {
2050 self.compile_shader.unwrap()(
2051 inst,
2052 res_buf,
2053 shader,
2054 active_shader_stages,
2055 active_systems_bitmask,
2056 active_system_names,
2057 active_systems,
2058 num_active_systems,
2059 declarations,
2060 num_declarations,
2061 validity_hash,
2062 )
2063 }
2064
2065 pub unsafe fn create_from_declaration(
2066 &self,
2067 inst: *mut ShaderRepositoryO,
2068 res_buf: *mut RendererResourceCommandBufferO,
2069 declaration: TtIdT,
2070 name: StrhashT,
2071 generated_code: *mut ShaderDeclarationO,
2072 creation_graph_data: *const ShaderCreationGraphDataO,
2073 ) -> bool {
2074 self.create_from_declaration.unwrap()(
2075 inst,
2076 res_buf,
2077 declaration,
2078 name,
2079 generated_code,
2080 creation_graph_data,
2081 )
2082 }
2083
2084 pub unsafe fn background_create_from_declaration(
2085 &self,
2086 inst: *mut ShaderRepositoryO,
2087 declaration: TtIdT,
2088 name: StrhashT,
2089 generated_code: *mut ShaderDeclarationO,
2090 creation_graph_data: *const ShaderCreationGraphDataO,
2091 callback: *const ShaderSystemBackgroundCreateI,
2092 ) {
2093 self.background_create_from_declaration.unwrap()(
2094 inst,
2095 declaration,
2096 name,
2097 generated_code,
2098 creation_graph_data,
2099 callback,
2100 )
2101 }
2102
2103 pub unsafe fn destroy_shader(&self, inst: *mut ShaderRepositoryO, name: StrhashT) {
2104 self.destroy_shader.unwrap()(inst, name)
2105 }
2106
2107 pub unsafe fn destroy_system(&self, inst: *mut ShaderRepositoryO, name: StrhashT) {
2108 self.destroy_system.unwrap()(inst, name)
2109 }
2110
2111 pub unsafe fn lookup_shader(
2112 &self,
2113 inst: *mut ShaderRepositoryO,
2114 name: StrhashT,
2115 ) -> *mut ShaderO {
2116 self.lookup_shader.unwrap()(inst, name)
2117 }
2118
2119 pub unsafe fn lookup_system(
2120 &self,
2121 inst: *mut ShaderRepositoryO,
2122 name: StrhashT,
2123 ) -> *mut ShaderSystemO {
2124 self.lookup_system.unwrap()(inst, name)
2125 }
2126
2127 pub unsafe fn recycle_resources(&self, inst: *mut ShaderRepositoryO) {
2128 self.recycle_resources.unwrap()(inst)
2129 }
2130
2131 pub unsafe fn shader_state_override(
2132 &self,
2133 inst: *mut ShaderRepositoryO,
2134 state_override: ShaderStateOverrides,
2135 ) -> RendererHandleT {
2136 self.shader_state_override.unwrap()(inst, state_override)
2137 }
2138
2139 pub unsafe fn lookup_shader_blob(
2140 &self,
2141 inst: *mut ShaderRepositoryO,
2142 name: StrhashT,
2143 size: *mut u64,
2144 ) -> *const ShaderBlobHeaderT {
2145 self.lookup_shader_blob.unwrap()(inst, name, size)
2146 }
2147}
2148
2149impl crate::Api for ShaderRepositoryApi {
2150 const NAME: ConstCStr = const_cstr!("tm_shader_repository_api");
2151 const VERSION: VersionT = VersionT {
2152 major: 1u32,
2153 minor: 0u32,
2154 patch: 0u32,
2155 };
2156}
2157
2158impl ShaderCreationGraphApi {
2159 pub unsafe fn create_truth_types(&self, tt: *mut TheTruthO) {
2160 self.create_truth_types.unwrap()(tt)
2161 }
2162
2163 pub unsafe fn compile_data_to_wire(
2164 &self,
2165 inst: *mut CreationGraphInstanceT,
2166 wire: u32,
2167 tt: *const TheTruthO,
2168 data_id: TtIdT,
2169 to_type_hash: StrhashT,
2170 ) -> bool {
2171 self.compile_data_to_wire.unwrap()(inst, wire, tt, data_id, to_type_hash)
2172 }
2173
2174 pub unsafe fn node_from_declaration(
2175 &self,
2176 tt: *mut TheTruthO,
2177 declaration: TtIdT,
2178 node: *mut CreationGraphNodeTypeI,
2179 a: *mut AllocatorI,
2180 ) {
2181 self.node_from_declaration.unwrap()(tt, declaration, node, a)
2182 }
2183
2184 pub unsafe fn register_static_graph_nodes(&self, reg: *mut ApiRegistryApi, load: bool) {
2185 self.register_static_graph_nodes.unwrap()(reg, load)
2186 }
2187
2188 pub unsafe fn wire_result_as_string(
2189 &self,
2190 tt: *const TheTruthO,
2191 ta: *mut TempAllocatorI,
2192 cw: *const CreationGraphInterpreterWireContentT,
2193 requested_type: *const ConnectorTypeT,
2194 ) -> *const ::std::os::raw::c_char {
2195 self.wire_result_as_string.unwrap()(tt, ta, cw, requested_type)
2196 }
2197}
2198
2199impl crate::Api for ShaderCreationGraphApi {
2200 const NAME: ConstCStr = const_cstr!("tm_shader_creation_graph_api");
2201 const VERSION: VersionT = VersionT {
2202 major: 1u32,
2203 minor: 0u32,
2204 patch: 0u32,
2205 };
2206}
2207
2208pub const TM_CREATION_GRAPH_UPDATE_SHADER_CONSTANT_AND_RESOURCES: StrhashT = StrhashT {
2209 u64_: 13541595712514035875u64,
2210};
2211pub const TM_CREATION_GRAPH_UPDATE_SHADER_INSTANCE: StrhashT = StrhashT {
2212 u64_: 11170773395381692996u64,
2213};
2214pub const TM_TT_ASPECT__SHADER_SYSTEM_DATA_DRIVEN_SETTINGS: StrhashT = StrhashT {
2215 u64_: 15992631312706212254u64,
2216};
2217pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_REPOSITORY: StrhashT = StrhashT {
2218 u64_: 15185502537365699060u64,
2219};
2220pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_STAGE_DECLARATION: StrhashT = StrhashT {
2221 u64_: 6367897737959879055u64,
2222};
2223pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_DECLARATION: StrhashT = StrhashT {
2224 u64_: 10773388807908132640u64,
2225};
2226pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_RENDER_STATE_BLOCK: StrhashT = StrhashT {
2227 u64_: 12194628297937593064u64,
2228};
2229pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_SAMPLER_STATE_BLOCK: StrhashT = StrhashT {
2230 u64_: 18206817971852099530u64,
2231};
2232pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_REQUEST: StrhashT = StrhashT {
2233 u64_: 3031978811566371918u64,
2234};
2235pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_CONSTANT: StrhashT = StrhashT {
2236 u64_: 15497721740042733126u64,
2237};
2238pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_RESOURCE: StrhashT = StrhashT {
2239 u64_: 6063637962741852513u64,
2240};
2241pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_PAYLOAD: StrhashT = StrhashT {
2242 u64_: 3143131508224954804u64,
2243};
2244pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_EXPORT: StrhashT = StrhashT {
2245 u64_: 1638888224759395780u64,
2246};
2247pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_INCLUDE: StrhashT = StrhashT {
2248 u64_: 1810078001569239366u64,
2249};
2250pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_VARIATION: StrhashT = StrhashT {
2251 u64_: 1487435679566144764u64,
2252};
2253pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_VARIATION_SYSTEM: StrhashT = StrhashT {
2254 u64_: 14511874305837397087u64,
2255};
2256pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_COMPILE_CONFIGURATION: StrhashT = StrhashT {
2257 u64_: 6807065315068906446u64,
2258};
2259pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_COMPILE_BRANCH: StrhashT = StrhashT {
2260 u64_: 10255443381759388015u64,
2261};
2262pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_PASS_CONDITION: StrhashT = StrhashT {
2263 u64_: 18069784956397400067u64,
2264};
2265pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_PASS: StrhashT = StrhashT {
2266 u64_: 11701977933788228641u64,
2267};
2268pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_COMPILE_CONTEXT: StrhashT = StrhashT {
2269 u64_: 16696519998799356633u64,
2270};
2271pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_COMPILED_RESULT: StrhashT = StrhashT {
2272 u64_: 10133004307291133025u64,
2273};
2274pub const TM_TT_TYPE_HASH___SHADER_SYSTEM__CONSTANT_NODE__SETTINGS: StrhashT = StrhashT {
2275 u64_: 2923102057256778094u64,
2276};
2277pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_CREATION_GRAPH_NODE_RESOURCE_ASPECT: StrhashT = StrhashT {
2278 u64_: 13030588925502890531u64,
2279};
2280pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_CREATION_GRAPH_NODE_DEFINE: StrhashT = StrhashT {
2281 u64_: 3619968606120579393u64,
2282};
2283pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_CREATION_GRAPH_NODE_ACTION: StrhashT = StrhashT {
2284 u64_: 9259415262580364095u64,
2285};
2286pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_CREATION_GRAPH_NODE_CONNECTOR_SETTING_OPTION: StrhashT =
2287 StrhashT {
2288 u64_: 4376663816688172497u64,
2289 };
2290pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_CREATION_GRAPH_NODE_CONNECTOR_SETTING: StrhashT =
2291 StrhashT {
2292 u64_: 1414700146970154157u64,
2293 };
2294pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_CREATION_GRAPH_NODE_CONNECTOR_SETTINGS: StrhashT =
2295 StrhashT {
2296 u64_: 7558674430220200475u64,
2297 };
2298pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_CREATION_GRAPH_NODE_CONNECTOR: StrhashT = StrhashT {
2299 u64_: 584995607720450482u64,
2300};
2301pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_CREATION_GRAPH_NODE_CONNECTOR_TYPE_OF: StrhashT =
2302 StrhashT {
2303 u64_: 15480336716737488975u64,
2304 };
2305pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_CREATION_GRAPH_NODE: StrhashT = StrhashT {
2306 u64_: 15834386638400285621u64,
2307};
2308pub const TM_TT_TYPE_HASH__SHADER_SYSTEM_CREATION_GRAPH_NODE_EVALUATION_CONTEXT_NAME: StrhashT =
2309 StrhashT {
2310 u64_: 1601229260840685503u64,
2311 };
2312pub const TM_SHADER_SYSTEM_API_VERSION: VersionT = VersionT {
2313 major: 1u32,
2314 minor: 0u32,
2315 patch: 0u32,
2316};
2317pub const TM_SHADER_DECLARATION_API_VERSION: VersionT = VersionT {
2318 major: 1u32,
2319 minor: 0u32,
2320 patch: 0u32,
2321};
2322pub const TM_SHADER_API_VERSION: VersionT = VersionT {
2323 major: 1u32,
2324 minor: 0u32,
2325 patch: 0u32,
2326};
2327pub const TM_SHADER_CREATION_GRAPH_API_VERSION: VersionT = VersionT {
2328 major: 1u32,
2329 minor: 0u32,
2330 patch: 0u32,
2331};
2332pub const TM_SHADER_REPOSITORY_O_VERSION: VersionT = VersionT {
2333 major: 1u32,
2334 minor: 0u32,
2335 patch: 0u32,
2336};
2337pub const TM_SHADER_REPOSITORY_API_VERSION: VersionT = VersionT {
2338 major: 1u32,
2339 minor: 0u32,
2340 patch: 0u32,
2341};