-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathgenerated_dx12_struct_decoders_to_json.cpp
More file actions
5393 lines (5038 loc) · 225 KB
/
generated_dx12_struct_decoders_to_json.cpp
File metadata and controls
5393 lines (5038 loc) · 225 KB
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
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
** Copyright (c) 2021-2023 LunarG, Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a copy
** of this software and associated documentation files (the "Software"), to
** deal in the Software without restriction, including without limitation the
** rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
** sell copies of the Software, and to permit persons to whom the Software is
** furnished to do so, subject to the following conditions:
**
** The above copyright notice and this permission notice shall be included in
** all copies or substantial portions of the Software.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
** IN THE SOFTWARE.
*/
/*
** This file is generated from dx12_struct_decoders_to_json_body_generator.py.
**
*/
#if defined(D3D12_SUPPORT)
#include "generated_dx12_struct_decoders_to_json.h"
#include "generated_dx12_enum_to_json.h"
#include "decode/custom_dx12_struct_decoders.h"
#include "decode/decode_json_util.h"
#include "graphics/dx12_util.h"
#include "util/json_util.h"
#include "format/format_json.h"
/// @file Implementations of functions for converting decoded D3D12 structs to JSON.
GFXRECON_BEGIN_NAMESPACE(gfxrecon)
GFXRECON_BEGIN_NAMESPACE(decode)
using util::FieldToJson;
using util::Bool32ToJson;
using util::RepresentBinaryFile;
// TODO Move all these manual functions out of the generator and into a .cpp file.
/// @defgroup ManualD3D12StructFieldToJsons Manual functions to convert raw structs.
/** @{ */
static void FieldToJson(nlohmann::ordered_json& jdata, const D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS& data)
{
jdata["AdditionalWidth"] = data.AdditionalWidth;
jdata["AdditionalHeight"] = data.AdditionalHeight;
}
static void FieldToJson(nlohmann::ordered_json& jdata, const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS& data)
{
jdata["AdditionalWidth"] = data.AdditionalWidth;
jdata["AdditionalHeight"] = data.AdditionalHeight;
}
/// Manual raw struct functon to be used for Decoded_D3D12_CLEAR_VALUE conversion.
void FieldToJson(nlohmann::ordered_json& jdata, const D3D12_DEPTH_STENCIL_VALUE& obj)
{
FieldToJson(jdata["Depth"], obj.Depth);
jdata["Stencil"] = obj.Stencil;
}
/** @} */
inline bool RepresentBinaryFile(nlohmann::ordered_json& jdata, std::string_view filename_base, const uint64_t instance_counter, const PointerDecoder<uint8_t>& data)
{
return RepresentBinaryFile(jdata, filename_base, instance_counter, data.GetLength(), data.GetPointer());
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_COMMAND_QUEUE_DESC* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_COMMAND_QUEUE_DESC& decoded_value = *data->decoded_value;
const Decoded_D3D12_COMMAND_QUEUE_DESC& meta_struct = *data;
jdata["Type"] = decoded_value.Type;
jdata["Priority"] = decoded_value.Priority;
jdata["Flags"] = D3D12_COMMAND_QUEUE_FLAGS_t{ decoded_value.Flags };
FieldToJsonAsFixedWidthBinary(jdata["NodeMask"], decoded_value.NodeMask);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_INPUT_ELEMENT_DESC* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_INPUT_ELEMENT_DESC& decoded_value = *data->decoded_value;
const Decoded_D3D12_INPUT_ELEMENT_DESC& meta_struct = *data;
FieldToJson(jdata["SemanticName"], meta_struct.SemanticName);
jdata["SemanticIndex"] = decoded_value.SemanticIndex;
jdata["Format"] = decoded_value.Format;
jdata["InputSlot"] = decoded_value.InputSlot;
jdata["AlignedByteOffset"] = decoded_value.AlignedByteOffset;
jdata["InputSlotClass"] = decoded_value.InputSlotClass;
jdata["InstanceDataStepRate"] = decoded_value.InstanceDataStepRate;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_SO_DECLARATION_ENTRY* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_SO_DECLARATION_ENTRY& decoded_value = *data->decoded_value;
const Decoded_D3D12_SO_DECLARATION_ENTRY& meta_struct = *data;
jdata["Stream"] = decoded_value.Stream;
FieldToJson(jdata["SemanticName"], meta_struct.SemanticName);
jdata["SemanticIndex"] = decoded_value.SemanticIndex;
jdata["StartComponent"] = decoded_value.StartComponent;
jdata["ComponentCount"] = decoded_value.ComponentCount;
jdata["OutputSlot"] = decoded_value.OutputSlot;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_VIEWPORT* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_VIEWPORT& decoded_value = *data->decoded_value;
const Decoded_D3D12_VIEWPORT& meta_struct = *data;
FieldToJson(jdata["TopLeftX"], decoded_value.TopLeftX);
FieldToJson(jdata["TopLeftY"], decoded_value.TopLeftY);
FieldToJson(jdata["Width"], decoded_value.Width);
FieldToJson(jdata["Height"], decoded_value.Height);
FieldToJson(jdata["MinDepth"], decoded_value.MinDepth);
FieldToJson(jdata["MaxDepth"], decoded_value.MaxDepth);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_BOX* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_BOX& decoded_value = *data->decoded_value;
const Decoded_D3D12_BOX& meta_struct = *data;
jdata["left"] = decoded_value.left;
jdata["top"] = decoded_value.top;
jdata["front"] = decoded_value.front;
jdata["right"] = decoded_value.right;
jdata["bottom"] = decoded_value.bottom;
jdata["back"] = decoded_value.back;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_LUID* data)
{
using namespace util;
if (data && data->decoded_value)
{
const LUID& decoded_value = *data->decoded_value;
const Decoded_LUID& meta_struct = *data;
jdata["LowPart"] = decoded_value.LowPart;
jdata["HighPart"] = decoded_value.HighPart;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_DEPTH_STENCILOP_DESC* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_DEPTH_STENCILOP_DESC& decoded_value = *data->decoded_value;
const Decoded_D3D12_DEPTH_STENCILOP_DESC& meta_struct = *data;
jdata["StencilFailOp"] = decoded_value.StencilFailOp;
jdata["StencilDepthFailOp"] = decoded_value.StencilDepthFailOp;
jdata["StencilPassOp"] = decoded_value.StencilPassOp;
jdata["StencilFunc"] = decoded_value.StencilFunc;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_DEPTH_STENCIL_DESC* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_DEPTH_STENCIL_DESC& decoded_value = *data->decoded_value;
const Decoded_D3D12_DEPTH_STENCIL_DESC& meta_struct = *data;
Bool32ToJson(jdata["DepthEnable"], decoded_value.DepthEnable);
jdata["DepthWriteMask"] = decoded_value.DepthWriteMask;
jdata["DepthFunc"] = decoded_value.DepthFunc;
Bool32ToJson(jdata["StencilEnable"], decoded_value.StencilEnable);
FieldToJsonAsFixedWidthBinary(jdata["StencilReadMask"], decoded_value.StencilReadMask);
FieldToJsonAsFixedWidthBinary(jdata["StencilWriteMask"], decoded_value.StencilWriteMask);
FieldToJson(jdata["FrontFace"], meta_struct.FrontFace);
FieldToJson(jdata["BackFace"], meta_struct.BackFace);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_DEPTH_STENCIL_DESC1* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_DEPTH_STENCIL_DESC1& decoded_value = *data->decoded_value;
const Decoded_D3D12_DEPTH_STENCIL_DESC1& meta_struct = *data;
Bool32ToJson(jdata["DepthEnable"], decoded_value.DepthEnable);
jdata["DepthWriteMask"] = decoded_value.DepthWriteMask;
jdata["DepthFunc"] = decoded_value.DepthFunc;
Bool32ToJson(jdata["StencilEnable"], decoded_value.StencilEnable);
FieldToJsonAsFixedWidthBinary(jdata["StencilReadMask"], decoded_value.StencilReadMask);
FieldToJsonAsFixedWidthBinary(jdata["StencilWriteMask"], decoded_value.StencilWriteMask);
FieldToJson(jdata["FrontFace"], meta_struct.FrontFace);
FieldToJson(jdata["BackFace"], meta_struct.BackFace);
Bool32ToJson(jdata["DepthBoundsTestEnable"], decoded_value.DepthBoundsTestEnable);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_DEPTH_STENCILOP_DESC1* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_DEPTH_STENCILOP_DESC1& decoded_value = *data->decoded_value;
const Decoded_D3D12_DEPTH_STENCILOP_DESC1& meta_struct = *data;
jdata["StencilFailOp"] = decoded_value.StencilFailOp;
jdata["StencilDepthFailOp"] = decoded_value.StencilDepthFailOp;
jdata["StencilPassOp"] = decoded_value.StencilPassOp;
jdata["StencilFunc"] = decoded_value.StencilFunc;
FieldToJsonAsFixedWidthBinary(jdata["StencilReadMask"], decoded_value.StencilReadMask);
FieldToJsonAsFixedWidthBinary(jdata["StencilWriteMask"], decoded_value.StencilWriteMask);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_DEPTH_STENCIL_DESC2* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_DEPTH_STENCIL_DESC2& decoded_value = *data->decoded_value;
const Decoded_D3D12_DEPTH_STENCIL_DESC2& meta_struct = *data;
Bool32ToJson(jdata["DepthEnable"], decoded_value.DepthEnable);
jdata["DepthWriteMask"] = decoded_value.DepthWriteMask;
jdata["DepthFunc"] = decoded_value.DepthFunc;
Bool32ToJson(jdata["StencilEnable"], decoded_value.StencilEnable);
FieldToJson(jdata["FrontFace"], meta_struct.FrontFace);
FieldToJson(jdata["BackFace"], meta_struct.BackFace);
Bool32ToJson(jdata["DepthBoundsTestEnable"], decoded_value.DepthBoundsTestEnable);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_RENDER_TARGET_BLEND_DESC* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_RENDER_TARGET_BLEND_DESC& decoded_value = *data->decoded_value;
const Decoded_D3D12_RENDER_TARGET_BLEND_DESC& meta_struct = *data;
Bool32ToJson(jdata["BlendEnable"], decoded_value.BlendEnable);
Bool32ToJson(jdata["LogicOpEnable"], decoded_value.LogicOpEnable);
jdata["SrcBlend"] = decoded_value.SrcBlend;
jdata["DestBlend"] = decoded_value.DestBlend;
jdata["BlendOp"] = decoded_value.BlendOp;
jdata["SrcBlendAlpha"] = decoded_value.SrcBlendAlpha;
jdata["DestBlendAlpha"] = decoded_value.DestBlendAlpha;
jdata["BlendOpAlpha"] = decoded_value.BlendOpAlpha;
jdata["LogicOp"] = decoded_value.LogicOp;
FieldToJsonAsFixedWidthBinary(jdata["RenderTargetWriteMask"], decoded_value.RenderTargetWriteMask);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_BLEND_DESC* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_BLEND_DESC& decoded_value = *data->decoded_value;
const Decoded_D3D12_BLEND_DESC& meta_struct = *data;
Bool32ToJson(jdata["AlphaToCoverageEnable"], decoded_value.AlphaToCoverageEnable);
Bool32ToJson(jdata["IndependentBlendEnable"], decoded_value.IndependentBlendEnable);
FieldToJson(jdata["RenderTarget"], meta_struct.RenderTarget);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_RASTERIZER_DESC* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_RASTERIZER_DESC& decoded_value = *data->decoded_value;
const Decoded_D3D12_RASTERIZER_DESC& meta_struct = *data;
jdata["FillMode"] = decoded_value.FillMode;
jdata["CullMode"] = decoded_value.CullMode;
Bool32ToJson(jdata["FrontCounterClockwise"], decoded_value.FrontCounterClockwise);
jdata["DepthBias"] = decoded_value.DepthBias;
FieldToJson(jdata["DepthBiasClamp"], decoded_value.DepthBiasClamp);
FieldToJson(jdata["SlopeScaledDepthBias"], decoded_value.SlopeScaledDepthBias);
Bool32ToJson(jdata["DepthClipEnable"], decoded_value.DepthClipEnable);
Bool32ToJson(jdata["MultisampleEnable"], decoded_value.MultisampleEnable);
Bool32ToJson(jdata["AntialiasedLineEnable"], decoded_value.AntialiasedLineEnable);
jdata["ForcedSampleCount"] = decoded_value.ForcedSampleCount;
jdata["ConservativeRaster"] = decoded_value.ConservativeRaster;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_RASTERIZER_DESC1* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_RASTERIZER_DESC1& decoded_value = *data->decoded_value;
const Decoded_D3D12_RASTERIZER_DESC1& meta_struct = *data;
jdata["FillMode"] = decoded_value.FillMode;
jdata["CullMode"] = decoded_value.CullMode;
Bool32ToJson(jdata["FrontCounterClockwise"], decoded_value.FrontCounterClockwise);
FieldToJson(jdata["DepthBias"], decoded_value.DepthBias);
FieldToJson(jdata["DepthBiasClamp"], decoded_value.DepthBiasClamp);
FieldToJson(jdata["SlopeScaledDepthBias"], decoded_value.SlopeScaledDepthBias);
Bool32ToJson(jdata["DepthClipEnable"], decoded_value.DepthClipEnable);
Bool32ToJson(jdata["MultisampleEnable"], decoded_value.MultisampleEnable);
Bool32ToJson(jdata["AntialiasedLineEnable"], decoded_value.AntialiasedLineEnable);
jdata["ForcedSampleCount"] = decoded_value.ForcedSampleCount;
jdata["ConservativeRaster"] = decoded_value.ConservativeRaster;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_RASTERIZER_DESC2* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_RASTERIZER_DESC2& decoded_value = *data->decoded_value;
const Decoded_D3D12_RASTERIZER_DESC2& meta_struct = *data;
jdata["FillMode"] = decoded_value.FillMode;
jdata["CullMode"] = decoded_value.CullMode;
Bool32ToJson(jdata["FrontCounterClockwise"], decoded_value.FrontCounterClockwise);
FieldToJson(jdata["DepthBias"], decoded_value.DepthBias);
FieldToJson(jdata["DepthBiasClamp"], decoded_value.DepthBiasClamp);
FieldToJson(jdata["SlopeScaledDepthBias"], decoded_value.SlopeScaledDepthBias);
Bool32ToJson(jdata["DepthClipEnable"], decoded_value.DepthClipEnable);
jdata["LineRasterizationMode"] = decoded_value.LineRasterizationMode;
jdata["ForcedSampleCount"] = decoded_value.ForcedSampleCount;
jdata["ConservativeRaster"] = decoded_value.ConservativeRaster;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_SHADER_BYTECODE* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_SHADER_BYTECODE& decoded_value = *data->decoded_value;
const Decoded_D3D12_SHADER_BYTECODE& meta_struct = *data;
static thread_local uint64_t D3D12_SHADER_BYTECODE_pShaderBytecode_counter{ 0 };
const bool written = RepresentBinaryFile(jdata["pShaderBytecode"], "D3D12_SHADER_BYTECODE.pShaderBytecode", D3D12_SHADER_BYTECODE_pShaderBytecode_counter, meta_struct.pShaderBytecode);
D3D12_SHADER_BYTECODE_pShaderBytecode_counter += written;
jdata["BytecodeLength"] = decoded_value.BytecodeLength;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_STREAM_OUTPUT_DESC* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_STREAM_OUTPUT_DESC& decoded_value = *data->decoded_value;
const Decoded_D3D12_STREAM_OUTPUT_DESC& meta_struct = *data;
FieldToJson(jdata["pSODeclaration"], meta_struct.pSODeclaration);
jdata["NumEntries"] = decoded_value.NumEntries;
FieldToJson(jdata["pBufferStrides"], meta_struct.pBufferStrides);
jdata["NumStrides"] = decoded_value.NumStrides;
jdata["RasterizedStream"] = decoded_value.RasterizedStream;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_INPUT_LAYOUT_DESC* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_INPUT_LAYOUT_DESC& decoded_value = *data->decoded_value;
const Decoded_D3D12_INPUT_LAYOUT_DESC& meta_struct = *data;
FieldToJson(jdata["pInputElementDescs"], meta_struct.pInputElementDescs);
jdata["NumElements"] = decoded_value.NumElements;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_CACHED_PIPELINE_STATE* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_CACHED_PIPELINE_STATE& decoded_value = *data->decoded_value;
const Decoded_D3D12_CACHED_PIPELINE_STATE& meta_struct = *data;
FieldToJson(jdata["pCachedBlob"], meta_struct.pCachedBlob);
jdata["CachedBlobSizeInBytes"] = decoded_value.CachedBlobSizeInBytes;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_GRAPHICS_PIPELINE_STATE_DESC* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_GRAPHICS_PIPELINE_STATE_DESC& decoded_value = *data->decoded_value;
const Decoded_D3D12_GRAPHICS_PIPELINE_STATE_DESC& meta_struct = *data;
HandleToJson(jdata["pRootSignature"], meta_struct.pRootSignature);
FieldToJson(jdata["VS"], meta_struct.VS);
FieldToJson(jdata["PS"], meta_struct.PS);
FieldToJson(jdata["DS"], meta_struct.DS);
FieldToJson(jdata["HS"], meta_struct.HS);
FieldToJson(jdata["GS"], meta_struct.GS);
FieldToJson(jdata["StreamOutput"], meta_struct.StreamOutput);
FieldToJson(jdata["BlendState"], meta_struct.BlendState);
FieldToJsonAsFixedWidthBinary(jdata["SampleMask"], decoded_value.SampleMask);
FieldToJson(jdata["RasterizerState"], meta_struct.RasterizerState);
FieldToJson(jdata["DepthStencilState"], meta_struct.DepthStencilState);
FieldToJson(jdata["InputLayout"], meta_struct.InputLayout);
jdata["IBStripCutValue"] = decoded_value.IBStripCutValue;
jdata["PrimitiveTopologyType"] = decoded_value.PrimitiveTopologyType;
jdata["NumRenderTargets"] = decoded_value.NumRenderTargets;
FieldToJson(jdata["RTVFormats"], meta_struct.RTVFormats);
jdata["DSVFormat"] = decoded_value.DSVFormat;
FieldToJson(jdata["SampleDesc"], meta_struct.SampleDesc);
FieldToJsonAsFixedWidthBinary(jdata["NodeMask"], decoded_value.NodeMask);
FieldToJson(jdata["CachedPSO"], meta_struct.CachedPSO);
jdata["Flags"] = D3D12_PIPELINE_STATE_FLAGS_t{ decoded_value.Flags };
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_COMPUTE_PIPELINE_STATE_DESC* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_COMPUTE_PIPELINE_STATE_DESC& decoded_value = *data->decoded_value;
const Decoded_D3D12_COMPUTE_PIPELINE_STATE_DESC& meta_struct = *data;
HandleToJson(jdata["pRootSignature"], meta_struct.pRootSignature);
FieldToJson(jdata["CS"], meta_struct.CS);
FieldToJsonAsFixedWidthBinary(jdata["NodeMask"], decoded_value.NodeMask);
FieldToJson(jdata["CachedPSO"], meta_struct.CachedPSO);
jdata["Flags"] = D3D12_PIPELINE_STATE_FLAGS_t{ decoded_value.Flags };
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_SERIALIZED_ROOT_SIGNATURE_DESC* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_SERIALIZED_ROOT_SIGNATURE_DESC& decoded_value = *data->decoded_value;
const Decoded_D3D12_SERIALIZED_ROOT_SIGNATURE_DESC& meta_struct = *data;
FieldToJson(jdata["pSerializedBlob"], meta_struct.pSerializedBlob);
jdata["SerializedBlobSizeInBytes"] = decoded_value.SerializedBlobSizeInBytes;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_GLOBAL_SERIALIZED_ROOT_SIGNATURE* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_GLOBAL_SERIALIZED_ROOT_SIGNATURE& decoded_value = *data->decoded_value;
const Decoded_D3D12_GLOBAL_SERIALIZED_ROOT_SIGNATURE& meta_struct = *data;
FieldToJson(jdata["Desc"], meta_struct.Desc);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_LOCAL_SERIALIZED_ROOT_SIGNATURE* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_LOCAL_SERIALIZED_ROOT_SIGNATURE& decoded_value = *data->decoded_value;
const Decoded_D3D12_LOCAL_SERIALIZED_ROOT_SIGNATURE& meta_struct = *data;
FieldToJson(jdata["Desc"], meta_struct.Desc);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_RT_FORMAT_ARRAY* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_RT_FORMAT_ARRAY& decoded_value = *data->decoded_value;
const Decoded_D3D12_RT_FORMAT_ARRAY& meta_struct = *data;
FieldToJson(jdata["RTFormats"], meta_struct.RTFormats);
jdata["NumRenderTargets"] = decoded_value.NumRenderTargets;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS& meta_struct = *data;
Bool32ToJson(jdata["DoublePrecisionFloatShaderOps"], decoded_value.DoublePrecisionFloatShaderOps);
Bool32ToJson(jdata["OutputMergerLogicOp"], decoded_value.OutputMergerLogicOp);
jdata["MinPrecisionSupport"] = D3D12_SHADER_MIN_PRECISION_SUPPORT_t{ decoded_value.MinPrecisionSupport };
jdata["TiledResourcesTier"] = decoded_value.TiledResourcesTier;
jdata["ResourceBindingTier"] = decoded_value.ResourceBindingTier;
Bool32ToJson(jdata["PSSpecifiedStencilRefSupported"], decoded_value.PSSpecifiedStencilRefSupported);
Bool32ToJson(jdata["TypedUAVLoadAdditionalFormats"], decoded_value.TypedUAVLoadAdditionalFormats);
Bool32ToJson(jdata["ROVsSupported"], decoded_value.ROVsSupported);
jdata["ConservativeRasterizationTier"] = decoded_value.ConservativeRasterizationTier;
jdata["MaxGPUVirtualAddressBitsPerResource"] = decoded_value.MaxGPUVirtualAddressBitsPerResource;
Bool32ToJson(jdata["StandardSwizzle64KBSupported"], decoded_value.StandardSwizzle64KBSupported);
jdata["CrossNodeSharingTier"] = decoded_value.CrossNodeSharingTier;
Bool32ToJson(jdata["CrossAdapterRowMajorTextureSupported"], decoded_value.CrossAdapterRowMajorTextureSupported);
Bool32ToJson(jdata["VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation"], decoded_value.VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation);
jdata["ResourceHeapTier"] = decoded_value.ResourceHeapTier;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS1* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS1& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS1& meta_struct = *data;
Bool32ToJson(jdata["WaveOps"], decoded_value.WaveOps);
jdata["WaveLaneCountMin"] = decoded_value.WaveLaneCountMin;
jdata["WaveLaneCountMax"] = decoded_value.WaveLaneCountMax;
jdata["TotalLaneCount"] = decoded_value.TotalLaneCount;
Bool32ToJson(jdata["ExpandedComputeResourceStates"], decoded_value.ExpandedComputeResourceStates);
Bool32ToJson(jdata["Int64ShaderOps"], decoded_value.Int64ShaderOps);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS2* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS2& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS2& meta_struct = *data;
Bool32ToJson(jdata["DepthBoundsTestSupported"], decoded_value.DepthBoundsTestSupported);
jdata["ProgrammableSamplePositionsTier"] = decoded_value.ProgrammableSamplePositionsTier;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_ROOT_SIGNATURE* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_ROOT_SIGNATURE& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_ROOT_SIGNATURE& meta_struct = *data;
jdata["HighestVersion"] = decoded_value.HighestVersion;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_ARCHITECTURE* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_ARCHITECTURE& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_ARCHITECTURE& meta_struct = *data;
jdata["NodeIndex"] = decoded_value.NodeIndex;
Bool32ToJson(jdata["TileBasedRenderer"], decoded_value.TileBasedRenderer);
Bool32ToJson(jdata["UMA"], decoded_value.UMA);
Bool32ToJson(jdata["CacheCoherentUMA"], decoded_value.CacheCoherentUMA);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_ARCHITECTURE1* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_ARCHITECTURE1& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_ARCHITECTURE1& meta_struct = *data;
jdata["NodeIndex"] = decoded_value.NodeIndex;
Bool32ToJson(jdata["TileBasedRenderer"], decoded_value.TileBasedRenderer);
Bool32ToJson(jdata["UMA"], decoded_value.UMA);
Bool32ToJson(jdata["CacheCoherentUMA"], decoded_value.CacheCoherentUMA);
Bool32ToJson(jdata["IsolatedMMU"], decoded_value.IsolatedMMU);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_FEATURE_LEVELS* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_FEATURE_LEVELS& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_FEATURE_LEVELS& meta_struct = *data;
jdata["NumFeatureLevels"] = decoded_value.NumFeatureLevels;
FieldToJson(jdata["pFeatureLevelsRequested"], meta_struct.pFeatureLevelsRequested);
jdata["MaxSupportedFeatureLevel"] = decoded_value.MaxSupportedFeatureLevel;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_SHADER_MODEL* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_SHADER_MODEL& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_SHADER_MODEL& meta_struct = *data;
jdata["HighestShaderModel"] = decoded_value.HighestShaderModel;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_FORMAT_SUPPORT* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_FORMAT_SUPPORT& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_FORMAT_SUPPORT& meta_struct = *data;
jdata["Format"] = decoded_value.Format;
jdata["Support1"] = D3D12_FORMAT_SUPPORT1_t{ decoded_value.Support1 };
jdata["Support2"] = D3D12_FORMAT_SUPPORT2_t{ decoded_value.Support2 };
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS& meta_struct = *data;
jdata["Format"] = decoded_value.Format;
jdata["SampleCount"] = decoded_value.SampleCount;
jdata["Flags"] = D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS_t{ decoded_value.Flags };
jdata["NumQualityLevels"] = decoded_value.NumQualityLevels;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_FORMAT_INFO* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_FORMAT_INFO& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_FORMAT_INFO& meta_struct = *data;
jdata["Format"] = decoded_value.Format;
jdata["PlaneCount"] = decoded_value.PlaneCount;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT& meta_struct = *data;
jdata["MaxGPUVirtualAddressBitsPerResource"] = decoded_value.MaxGPUVirtualAddressBitsPerResource;
jdata["MaxGPUVirtualAddressBitsPerProcess"] = decoded_value.MaxGPUVirtualAddressBitsPerProcess;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_SHADER_CACHE* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_SHADER_CACHE& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_SHADER_CACHE& meta_struct = *data;
jdata["SupportFlags"] = D3D12_SHADER_CACHE_SUPPORT_FLAGS_t{ decoded_value.SupportFlags };
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY& meta_struct = *data;
jdata["CommandListType"] = decoded_value.CommandListType;
jdata["Priority"] = decoded_value.Priority;
Bool32ToJson(jdata["PriorityForTypeIsSupported"], decoded_value.PriorityForTypeIsSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS3* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS3& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS3& meta_struct = *data;
Bool32ToJson(jdata["CopyQueueTimestampQueriesSupported"], decoded_value.CopyQueueTimestampQueriesSupported);
Bool32ToJson(jdata["CastingFullyTypedFormatSupported"], decoded_value.CastingFullyTypedFormatSupported);
jdata["WriteBufferImmediateSupportFlags"] = D3D12_COMMAND_LIST_SUPPORT_FLAGS_t{ decoded_value.WriteBufferImmediateSupportFlags };
jdata["ViewInstancingTier"] = decoded_value.ViewInstancingTier;
Bool32ToJson(jdata["BarycentricsSupported"], decoded_value.BarycentricsSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_EXISTING_HEAPS* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_EXISTING_HEAPS& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_EXISTING_HEAPS& meta_struct = *data;
Bool32ToJson(jdata["Supported"], decoded_value.Supported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_DISPLAYABLE* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_DISPLAYABLE& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_DISPLAYABLE& meta_struct = *data;
Bool32ToJson(jdata["DisplayableTexture"], decoded_value.DisplayableTexture);
jdata["SharedResourceCompatibilityTier"] = decoded_value.SharedResourceCompatibilityTier;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS4* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS4& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS4& meta_struct = *data;
Bool32ToJson(jdata["MSAA64KBAlignedTextureSupported"], decoded_value.MSAA64KBAlignedTextureSupported);
jdata["SharedResourceCompatibilityTier"] = decoded_value.SharedResourceCompatibilityTier;
Bool32ToJson(jdata["Native16BitShaderOpsSupported"], decoded_value.Native16BitShaderOpsSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_SERIALIZATION* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_SERIALIZATION& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_SERIALIZATION& meta_struct = *data;
jdata["NodeIndex"] = decoded_value.NodeIndex;
jdata["HeapSerializationTier"] = decoded_value.HeapSerializationTier;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_CROSS_NODE* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_CROSS_NODE& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_CROSS_NODE& meta_struct = *data;
jdata["SharingTier"] = decoded_value.SharingTier;
Bool32ToJson(jdata["AtomicShaderInstructions"], decoded_value.AtomicShaderInstructions);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS5* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS5& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS5& meta_struct = *data;
Bool32ToJson(jdata["SRVOnlyTiledResourceTier3"], decoded_value.SRVOnlyTiledResourceTier3);
jdata["RenderPassesTier"] = decoded_value.RenderPassesTier;
jdata["RaytracingTier"] = decoded_value.RaytracingTier;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS6* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS6& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS6& meta_struct = *data;
Bool32ToJson(jdata["AdditionalShadingRatesSupported"], decoded_value.AdditionalShadingRatesSupported);
Bool32ToJson(jdata["PerPrimitiveShadingRateSupportedWithViewportIndexing"], decoded_value.PerPrimitiveShadingRateSupportedWithViewportIndexing);
jdata["VariableShadingRateTier"] = decoded_value.VariableShadingRateTier;
jdata["ShadingRateImageTileSize"] = decoded_value.ShadingRateImageTileSize;
Bool32ToJson(jdata["BackgroundProcessingSupported"], decoded_value.BackgroundProcessingSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS7* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS7& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS7& meta_struct = *data;
jdata["MeshShaderTier"] = decoded_value.MeshShaderTier;
jdata["SamplerFeedbackTier"] = decoded_value.SamplerFeedbackTier;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_QUERY_META_COMMAND* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_QUERY_META_COMMAND& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_QUERY_META_COMMAND& meta_struct = *data;
FieldToJson(jdata["CommandId"], meta_struct.CommandId);
FieldToJsonAsFixedWidthBinary(jdata["NodeMask"], decoded_value.NodeMask);
FieldToJson(jdata["pQueryInputData"], meta_struct.pQueryInputData);
jdata["QueryInputDataSizeInBytes"] = decoded_value.QueryInputDataSizeInBytes;
FieldToJson(jdata["pQueryOutputData"], meta_struct.pQueryOutputData);
jdata["QueryOutputDataSizeInBytes"] = decoded_value.QueryOutputDataSizeInBytes;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS8* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS8& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS8& meta_struct = *data;
Bool32ToJson(jdata["UnalignedBlockTexturesSupported"], decoded_value.UnalignedBlockTexturesSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS9* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS9& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS9& meta_struct = *data;
Bool32ToJson(jdata["MeshShaderPipelineStatsSupported"], decoded_value.MeshShaderPipelineStatsSupported);
Bool32ToJson(jdata["MeshShaderSupportsFullRangeRenderTargetArrayIndex"], decoded_value.MeshShaderSupportsFullRangeRenderTargetArrayIndex);
Bool32ToJson(jdata["AtomicInt64OnTypedResourceSupported"], decoded_value.AtomicInt64OnTypedResourceSupported);
Bool32ToJson(jdata["AtomicInt64OnGroupSharedSupported"], decoded_value.AtomicInt64OnGroupSharedSupported);
Bool32ToJson(jdata["DerivativesInMeshAndAmplificationShadersSupported"], decoded_value.DerivativesInMeshAndAmplificationShadersSupported);
jdata["WaveMMATier"] = decoded_value.WaveMMATier;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS10* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS10& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS10& meta_struct = *data;
Bool32ToJson(jdata["VariableRateShadingSumCombinerSupported"], decoded_value.VariableRateShadingSumCombinerSupported);
Bool32ToJson(jdata["MeshShaderPerPrimitiveShadingRateSupported"], decoded_value.MeshShaderPerPrimitiveShadingRateSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS11* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS11& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS11& meta_struct = *data;
Bool32ToJson(jdata["AtomicInt64OnDescriptorHeapResourceSupported"], decoded_value.AtomicInt64OnDescriptorHeapResourceSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS12* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS12& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS12& meta_struct = *data;
jdata["MSPrimitivesPipelineStatisticIncludesCulledPrimitives"] = decoded_value.MSPrimitivesPipelineStatisticIncludesCulledPrimitives;
Bool32ToJson(jdata["EnhancedBarriersSupported"], decoded_value.EnhancedBarriersSupported);
Bool32ToJson(jdata["RelaxedFormatCastingSupported"], decoded_value.RelaxedFormatCastingSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS13* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS13& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS13& meta_struct = *data;
Bool32ToJson(jdata["UnrestrictedBufferTextureCopyPitchSupported"], decoded_value.UnrestrictedBufferTextureCopyPitchSupported);
Bool32ToJson(jdata["UnrestrictedVertexElementAlignmentSupported"], decoded_value.UnrestrictedVertexElementAlignmentSupported);
Bool32ToJson(jdata["InvertedViewportHeightFlipsYSupported"], decoded_value.InvertedViewportHeightFlipsYSupported);
Bool32ToJson(jdata["InvertedViewportDepthFlipsZSupported"], decoded_value.InvertedViewportDepthFlipsZSupported);
Bool32ToJson(jdata["TextureCopyBetweenDimensionsSupported"], decoded_value.TextureCopyBetweenDimensionsSupported);
Bool32ToJson(jdata["AlphaBlendFactorSupported"], decoded_value.AlphaBlendFactorSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS14* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS14& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS14& meta_struct = *data;
Bool32ToJson(jdata["AdvancedTextureOpsSupported"], decoded_value.AdvancedTextureOpsSupported);
Bool32ToJson(jdata["WriteableMSAATexturesSupported"], decoded_value.WriteableMSAATexturesSupported);
Bool32ToJson(jdata["IndependentFrontAndBackStencilRefMaskSupported"], decoded_value.IndependentFrontAndBackStencilRefMaskSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS15* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS15& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS15& meta_struct = *data;
Bool32ToJson(jdata["TriangleFanSupported"], decoded_value.TriangleFanSupported);
Bool32ToJson(jdata["DynamicIndexBufferStripCutSupported"], decoded_value.DynamicIndexBufferStripCutSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS16* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS16& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS16& meta_struct = *data;
Bool32ToJson(jdata["DynamicDepthBiasSupported"], decoded_value.DynamicDepthBiasSupported);
Bool32ToJson(jdata["GPUUploadHeapSupported"], decoded_value.GPUUploadHeapSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS17* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS17& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS17& meta_struct = *data;
Bool32ToJson(jdata["NonNormalizedCoordinateSamplersSupported"], decoded_value.NonNormalizedCoordinateSamplersSupported);
Bool32ToJson(jdata["ManualWriteTrackingResourceSupported"], decoded_value.ManualWriteTrackingResourceSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS18* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS18& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS18& meta_struct = *data;
Bool32ToJson(jdata["RenderPassesValid"], decoded_value.RenderPassesValid);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS19* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS19& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS19& meta_struct = *data;
Bool32ToJson(jdata["MismatchingOutputDimensionsSupported"], decoded_value.MismatchingOutputDimensionsSupported);
jdata["SupportedSampleCountsWithNoOutputs"] = decoded_value.SupportedSampleCountsWithNoOutputs;
Bool32ToJson(jdata["PointSamplingAddressesNeverRoundUp"], decoded_value.PointSamplingAddressesNeverRoundUp);
Bool32ToJson(jdata["RasterizerDesc2Supported"], decoded_value.RasterizerDesc2Supported);
Bool32ToJson(jdata["NarrowQuadrilateralLinesSupported"], decoded_value.NarrowQuadrilateralLinesSupported);
Bool32ToJson(jdata["AnisoFilterWithPointMipSupported"], decoded_value.AnisoFilterWithPointMipSupported);
jdata["MaxSamplerDescriptorHeapSize"] = decoded_value.MaxSamplerDescriptorHeapSize;
jdata["MaxSamplerDescriptorHeapSizeWithStaticSamplers"] = decoded_value.MaxSamplerDescriptorHeapSizeWithStaticSamplers;
jdata["MaxViewDescriptorHeapSize"] = decoded_value.MaxViewDescriptorHeapSize;
Bool32ToJson(jdata["ComputeOnlyCustomHeapSupported"], decoded_value.ComputeOnlyCustomHeapSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS20* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS20& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS20& meta_struct = *data;
Bool32ToJson(jdata["ComputeOnlyWriteWatchSupported"], decoded_value.ComputeOnlyWriteWatchSupported);
jdata["RecreateAtTier"] = decoded_value.RecreateAtTier;
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS21* data)
{
using namespace util;
if (data && data->decoded_value)
{
const D3D12_FEATURE_DATA_D3D12_OPTIONS21& decoded_value = *data->decoded_value;
const Decoded_D3D12_FEATURE_DATA_D3D12_OPTIONS21& meta_struct = *data;
jdata["WorkGraphsTier"] = decoded_value.WorkGraphsTier;
jdata["ExecuteIndirectTier"] = decoded_value.ExecuteIndirectTier;
Bool32ToJson(jdata["SampleCmpGradientAndBiasSupported"], decoded_value.SampleCmpGradientAndBiasSupported);
Bool32ToJson(jdata["ExtendedCommandInfoSupported"], decoded_value.ExtendedCommandInfoSupported);
}
}
void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_FEATURE_DATA_TIGHT_ALIGNMENT* data)