unity-native-plugin-sys 0.9.0

unity-native-plugin-sys
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
/* automatically generated by rust-bindgen 0.72.1 */

#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ID3D11Device {
    pub _address: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ID3D11Device"][::std::mem::size_of::<ID3D11Device>() - 1usize];
    ["Alignment of ID3D11Device"][::std::mem::align_of::<ID3D11Device>() - 1usize];
};
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ID3D11Resource {
    pub _address: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ID3D11Resource"][::std::mem::size_of::<ID3D11Resource>() - 1usize];
    ["Alignment of ID3D11Resource"][::std::mem::align_of::<ID3D11Resource>() - 1usize];
};
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ID3D11RenderTargetView {
    pub _address: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ID3D11RenderTargetView"][::std::mem::size_of::<ID3D11RenderTargetView>() - 1usize];
    ["Alignment of ID3D11RenderTargetView"]
        [::std::mem::align_of::<ID3D11RenderTargetView>() - 1usize];
};
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ID3D11ShaderResourceView {
    pub _address: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ID3D11ShaderResourceView"]
        [::std::mem::size_of::<ID3D11ShaderResourceView>() - 1usize];
    ["Alignment of ID3D11ShaderResourceView"]
        [::std::mem::align_of::<ID3D11ShaderResourceView>() - 1usize];
};
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct IDXGISwapChain {
    pub _address: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of IDXGISwapChain"][::std::mem::size_of::<IDXGISwapChain>() - 1usize];
    ["Alignment of IDXGISwapChain"][::std::mem::align_of::<IDXGISwapChain>() - 1usize];
};
#[repr(C)]
pub struct IUnityGraphicsD3D11 {
    pub GetDevice: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D11Device>,
    pub TextureFromRenderBuffer: ::std::option::Option<
        unsafe extern "system" fn(buffer: UnityRenderBuffer) -> *mut ID3D11Resource,
    >,
    pub TextureFromNativeTexture:
        ::std::option::Option<unsafe extern "system" fn(texture: UnityTextureID) -> *mut ID3D11Resource>,
    pub RTVFromRenderBuffer: ::std::option::Option<
        unsafe extern "system" fn(surface: UnityRenderBuffer) -> *mut ID3D11RenderTargetView,
    >,
    pub SRVFromNativeTexture: ::std::option::Option<
        unsafe extern "system" fn(texture: UnityTextureID) -> *mut ID3D11ShaderResourceView,
    >,
    pub GetSwapChain: ::std::option::Option<unsafe extern "system" fn() -> *mut IDXGISwapChain>,
    pub GetSyncInterval: ::std::option::Option<unsafe extern "system" fn() -> u32>,
    pub GetPresentFlags: ::std::option::Option<unsafe extern "system" fn() -> u32>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of IUnityGraphicsD3D11"][::std::mem::size_of::<IUnityGraphicsD3D11>() - 64usize];
    ["Alignment of IUnityGraphicsD3D11"][::std::mem::align_of::<IUnityGraphicsD3D11>() - 8usize];
    ["Offset of field: IUnityGraphicsD3D11::GetDevice"]
        [::std::mem::offset_of!(IUnityGraphicsD3D11, GetDevice) - 0usize];
    ["Offset of field: IUnityGraphicsD3D11::TextureFromRenderBuffer"]
        [::std::mem::offset_of!(IUnityGraphicsD3D11, TextureFromRenderBuffer) - 8usize];
    ["Offset of field: IUnityGraphicsD3D11::TextureFromNativeTexture"]
        [::std::mem::offset_of!(IUnityGraphicsD3D11, TextureFromNativeTexture) - 16usize];
    ["Offset of field: IUnityGraphicsD3D11::RTVFromRenderBuffer"]
        [::std::mem::offset_of!(IUnityGraphicsD3D11, RTVFromRenderBuffer) - 24usize];
    ["Offset of field: IUnityGraphicsD3D11::SRVFromNativeTexture"]
        [::std::mem::offset_of!(IUnityGraphicsD3D11, SRVFromNativeTexture) - 32usize];
    ["Offset of field: IUnityGraphicsD3D11::GetSwapChain"]
        [::std::mem::offset_of!(IUnityGraphicsD3D11, GetSwapChain) - 40usize];
    ["Offset of field: IUnityGraphicsD3D11::GetSyncInterval"]
        [::std::mem::offset_of!(IUnityGraphicsD3D11, GetSyncInterval) - 48usize];
    ["Offset of field: IUnityGraphicsD3D11::GetPresentFlags"]
        [::std::mem::offset_of!(IUnityGraphicsD3D11, GetPresentFlags) - 56usize];
};
impl Default for IUnityGraphicsD3D11 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type D3D12_RESOURCE_STATES = ::std::os::raw::c_int;
pub type UINT64 = ::std::os::raw::c_ulonglong;
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ID3D12Resource {
    pub _address: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ID3D12Resource"][::std::mem::size_of::<ID3D12Resource>() - 1usize];
    ["Alignment of ID3D12Resource"][::std::mem::align_of::<ID3D12Resource>() - 1usize];
};
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ID3D12Device {
    pub _address: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ID3D12Device"][::std::mem::size_of::<ID3D12Device>() - 1usize];
    ["Alignment of ID3D12Device"][::std::mem::align_of::<ID3D12Device>() - 1usize];
};
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ID3D12Fence {
    pub _address: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ID3D12Fence"][::std::mem::size_of::<ID3D12Fence>() - 1usize];
    ["Alignment of ID3D12Fence"][::std::mem::align_of::<ID3D12Fence>() - 1usize];
};
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ID3D12GraphicsCommandList {
    pub _address: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ID3D12GraphicsCommandList"]
        [::std::mem::size_of::<ID3D12GraphicsCommandList>() - 1usize];
    ["Alignment of ID3D12GraphicsCommandList"]
        [::std::mem::align_of::<ID3D12GraphicsCommandList>() - 1usize];
};
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct ID3D12CommandQueue {
    pub _address: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ID3D12CommandQueue"][::std::mem::size_of::<ID3D12CommandQueue>() - 1usize];
    ["Alignment of ID3D12CommandQueue"][::std::mem::align_of::<ID3D12CommandQueue>() - 1usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnityGraphicsD3D12ResourceState {
    pub resource: *mut ID3D12Resource,
    pub expected: D3D12_RESOURCE_STATES,
    pub current: D3D12_RESOURCE_STATES,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of UnityGraphicsD3D12ResourceState"]
        [::std::mem::size_of::<UnityGraphicsD3D12ResourceState>() - 16usize];
    ["Alignment of UnityGraphicsD3D12ResourceState"]
        [::std::mem::align_of::<UnityGraphicsD3D12ResourceState>() - 8usize];
    ["Offset of field: UnityGraphicsD3D12ResourceState::resource"]
        [::std::mem::offset_of!(UnityGraphicsD3D12ResourceState, resource) - 0usize];
    ["Offset of field: UnityGraphicsD3D12ResourceState::expected"]
        [::std::mem::offset_of!(UnityGraphicsD3D12ResourceState, expected) - 8usize];
    ["Offset of field: UnityGraphicsD3D12ResourceState::current"]
        [::std::mem::offset_of!(UnityGraphicsD3D12ResourceState, current) - 12usize];
};
impl Default for UnityGraphicsD3D12ResourceState {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnityGraphicsD3D12RecordingState {
    pub commandList: *mut ID3D12GraphicsCommandList,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of UnityGraphicsD3D12RecordingState"]
        [::std::mem::size_of::<UnityGraphicsD3D12RecordingState>() - 8usize];
    ["Alignment of UnityGraphicsD3D12RecordingState"]
        [::std::mem::align_of::<UnityGraphicsD3D12RecordingState>() - 8usize];
    ["Offset of field: UnityGraphicsD3D12RecordingState::commandList"]
        [::std::mem::offset_of!(UnityGraphicsD3D12RecordingState, commandList) - 0usize];
};
impl Default for UnityGraphicsD3D12RecordingState {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub const UnityD3D12GraphicsQueueAccess_kUnityD3D12GraphicsQueueAccess_DontCare:
    UnityD3D12GraphicsQueueAccess = 0;
pub const UnityD3D12GraphicsQueueAccess_kUnityD3D12GraphicsQueueAccess_Allow:
    UnityD3D12GraphicsQueueAccess = 1;
pub type UnityD3D12GraphicsQueueAccess = ::std::os::raw::c_uint;
pub const UnityD3D12EventConfigFlagBits_kUnityD3D12EventConfigFlag_EnsurePreviousFrameSubmission:
    UnityD3D12EventConfigFlagBits = 1;
pub const UnityD3D12EventConfigFlagBits_kUnityD3D12EventConfigFlag_FlushCommandBuffers:
    UnityD3D12EventConfigFlagBits = 2;
pub const UnityD3D12EventConfigFlagBits_kUnityD3D12EventConfigFlag_SyncWorkerThreads:
    UnityD3D12EventConfigFlagBits = 4;
pub const UnityD3D12EventConfigFlagBits_kUnityD3D12EventConfigFlag_ModifiesCommandBuffersState:
    UnityD3D12EventConfigFlagBits = 8;
pub type UnityD3D12EventConfigFlagBits = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnityD3D12PluginEventConfig {
    pub graphicsQueueAccess: UnityD3D12GraphicsQueueAccess,
    pub flags: u32,
    pub ensureActiveRenderTextureIsBound: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of UnityD3D12PluginEventConfig"]
        [::std::mem::size_of::<UnityD3D12PluginEventConfig>() - 12usize];
    ["Alignment of UnityD3D12PluginEventConfig"]
        [::std::mem::align_of::<UnityD3D12PluginEventConfig>() - 4usize];
    ["Offset of field: UnityD3D12PluginEventConfig::graphicsQueueAccess"]
        [::std::mem::offset_of!(UnityD3D12PluginEventConfig, graphicsQueueAccess) - 0usize];
    ["Offset of field: UnityD3D12PluginEventConfig::flags"]
        [::std::mem::offset_of!(UnityD3D12PluginEventConfig, flags) - 4usize];
    ["Offset of field: UnityD3D12PluginEventConfig::ensureActiveRenderTextureIsBound"][::std::mem::offset_of!(
        UnityD3D12PluginEventConfig,
        ensureActiveRenderTextureIsBound
    ) - 8usize];
};
impl Default for UnityD3D12PluginEventConfig {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct UnityGraphicsD3D12PhysicalVideoMemoryControlValues {
    pub reservation: UINT64,
    pub systemMemoryThreshold: UINT64,
    pub residencyHysteresisThreshold: UINT64,
    pub nonEvictableRelativeThreshold: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of UnityGraphicsD3D12PhysicalVideoMemoryControlValues"]
        [::std::mem::size_of::<UnityGraphicsD3D12PhysicalVideoMemoryControlValues>() - 32usize];
    ["Alignment of UnityGraphicsD3D12PhysicalVideoMemoryControlValues"]
        [::std::mem::align_of::<UnityGraphicsD3D12PhysicalVideoMemoryControlValues>() - 8usize];
    ["Offset of field: UnityGraphicsD3D12PhysicalVideoMemoryControlValues::reservation"][::std::mem::offset_of!(
        UnityGraphicsD3D12PhysicalVideoMemoryControlValues,
        reservation
    )
        - 0usize];
    ["Offset of field: UnityGraphicsD3D12PhysicalVideoMemoryControlValues::systemMemoryThreshold"] [:: std :: mem :: offset_of ! (UnityGraphicsD3D12PhysicalVideoMemoryControlValues , systemMemoryThreshold) - 8usize] ;
    ["Offset of field: UnityGraphicsD3D12PhysicalVideoMemoryControlValues::residencyHysteresisThreshold"] [:: std :: mem :: offset_of ! (UnityGraphicsD3D12PhysicalVideoMemoryControlValues , residencyHysteresisThreshold) - 16usize] ;
    ["Offset of field: UnityGraphicsD3D12PhysicalVideoMemoryControlValues::nonEvictableRelativeThreshold"] [:: std :: mem :: offset_of ! (UnityGraphicsD3D12PhysicalVideoMemoryControlValues , nonEvictableRelativeThreshold) - 24usize] ;
};
#[repr(C)]
pub struct IUnityGraphicsD3D12v8 {
    pub GetDevice: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Device>,
    pub GetSwapChain: ::std::option::Option<unsafe extern "system" fn() -> *mut IDXGISwapChain>,
    pub GetSyncInterval: ::std::option::Option<unsafe extern "system" fn() -> u32>,
    pub GetPresentFlags: ::std::option::Option<unsafe extern "system" fn() -> u32>,
    pub GetFrameFence: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Fence>,
    pub GetNextFrameFenceValue: ::std::option::Option<unsafe extern "system" fn() -> UINT64>,
    pub ExecuteCommandList: ::std::option::Option<
        unsafe extern "system" fn(
            commandList: *mut ID3D12GraphicsCommandList,
            stateCount: ::std::os::raw::c_int,
            states: *mut UnityGraphicsD3D12ResourceState,
        ) -> UINT64,
    >,
    pub SetPhysicalVideoMemoryControlValues: ::std::option::Option<
        unsafe extern "system" fn(memInfo: *const UnityGraphicsD3D12PhysicalVideoMemoryControlValues),
    >,
    pub GetCommandQueue: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12CommandQueue>,
    pub TextureFromRenderBuffer:
        ::std::option::Option<unsafe extern "system" fn(rb: UnityRenderBuffer) -> *mut ID3D12Resource>,
    pub TextureFromNativeTexture:
        ::std::option::Option<unsafe extern "system" fn(texture: UnityTextureID) -> *mut ID3D12Resource>,
    pub ConfigureEvent: ::std::option::Option<
        unsafe extern "system" fn(
            eventID: ::std::os::raw::c_int,
            pluginEventConfig: *const UnityD3D12PluginEventConfig,
        ),
    >,
    pub CommandRecordingState: ::std::option::Option<
        unsafe extern "system" fn(
            outCommandRecordingState: *mut UnityGraphicsD3D12RecordingState,
        ) -> bool,
    >,
    pub RequestResourceState: ::std::option::Option<
        unsafe extern "system" fn(resource: *mut ID3D12Resource, state: D3D12_RESOURCE_STATES),
    >,
    pub NotifyResourceState: ::std::option::Option<
        unsafe extern "system" fn(
            resource: *mut ID3D12Resource,
            state: D3D12_RESOURCE_STATES,
            UAVAccess: bool,
        ),
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of IUnityGraphicsD3D12v8"][::std::mem::size_of::<IUnityGraphicsD3D12v8>() - 120usize];
    ["Alignment of IUnityGraphicsD3D12v8"]
        [::std::mem::align_of::<IUnityGraphicsD3D12v8>() - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v8::GetDevice"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, GetDevice) - 0usize];
    ["Offset of field: IUnityGraphicsD3D12v8::GetSwapChain"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, GetSwapChain) - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v8::GetSyncInterval"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, GetSyncInterval) - 16usize];
    ["Offset of field: IUnityGraphicsD3D12v8::GetPresentFlags"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, GetPresentFlags) - 24usize];
    ["Offset of field: IUnityGraphicsD3D12v8::GetFrameFence"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, GetFrameFence) - 32usize];
    ["Offset of field: IUnityGraphicsD3D12v8::GetNextFrameFenceValue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, GetNextFrameFenceValue) - 40usize];
    ["Offset of field: IUnityGraphicsD3D12v8::ExecuteCommandList"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, ExecuteCommandList) - 48usize];
    ["Offset of field: IUnityGraphicsD3D12v8::SetPhysicalVideoMemoryControlValues"][::std::mem::offset_of!(
        IUnityGraphicsD3D12v8,
        SetPhysicalVideoMemoryControlValues
    ) - 56usize];
    ["Offset of field: IUnityGraphicsD3D12v8::GetCommandQueue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, GetCommandQueue) - 64usize];
    ["Offset of field: IUnityGraphicsD3D12v8::TextureFromRenderBuffer"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, TextureFromRenderBuffer) - 72usize];
    ["Offset of field: IUnityGraphicsD3D12v8::TextureFromNativeTexture"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, TextureFromNativeTexture) - 80usize];
    ["Offset of field: IUnityGraphicsD3D12v8::ConfigureEvent"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, ConfigureEvent) - 88usize];
    ["Offset of field: IUnityGraphicsD3D12v8::CommandRecordingState"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, CommandRecordingState) - 96usize];
    ["Offset of field: IUnityGraphicsD3D12v8::RequestResourceState"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, RequestResourceState) - 104usize];
    ["Offset of field: IUnityGraphicsD3D12v8::NotifyResourceState"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v8, NotifyResourceState) - 112usize];
};
impl Default for IUnityGraphicsD3D12v8 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
pub struct IUnityGraphicsD3D12v7 {
    pub GetDevice: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Device>,
    pub GetSwapChain: ::std::option::Option<unsafe extern "system" fn() -> *mut IDXGISwapChain>,
    pub GetSyncInterval: ::std::option::Option<unsafe extern "system" fn() -> u32>,
    pub GetPresentFlags: ::std::option::Option<unsafe extern "system" fn() -> u32>,
    pub GetFrameFence: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Fence>,
    pub GetNextFrameFenceValue: ::std::option::Option<unsafe extern "system" fn() -> UINT64>,
    pub ExecuteCommandList: ::std::option::Option<
        unsafe extern "system" fn(
            commandList: *mut ID3D12GraphicsCommandList,
            stateCount: ::std::os::raw::c_int,
            states: *mut UnityGraphicsD3D12ResourceState,
        ) -> UINT64,
    >,
    pub SetPhysicalVideoMemoryControlValues: ::std::option::Option<
        unsafe extern "system" fn(memInfo: *const UnityGraphicsD3D12PhysicalVideoMemoryControlValues),
    >,
    pub GetCommandQueue: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12CommandQueue>,
    pub TextureFromRenderBuffer:
        ::std::option::Option<unsafe extern "system" fn(rb: UnityRenderBuffer) -> *mut ID3D12Resource>,
    pub TextureFromNativeTexture:
        ::std::option::Option<unsafe extern "system" fn(texture: UnityTextureID) -> *mut ID3D12Resource>,
    pub ConfigureEvent: ::std::option::Option<
        unsafe extern "system" fn(
            eventID: ::std::os::raw::c_int,
            pluginEventConfig: *const UnityD3D12PluginEventConfig,
        ),
    >,
    pub CommandRecordingState: ::std::option::Option<
        unsafe extern "system" fn(
            outCommandRecordingState: *mut UnityGraphicsD3D12RecordingState,
        ) -> bool,
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of IUnityGraphicsD3D12v7"][::std::mem::size_of::<IUnityGraphicsD3D12v7>() - 104usize];
    ["Alignment of IUnityGraphicsD3D12v7"]
        [::std::mem::align_of::<IUnityGraphicsD3D12v7>() - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v7::GetDevice"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v7, GetDevice) - 0usize];
    ["Offset of field: IUnityGraphicsD3D12v7::GetSwapChain"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v7, GetSwapChain) - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v7::GetSyncInterval"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v7, GetSyncInterval) - 16usize];
    ["Offset of field: IUnityGraphicsD3D12v7::GetPresentFlags"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v7, GetPresentFlags) - 24usize];
    ["Offset of field: IUnityGraphicsD3D12v7::GetFrameFence"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v7, GetFrameFence) - 32usize];
    ["Offset of field: IUnityGraphicsD3D12v7::GetNextFrameFenceValue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v7, GetNextFrameFenceValue) - 40usize];
    ["Offset of field: IUnityGraphicsD3D12v7::ExecuteCommandList"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v7, ExecuteCommandList) - 48usize];
    ["Offset of field: IUnityGraphicsD3D12v7::SetPhysicalVideoMemoryControlValues"][::std::mem::offset_of!(
        IUnityGraphicsD3D12v7,
        SetPhysicalVideoMemoryControlValues
    ) - 56usize];
    ["Offset of field: IUnityGraphicsD3D12v7::GetCommandQueue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v7, GetCommandQueue) - 64usize];
    ["Offset of field: IUnityGraphicsD3D12v7::TextureFromRenderBuffer"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v7, TextureFromRenderBuffer) - 72usize];
    ["Offset of field: IUnityGraphicsD3D12v7::TextureFromNativeTexture"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v7, TextureFromNativeTexture) - 80usize];
    ["Offset of field: IUnityGraphicsD3D12v7::ConfigureEvent"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v7, ConfigureEvent) - 88usize];
    ["Offset of field: IUnityGraphicsD3D12v7::CommandRecordingState"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v7, CommandRecordingState) - 96usize];
};
impl Default for IUnityGraphicsD3D12v7 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
pub struct IUnityGraphicsD3D12v6 {
    pub GetDevice: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Device>,
    pub GetFrameFence: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Fence>,
    pub GetNextFrameFenceValue: ::std::option::Option<unsafe extern "system" fn() -> UINT64>,
    pub ExecuteCommandList: ::std::option::Option<
        unsafe extern "system" fn(
            commandList: *mut ID3D12GraphicsCommandList,
            stateCount: ::std::os::raw::c_int,
            states: *mut UnityGraphicsD3D12ResourceState,
        ) -> UINT64,
    >,
    pub SetPhysicalVideoMemoryControlValues: ::std::option::Option<
        unsafe extern "system" fn(memInfo: *const UnityGraphicsD3D12PhysicalVideoMemoryControlValues),
    >,
    pub GetCommandQueue: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12CommandQueue>,
    pub TextureFromRenderBuffer:
        ::std::option::Option<unsafe extern "system" fn(rb: UnityRenderBuffer) -> *mut ID3D12Resource>,
    pub TextureFromNativeTexture:
        ::std::option::Option<unsafe extern "system" fn(texture: UnityTextureID) -> *mut ID3D12Resource>,
    pub ConfigureEvent: ::std::option::Option<
        unsafe extern "system" fn(
            eventID: ::std::os::raw::c_int,
            pluginEventConfig: *const UnityD3D12PluginEventConfig,
        ),
    >,
    pub CommandRecordingState: ::std::option::Option<
        unsafe extern "system" fn(
            outCommandRecordingState: *mut UnityGraphicsD3D12RecordingState,
        ) -> bool,
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of IUnityGraphicsD3D12v6"][::std::mem::size_of::<IUnityGraphicsD3D12v6>() - 80usize];
    ["Alignment of IUnityGraphicsD3D12v6"]
        [::std::mem::align_of::<IUnityGraphicsD3D12v6>() - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v6::GetDevice"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v6, GetDevice) - 0usize];
    ["Offset of field: IUnityGraphicsD3D12v6::GetFrameFence"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v6, GetFrameFence) - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v6::GetNextFrameFenceValue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v6, GetNextFrameFenceValue) - 16usize];
    ["Offset of field: IUnityGraphicsD3D12v6::ExecuteCommandList"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v6, ExecuteCommandList) - 24usize];
    ["Offset of field: IUnityGraphicsD3D12v6::SetPhysicalVideoMemoryControlValues"][::std::mem::offset_of!(
        IUnityGraphicsD3D12v6,
        SetPhysicalVideoMemoryControlValues
    ) - 32usize];
    ["Offset of field: IUnityGraphicsD3D12v6::GetCommandQueue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v6, GetCommandQueue) - 40usize];
    ["Offset of field: IUnityGraphicsD3D12v6::TextureFromRenderBuffer"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v6, TextureFromRenderBuffer) - 48usize];
    ["Offset of field: IUnityGraphicsD3D12v6::TextureFromNativeTexture"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v6, TextureFromNativeTexture) - 56usize];
    ["Offset of field: IUnityGraphicsD3D12v6::ConfigureEvent"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v6, ConfigureEvent) - 64usize];
    ["Offset of field: IUnityGraphicsD3D12v6::CommandRecordingState"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v6, CommandRecordingState) - 72usize];
};
impl Default for IUnityGraphicsD3D12v6 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
pub struct IUnityGraphicsD3D12v5 {
    pub GetDevice: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Device>,
    pub GetFrameFence: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Fence>,
    pub GetNextFrameFenceValue: ::std::option::Option<unsafe extern "system" fn() -> UINT64>,
    pub ExecuteCommandList: ::std::option::Option<
        unsafe extern "system" fn(
            commandList: *mut ID3D12GraphicsCommandList,
            stateCount: ::std::os::raw::c_int,
            states: *mut UnityGraphicsD3D12ResourceState,
        ) -> UINT64,
    >,
    pub SetPhysicalVideoMemoryControlValues: ::std::option::Option<
        unsafe extern "system" fn(memInfo: *const UnityGraphicsD3D12PhysicalVideoMemoryControlValues),
    >,
    pub GetCommandQueue: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12CommandQueue>,
    pub TextureFromRenderBuffer:
        ::std::option::Option<unsafe extern "system" fn(rb: UnityRenderBuffer) -> *mut ID3D12Resource>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of IUnityGraphicsD3D12v5"][::std::mem::size_of::<IUnityGraphicsD3D12v5>() - 56usize];
    ["Alignment of IUnityGraphicsD3D12v5"]
        [::std::mem::align_of::<IUnityGraphicsD3D12v5>() - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v5::GetDevice"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v5, GetDevice) - 0usize];
    ["Offset of field: IUnityGraphicsD3D12v5::GetFrameFence"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v5, GetFrameFence) - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v5::GetNextFrameFenceValue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v5, GetNextFrameFenceValue) - 16usize];
    ["Offset of field: IUnityGraphicsD3D12v5::ExecuteCommandList"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v5, ExecuteCommandList) - 24usize];
    ["Offset of field: IUnityGraphicsD3D12v5::SetPhysicalVideoMemoryControlValues"][::std::mem::offset_of!(
        IUnityGraphicsD3D12v5,
        SetPhysicalVideoMemoryControlValues
    ) - 32usize];
    ["Offset of field: IUnityGraphicsD3D12v5::GetCommandQueue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v5, GetCommandQueue) - 40usize];
    ["Offset of field: IUnityGraphicsD3D12v5::TextureFromRenderBuffer"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v5, TextureFromRenderBuffer) - 48usize];
};
impl Default for IUnityGraphicsD3D12v5 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
pub struct IUnityGraphicsD3D12v4 {
    pub GetDevice: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Device>,
    pub GetFrameFence: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Fence>,
    pub GetNextFrameFenceValue: ::std::option::Option<unsafe extern "system" fn() -> UINT64>,
    pub ExecuteCommandList: ::std::option::Option<
        unsafe extern "system" fn(
            commandList: *mut ID3D12GraphicsCommandList,
            stateCount: ::std::os::raw::c_int,
            states: *mut UnityGraphicsD3D12ResourceState,
        ) -> UINT64,
    >,
    pub SetPhysicalVideoMemoryControlValues: ::std::option::Option<
        unsafe extern "system" fn(memInfo: *const UnityGraphicsD3D12PhysicalVideoMemoryControlValues),
    >,
    pub GetCommandQueue: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12CommandQueue>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of IUnityGraphicsD3D12v4"][::std::mem::size_of::<IUnityGraphicsD3D12v4>() - 48usize];
    ["Alignment of IUnityGraphicsD3D12v4"]
        [::std::mem::align_of::<IUnityGraphicsD3D12v4>() - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v4::GetDevice"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v4, GetDevice) - 0usize];
    ["Offset of field: IUnityGraphicsD3D12v4::GetFrameFence"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v4, GetFrameFence) - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v4::GetNextFrameFenceValue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v4, GetNextFrameFenceValue) - 16usize];
    ["Offset of field: IUnityGraphicsD3D12v4::ExecuteCommandList"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v4, ExecuteCommandList) - 24usize];
    ["Offset of field: IUnityGraphicsD3D12v4::SetPhysicalVideoMemoryControlValues"][::std::mem::offset_of!(
        IUnityGraphicsD3D12v4,
        SetPhysicalVideoMemoryControlValues
    ) - 32usize];
    ["Offset of field: IUnityGraphicsD3D12v4::GetCommandQueue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v4, GetCommandQueue) - 40usize];
};
impl Default for IUnityGraphicsD3D12v4 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
pub struct IUnityGraphicsD3D12v3 {
    pub GetDevice: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Device>,
    pub GetFrameFence: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Fence>,
    pub GetNextFrameFenceValue: ::std::option::Option<unsafe extern "system" fn() -> UINT64>,
    pub ExecuteCommandList: ::std::option::Option<
        unsafe extern "system" fn(
            commandList: *mut ID3D12GraphicsCommandList,
            stateCount: ::std::os::raw::c_int,
            states: *mut UnityGraphicsD3D12ResourceState,
        ) -> UINT64,
    >,
    pub SetPhysicalVideoMemoryControlValues: ::std::option::Option<
        unsafe extern "system" fn(memInfo: *const UnityGraphicsD3D12PhysicalVideoMemoryControlValues),
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of IUnityGraphicsD3D12v3"][::std::mem::size_of::<IUnityGraphicsD3D12v3>() - 40usize];
    ["Alignment of IUnityGraphicsD3D12v3"]
        [::std::mem::align_of::<IUnityGraphicsD3D12v3>() - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v3::GetDevice"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v3, GetDevice) - 0usize];
    ["Offset of field: IUnityGraphicsD3D12v3::GetFrameFence"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v3, GetFrameFence) - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v3::GetNextFrameFenceValue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v3, GetNextFrameFenceValue) - 16usize];
    ["Offset of field: IUnityGraphicsD3D12v3::ExecuteCommandList"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v3, ExecuteCommandList) - 24usize];
    ["Offset of field: IUnityGraphicsD3D12v3::SetPhysicalVideoMemoryControlValues"][::std::mem::offset_of!(
        IUnityGraphicsD3D12v3,
        SetPhysicalVideoMemoryControlValues
    ) - 32usize];
};
impl Default for IUnityGraphicsD3D12v3 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
pub struct IUnityGraphicsD3D12v2 {
    pub GetDevice: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Device>,
    pub GetFrameFence: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Fence>,
    pub GetNextFrameFenceValue: ::std::option::Option<unsafe extern "system" fn() -> UINT64>,
    pub ExecuteCommandList: ::std::option::Option<
        unsafe extern "system" fn(
            commandList: *mut ID3D12GraphicsCommandList,
            stateCount: ::std::os::raw::c_int,
            states: *mut UnityGraphicsD3D12ResourceState,
        ) -> UINT64,
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of IUnityGraphicsD3D12v2"][::std::mem::size_of::<IUnityGraphicsD3D12v2>() - 32usize];
    ["Alignment of IUnityGraphicsD3D12v2"]
        [::std::mem::align_of::<IUnityGraphicsD3D12v2>() - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v2::GetDevice"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v2, GetDevice) - 0usize];
    ["Offset of field: IUnityGraphicsD3D12v2::GetFrameFence"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v2, GetFrameFence) - 8usize];
    ["Offset of field: IUnityGraphicsD3D12v2::GetNextFrameFenceValue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v2, GetNextFrameFenceValue) - 16usize];
    ["Offset of field: IUnityGraphicsD3D12v2::ExecuteCommandList"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12v2, ExecuteCommandList) - 24usize];
};
impl Default for IUnityGraphicsD3D12v2 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
pub struct IUnityGraphicsD3D12 {
    pub GetDevice: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Device>,
    pub GetCommandQueue: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12CommandQueue>,
    pub GetFrameFence: ::std::option::Option<unsafe extern "system" fn() -> *mut ID3D12Fence>,
    pub GetNextFrameFenceValue: ::std::option::Option<unsafe extern "system" fn() -> UINT64>,
    pub GetResourceState: ::std::option::Option<
        unsafe extern "system" fn(
            resource: *mut ID3D12Resource,
            outState: *mut D3D12_RESOURCE_STATES,
        ) -> bool,
    >,
    pub SetResourceState: ::std::option::Option<
        unsafe extern "system" fn(resource: *mut ID3D12Resource, state: D3D12_RESOURCE_STATES),
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of IUnityGraphicsD3D12"][::std::mem::size_of::<IUnityGraphicsD3D12>() - 48usize];
    ["Alignment of IUnityGraphicsD3D12"][::std::mem::align_of::<IUnityGraphicsD3D12>() - 8usize];
    ["Offset of field: IUnityGraphicsD3D12::GetDevice"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12, GetDevice) - 0usize];
    ["Offset of field: IUnityGraphicsD3D12::GetCommandQueue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12, GetCommandQueue) - 8usize];
    ["Offset of field: IUnityGraphicsD3D12::GetFrameFence"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12, GetFrameFence) - 16usize];
    ["Offset of field: IUnityGraphicsD3D12::GetNextFrameFenceValue"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12, GetNextFrameFenceValue) - 24usize];
    ["Offset of field: IUnityGraphicsD3D12::GetResourceState"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12, GetResourceState) - 32usize];
    ["Offset of field: IUnityGraphicsD3D12::SetResourceState"]
        [::std::mem::offset_of!(IUnityGraphicsD3D12, SetResourceState) - 40usize];
};
impl Default for IUnityGraphicsD3D12 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}