blob: 0c834050101e9cc4e6fb3a24010e0c3f04a4e2a4 (
plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
|
;;; guile-sdl3 -- Scheme bindings for SDL3
;;; Copyright © 2024 David Thompson <dthompson2@worcester.edu>
;;;
;;; Licensed under the Apache License, Version 2.0 (the "License");
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; http://www.apache.org/licenses/LICENSE-2.0
;;;
;;; Unless required by applicable law or agreed to in writing, software
;;; distributed under the License is distributed on an "AS IS" BASIS,
;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;;; See the License for the specific language governing permissions and
;;; limitations under the License.
;;; Commentary:
;;
;; Low-level bindings for SDL_gpu.h.
;;
;;; Code:
(define-module (sdl3 bindings gpu)
#:use-module (bstruct)
#:use-module (sdl3 bindings utils)
#:use-module (sdl3 bindings pixels)
#:use-module (sdl3 bindings surface)
#:use-module (system foreign)
#:export (SDL_GPUPrimitiveType
symbol->gpu-primitive-type
primitive-type->symbol
SDL_GPU_PRIMITIVETYPE_TRIANGLELIST
SDL_GPU_PRIMITIVETYPE_TRIANGLESTRIP
SDL_GPU_PRIMITIVETYPE_LINELIST
SDL_GPU_PRIMITIVETYPE_LINESTRIP
SDL_GPU_PRIMITIVETYPE_POINTLIST
SDL_GPULoadOp
symbol->gpu-load-op
gpu-load-op->symbol
SDL_GPU_LOADOP_LOAD
SDL_GPU_LOADOP_CLEAR
SDL_GPU_LOADOP_DONT_CARE
SDL_GPUStoreOp
symbol->gpu-store-op
gpu-store-op->symbol
SDL_GPU_STOREOP_STORE
SDL_GPU_STOREOP_DONT_CARE
SDL_GPU_STOREOP_RESOLVE
SDL_GPU_STOREOP_RESOLVE_AND_STORE
SDL_GPUIndexElementSize
symbol->gpu-index-element-size
gpu-index-element-size->symbol
SDL_GPU_INDEXELEMENTSIZE_16BIT
SDL_GPU_INDEXELEMENTSIZE_32BIT
SDL_GPUTextureFormat
symbol->gpu-texture-format
gpu-texture-format->symbol
SDL_GPU_TEXTUREFORMAT_INVALID
SDL_GPU_TEXTUREFORMAT_A8_UNORM
SDL_GPU_TEXTUREFORMAT_R8_UNORM
SDL_GPU_TEXTUREFORMAT_R8G8_UNORM
SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM
SDL_GPU_TEXTUREFORMAT_R16_UNORM
SDL_GPU_TEXTUREFORMAT_R16G16_UNORM
SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM
SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM
SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM
SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM
SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM
SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM
SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM
SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM
SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM
SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM
SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM
SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM
SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT
SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT
SDL_GPU_TEXTUREFORMAT_R8_SNORM
SDL_GPU_TEXTUREFORMAT_R8G8_SNORM
SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM
SDL_GPU_TEXTUREFORMAT_R16_SNORM
SDL_GPU_TEXTUREFORMAT_R16G16_SNORM
SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM
SDL_GPU_TEXTUREFORMAT_R16_FLOAT
SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT
SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT
SDL_GPU_TEXTUREFORMAT_R32_FLOAT
SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT
SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT
SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT
SDL_GPU_TEXTUREFORMAT_R8_UINT
SDL_GPU_TEXTUREFORMAT_R8G8_UINT
SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT
SDL_GPU_TEXTUREFORMAT_R16_UINT
SDL_GPU_TEXTUREFORMAT_R16G16_UINT
SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT
SDL_GPU_TEXTUREFORMAT_R32_UINT
SDL_GPU_TEXTUREFORMAT_R32G32_UINT
SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT
SDL_GPU_TEXTUREFORMAT_R8_INT
SDL_GPU_TEXTUREFORMAT_R8G8_INT
SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT
SDL_GPU_TEXTUREFORMAT_R16_INT
SDL_GPU_TEXTUREFORMAT_R16G16_INT
SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT
SDL_GPU_TEXTUREFORMAT_R32_INT
SDL_GPU_TEXTUREFORMAT_R32G32_INT
SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT
SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB
SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB
SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB
SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB
SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB
SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB
SDL_GPU_TEXTUREFORMAT_D16_UNORM
SDL_GPU_TEXTUREFORMAT_D24_UNORM
SDL_GPU_TEXTUREFORMAT_D32_FLOAT
SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT
SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT
SDL_GPUTextureUsageFlags
symbols->gpu-texture-usage-flags
gpu-texture-usage-flags->symbols
SDL_GPU_TEXTUREUSAGE_SAMPLER
SDL_GPU_TEXTUREUSAGE_COLOR_TARGET
SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET
SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE
SDL_GPUTextureType
symbol->gpu-texture-type
gpu-texture-type->symbol
SDL_GPU_TEXTURETYPE_2D
SDL_GPU_TEXTURETYPE_2D_ARRAY
SDL_GPU_TEXTURETYPE_3D
SDL_GPU_TEXTURETYPE_CUBE
SDL_GPU_TEXTURETYPE_CUBE_ARRAY
SDL_GPUSampleCount
int->gpu-sample-count
gpu-sample-count->int
SDL_GPU_SAMPLECOUNT_1
SDL_GPU_SAMPLECOUNT_2
SDL_GPU_SAMPLECOUNT_4
SDL_GPU_SAMPLECOUNT_8
SDL_GPUCubeMapFace
symbol->gpu-cube-map-face
gpu-cube-map-face->symbol
SDL_GPU_CUBEMAPFACE_POSITIVEX
SDL_GPU_CUBEMAPFACE_NEGATIVEX
SDL_GPU_CUBEMAPFACE_POSITIVEY
SDL_GPU_CUBEMAPFACE_NEGATIVEY
SDL_GPU_CUBEMAPFACE_POSITIVEZ
SDL_GPU_CUBEMAPFACE_NEGATIVEZ
SDL_GPUBufferUsageFlags
symbols->gpu-buffer-usage-flags
gpu-buffer-usage-flags->symbols
SDL_GPU_BUFFERUSAGE_VERTEX
SDL_GPU_BUFFERUSAGE_INDEX
SDL_GPU_BUFFERUSAGE_INDIRECT
SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ
SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ
SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE
SDL_GPUTransferBufferUsage
symbol->gpu-transfer-buffer-usage
gpu-transfer-buffer-usage->symbol
SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD
SDL_GPU_TRANSFERBUFFERUSAGE_DOWNLOAD
SDL_GPUShaderStage
symbol->gpu-shader-stage
gpu-shader-stage->symbol
SDL_GPU_SHADERSTAGE_VERTEX
SDL_GPU_SHADERSTAGE_FRAGMENT
SDL_GPUShaderFormat
symbols->gpu-shader-format
gpu-shader-format->symbols
SDL_GPU_SHADERFORMAT_INVALID
SDL_GPU_SHADERFORMAT_PRIVATE
SDL_GPU_SHADERFORMAT_SPIRV
SDL_GPU_SHADERFORMAT_DXBC
SDL_GPU_SHADERFORMAT_DXIL
SDL_GPU_SHADERFORMAT_MSL
SDL_GPU_SHADERFORMAT_METALLIB
SDL_GPUVertexElementFormat
symbol->gpu-vertex-element-format
gpu-vertex-element-format->symbol
SDL_GPU_VERTEXELEMENTFORMAT_INVALID
SDL_GPU_VERTEXELEMENTFORMAT_INT
SDL_GPU_VERTEXELEMENTFORMAT_INT2
SDL_GPU_VERTEXELEMENTFORMAT_INT3
SDL_GPU_VERTEXELEMENTFORMAT_INT4
SDL_GPU_VERTEXELEMENTFORMAT_UINT
SDL_GPU_VERTEXELEMENTFORMAT_UINT2
SDL_GPU_VERTEXELEMENTFORMAT_UINT3
SDL_GPU_VERTEXELEMENTFORMAT_UINT4
SDL_GPU_VERTEXELEMENTFORMAT_FLOAT
SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2
SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3
SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4
SDL_GPU_VERTEXELEMENTFORMAT_BYTE2
SDL_GPU_VERTEXELEMENTFORMAT_BYTE4
SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2
SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4
SDL_GPU_VERTEXELEMENTFORMAT_BYTE2_NORM
SDL_GPU_VERTEXELEMENTFORMAT_BYTE4_NORM
SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM
SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM
SDL_GPU_VERTEXELEMENTFORMAT_SHORT2
SDL_GPU_VERTEXELEMENTFORMAT_SHORT4
SDL_GPU_VERTEXELEMENTFORMAT_USHORT2
SDL_GPU_VERTEXELEMENTFORMAT_USHORT4
SDL_GPU_VERTEXELEMENTFORMAT_SHORT2_NORM
SDL_GPU_VERTEXELEMENTFORMAT_SHORT4_NORM
SDL_GPU_VERTEXELEMENTFORMAT_USHORT2_NORM
SDL_GPU_VERTEXELEMENTFORMAT_USHORT4_NORM
SDL_GPU_VERTEXELEMENTFORMAT_HALF2
SDL_GPU_VERTEXELEMENTFORMAT_HALF4
SDL_GPUVertexInputRate
symbol->gpu-vertex-input-rate
gpu-vertex-input-rate->symbol
SDL_GPU_VERTEXINPUTRATE_VERTEX
SDL_GPU_VERTEXINPUTRATE_INSTANCE
SDL_GPUFillMode
symbol->gpu-fill-mode
gpu-fill-mode->symbol
SDL_GPU_FILLMODE_FILL
SDL_GPU_FILLMODE_LINE
SDL_GPUCullMode
symbol->gpu-cull-mode
gpu-cull-mode->symbol
SDL_GPU_CULLMODE_NONE
SDL_GPU_CULLMODE_FRONT
SDL_GPU_CULLMODE_BACK
SDL_GPUFrontFace
symbol->gpu-front-face
gpu-front-face->symbol
SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE
SDL_GPU_FRONTFACE_CLOCKWISE
SDL_GPUCompareOp
symbol->gpu-compare-op
gpu-compare-op->symbol
SDL_GPU_COMPAREOP_INVALID
SDL_GPU_COMPAREOP_NEVER
SDL_GPU_COMPAREOP_LESS
SDL_GPU_COMPAREOP_EQUAL
SDL_GPU_COMPAREOP_LESS_OR_EQUAL
SDL_GPU_COMPAREOP_GREATER
SDL_GPU_COMPAREOP_NOT_EQUAL
SDL_GPU_COMPAREOP_GREATER_OR_EQUAL
SDL_GPU_COMPAREOP_ALWAYS
SDL_GPUStencilOp
symbol->gpu-stencil-op
gpu-stencil-op->symbol
SDL_GPU_STENCILOP_INVALID
SDL_GPU_STENCILOP_KEEP
SDL_GPU_STENCILOP_ZERO
SDL_GPU_STENCILOP_REPLACE
SDL_GPU_STENCILOP_INCREMENT_AND_CLAMP
SDL_GPU_STENCILOP_DECREMENT_AND_CLAMP
SDL_GPU_STENCILOP_INVERT
SDL_GPU_STENCILOP_INCREMENT_AND_WRAP
SDL_GPU_STENCILOP_DECREMENT_AND_WRAP
SDL_GPUBlendOp
symbol->gpu-blend-op
gpu-blend-op->symbol
SDL_GPU_BLENDOP_INVALID
SDL_GPU_BLENDOP_ADD
SDL_GPU_BLENDOP_SUBTRACT
SDL_GPU_BLENDOP_REVERSE_SUBTRACT
SDL_GPU_BLENDOP_MIN
SDL_GPU_BLENDOP_MAX
SDL_GPUBlendFactor
symbol->gpu-blend-factor
gpu-blend-factor->symbol
SDL_GPU_BLENDFACTOR_INVALID
SDL_GPU_BLENDFACTOR_ZERO
SDL_GPU_BLENDFACTOR_ONE
SDL_GPU_BLENDFACTOR_SRC_COLOR
SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR
SDL_GPU_BLENDFACTOR_DST_COLOR
SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR
SDL_GPU_BLENDFACTOR_SRC_ALPHA
SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA
SDL_GPU_BLENDFACTOR_DST_ALPHA
SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA
SDL_GPU_BLENDFACTOR_CONSTANT_COLOR
SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR
SDL_GPU_BLENDFACTOR_SRC_ALPHA_SATURATE
SDL_GPUColorComponentFlags
symbols->gpu-color-component-flags
gpu-color-component-flags->symbols
SDL_GPU_COLORCOMPONENT_R
SDL_GPU_COLORCOMPONENT_G
SDL_GPU_COLORCOMPONENT_B
SDL_GPU_COLORCOMPONENT_A
SDL_GPUFilter
symbol->gpu-filter
gpu-filter->symbol
SDL_GPU_FILTER_NEAREST
SDL_GPU_FILTER_LINEAR
SDL_GPUSamplerMipmapMode
symbol->gpu-sampler-mipmap-mode
gpu-sampler-mipmap-mode->symbol
SDL_GPU_SAMPLERMIPMAPMODE_NEAREST
SDL_GPU_SAMPLERMIPMAPMODE_LINEAR
SDL_GPUSamplerAddressMode
symbol->gpu-sampler-address-mode
gpu-sampler-address-mode->symbol
SDL_GPU_SAMPLERADDRESSMODE_REPEAT
SDL_GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT
SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE
SDL_GPUPresentMode
symbol->gpu-present-mode
gpu-present-mode->symbol
SDL_GPU_PRESENTMODE_VSYNC
SDL_GPU_PRESENTMODE_IMMEDIATE
SDL_GPU_PRESENTMODE_MAILBOX
SDL_GPUSwapchainComposition
symbol->gpu-swapchain-composition
gpu-swapchain-composition->symbol
SDL_GPU_SWAPCHAINCOMPOSITION_SDR
SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR
SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR
SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2048
SDL_GPUViewport
SDL_GPUTextureTransferInfo
SDL_GPUTransferBufferLocation
SDL_GPUTextureLocation
SDL_GPUTextureRegion
SDL_GPUBlitRegion
SDL_GPUBufferLocation
SDL_GPUBufferRegion
SDL_GPUVertexBufferDescription
SDL_GPUVertexAttribute
SDL_GPUVertexInputState
SDL_GPUStencilOpState
SDL_GPUColorTargetBlendState
SDL_GPUShaderCreateInfo
SDL_GPUTextureCreateInfo
SDL_GPUBufferCreateInfo
SDL_GPUTransferBufferCreateInfo
SDL_GPURasterizerState
SDL_GPUMultisampleState
SDL_GPUDepthStencilState
SDL_GPUColorTargetDescription
SDL_GPUGraphicsPipelineTargetInfo
SDL_GPUGraphicsPipelineCreateInfo
SDL_GPUComputePipelineCreateInfo
SDL_GPUColorTargetInfo
SDL_GPUDepthStencilTargetInfo
SDL_GPUBlitInfo
SDL_GPUBufferBinding
SDL_GPUTextureSamplerBinding
SDL_GPUStorageBufferReadWriteBinding
SDL_GPUStorageTextureReadWriteBinding
gpu-device?
wrap-gpu-device
unwrap-gpu-device
gpu-device-destroyed?
set-gpu-device-destroyed!
gpu-buffer?
wrap-gpu-buffer
unwrap-gpu-buffer
gpu-buffer-released?
set-gpu-buffer-released!
gpu-transfer-buffer?
wrap-gpu-transfer-buffer
unwrap-gpu-transfer-buffer
gpu-transfer-buffer-released?
set-gpu-transfer-buffer-released!
gpu-shader?
wrap-gpu-shader
unwrap-gpu-shader
gpu-shader-released?
set-gpu-shader-released!
gpu-texture?
wrap-gpu-texture
unwrap-gpu-texture
gpu-texture-released?
set-gpu-texture-released!
gpu-graphics-pipeline?
wrap-gpu-graphics-pipeline
unwrap-gpu-graphics-pipeline
gpu-graphics-pipeline-released?
set-gpu-graphics-pipeline-released!
gpu-command-buffer?
wrap-gpu-command-buffer
unwrap-gpu-command-buffer
gpu-copy-pass?
wrap-gpu-copy-pass
unwrap-gpu-copy-pass
gpu-render-pass?
wrap-gpu-render-pass
unwrap-gpu-render-pass
gpu-compute-pass?
wrap-gpu-compute-pass
unwrap-gpu-compute-pass
SDL_AcquireGPUCommandBuffer
SDL_AcquireGPUSwapchainTexture
SDL_BeginGPUCopyPass
SDL_BeginGPURenderPass
SDL_BindGPUGraphicsPipeline
SDL_BindGPUVertexBuffers
SDL_BlitGPUTexture
SDL_CreateGPUBuffer
SDL_CreateGPUDevice
SDL_CreateGPUGraphicsPipeline
SDL_CreateGPUShader
SDL_CreateGPUTexture
SDL_CreateGPUTransferBuffer
SDL_ClaimWindowForGPUDevice
SDL_DestroyGPUDevice
SDL_DrawGPUPrimitives
SDL_EndGPUCopyPass
SDL_EndGPURenderPass
SDL_GetGPUDeviceDriver
SDL_GetGPUDriver
SDL_GetGPUSwapchainTextureFormat
SDL_GetNumGPUDrivers
SDL_GPUTextureSupportsSampleCount
SDL_MapGPUTransferBuffer
SDL_PushGPUVertexUniformData
SDL_PushGPUFragmentUniformData
SDL_ReleaseGPUBuffer
SDL_ReleaseGPUGraphicsPipeline
SDL_ReleaseGPUShader
SDL_ReleaseGPUTexture
SDL_ReleaseGPUTransferBuffer
SDL_ReleaseWindowFromGPUDevice
SDL_SetGPUBufferName
SDL_SubmitGPUCommandBuffer
SDL_UnmapGPUTransferBuffer
SDL_UploadToGPUBuffer))
(define-bstruct SDL_GPUDevice)
(define-sdl-pointer-type <gpu-device>
gpu-device? wrap-gpu-device unwrap-gpu-device
gpu-device-destroyed? set-gpu-device-destroyed!
(lambda (device port)
(display "#<gpu-device>" port)))
(define-bstruct SDL_GPUBuffer)
(define-sdl-pointer-type <gpu-buffer>
gpu-buffer? wrap-gpu-buffer unwrap-gpu-buffer
gpu-buffer-released? set-gpu-buffer-released!
(lambda (buffer port)
(display "#<gpu-buffer>" port)))
(define-bstruct SDL_GPUTransferBuffer)
(define-sdl-pointer-type <gpu-transfer-buffer>
gpu-transfer-buffer? wrap-gpu-transfer-buffer unwrap-gpu-transfer-buffer
gpu-transfer-buffer-released? set-gpu-transfer-buffer-released!
(lambda (transfer-buffer port)
(display "#<gpu-transfer-buffer>" port)))
(define-bstruct SDL_GPUShader)
(define-sdl-pointer-type <gpu-shader>
gpu-shader? wrap-gpu-shader unwrap-gpu-shader
gpu-shader-released? set-gpu-shader-released!
(lambda (shader port)
(display "#<gpu-shader>" port)))
(define-bstruct SDL_GPUTexture)
(define-sdl-pointer-type <gpu-texture>
gpu-texture? wrap-gpu-texture unwrap-gpu-texture
gpu-texture-released? set-gpu-texture-released!
(lambda (texture port)
(format port "#<gpu-texture ~a>"
(pointer-address (unwrap-gpu-texture texture)))))
(define-bstruct SDL_GPUSampler)
(define-sdl-pointer-type <gpu-sampler>
gpu-sampler? wrap-gpu-sampler unwrap-gpu-sampler
gpu-sampler-released? set-gpu-sampler-released!
(lambda (sampler port)
(format port "#<gpu-sampler ~a>"
(pointer-address (unwrap-gpu-sampler sampler)))))
(define-sdl-pointer-type <gpu-graphics-pipeline>
gpu-graphics-pipeline? wrap-gpu-graphics-pipeline unwrap-gpu-graphics-pipeline
gpu-graphics-pipeline-released? set-gpu-graphics-pipeline-released!
(lambda (graphics-pipeline port)
(display "#<gpu-graphics-pipeline>" port)))
(define-wrapped-pointer-type <gpu-command-buffer>
gpu-command-buffer? wrap-gpu-command-buffer unwrap-gpu-command-buffer
(lambda (command-buffer port)
(display "#<gpu-command-buffer>" port)))
(define-wrapped-pointer-type <gpu-copy-pass>
gpu-copy-pass? wrap-gpu-copy-pass unwrap-gpu-copy-pass
(lambda (copy-pass port)
(display "#<gpu-copy-pass>" port)))
(define-wrapped-pointer-type <gpu-render-pass>
gpu-render-pass? wrap-gpu-render-pass unwrap-gpu-render-pass
(lambda (render-pass port)
(display "#<gpu-render-pass>" port)))
(define-wrapped-pointer-type <gpu-compute-pass>
gpu-compute-pass? wrap-gpu-compute-pass unwrap-gpu-compute-pass
(lambda (compute-pass port)
(display "#<gpu-compute-pass>" port)))
(define-enum SDL_GPUPrimitiveType
symbol->gpu-primitive-type
primitive-type->symbol
(triangle-list SDL_GPU_PRIMITIVETYPE_TRIANGLELIST)
(triangle-strip SDL_GPU_PRIMITIVETYPE_TRIANGLESTRIP)
(line-list SDL_GPU_PRIMITIVETYPE_LINELIST)
(line-strip SDL_GPU_PRIMITIVETYPE_LINESTRIP)
(point-list SDL_GPU_PRIMITIVETYPE_POINTLIST))
(define-enum SDL_GPULoadOp
symbol->gpu-load-op
gpu-load-op->symbol
(load SDL_GPU_LOADOP_LOAD)
(clear SDL_GPU_LOADOP_CLEAR)
(dont-care SDL_GPU_LOADOP_DONT_CARE))
(define-enum SDL_GPUStoreOp
symbol->gpu-store-op
gpu-store-op->symbol
(store SDL_GPU_STOREOP_STORE)
(dont-care SDL_GPU_STOREOP_DONT_CARE)
(resolve SDL_GPU_STOREOP_RESOLVE)
(resolve-and-store SDL_GPU_STOREOP_RESOLVE_AND_STORE))
(define-enum SDL_GPUIndexElementSize
symbol->gpu-index-element-size
gpu-index-element-size->symbol
(16-bit SDL_GPU_INDEXELEMENTSIZE_16BIT)
(32-bit SDL_GPU_INDEXELEMENTSIZE_32BIT))
(define-enum SDL_GPUTextureFormat
symbol->gpu-texture-format
gpu-texture-format->symbol
(invalid SDL_GPU_TEXTUREFORMAT_INVALID)
(a8-unorm SDL_GPU_TEXTUREFORMAT_A8_UNORM)
(r8-unorm SDL_GPU_TEXTUREFORMAT_R8_UNORM)
(r8g8-unorm SDL_GPU_TEXTUREFORMAT_R8G8_UNORM)
(r8g8b8a8-unorm SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM)
(r16-unorm SDL_GPU_TEXTUREFORMAT_R16_UNORM)
(r16g16-unorm SDL_GPU_TEXTUREFORMAT_R16G16_UNORM)
(r16g16b16a16-unorm SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM)
(r10g10b10a2-unorm SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM)
(b5g6r5-unorm SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM)
(b5g5r5a1-unorm SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM)
(b4g4r4a4-unorm SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM)
(b8g8r8a8-unorm SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM)
(bc1-rbga-unorm SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM)
(bc2-rgba-unorm SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM)
(bc3-rgba-unorm SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM)
(bc4-r-unorm SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM)
(bc5-rg-unorm SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM)
(bc7-rgba-unorm SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM)
(bc6h-rgb-float SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT)
(bc6h-rgb-float SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT)
(r8-snorm SDL_GPU_TEXTUREFORMAT_R8_SNORM)
(r8g8-snorm SDL_GPU_TEXTUREFORMAT_R8G8_SNORM)
(r8g8b8a8-snorm SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM)
(r16-snorm SDL_GPU_TEXTUREFORMAT_R16_SNORM)
(r16g16-snorm SDL_GPU_TEXTUREFORMAT_R16G16_SNORM)
(r16g16b16a16-snorm SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM)
(r16-float SDL_GPU_TEXTUREFORMAT_R16_FLOAT)
(r16g16-float SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT)
(r16g16b16a16-float SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT)
(r32-float SDL_GPU_TEXTUREFORMAT_R32_FLOAT)
(r32g32-float SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT)
(r32g32b32a32-float SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT)
(r11g11b10-ufloat SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT)
(r8-uint SDL_GPU_TEXTUREFORMAT_R8_UINT)
(r8g8-uint SDL_GPU_TEXTUREFORMAT_R8G8_UINT)
(r8g8b8a8-uint SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT)
(r16-uint SDL_GPU_TEXTUREFORMAT_R16_UINT)
(r16g16-uint SDL_GPU_TEXTUREFORMAT_R16G16_UINT)
(r16g16b16a16-uint SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT)
(r32-uint SDL_GPU_TEXTUREFORMAT_R32_UINT)
(r32g32-uint SDL_GPU_TEXTUREFORMAT_R32G32_UINT)
(r32g32b32a32-uint SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT)
(r8-int SDL_GPU_TEXTUREFORMAT_R8_INT)
(r8g8-int SDL_GPU_TEXTUREFORMAT_R8G8_INT)
(r8g8b8a8-int SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT)
(r16-int SDL_GPU_TEXTUREFORMAT_R16_INT)
(r16g16-int SDL_GPU_TEXTUREFORMAT_R16G16_INT)
(r16g16b16a16-int SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT)
(r32-int SDL_GPU_TEXTUREFORMAT_R32_INT)
(r32g32-int SDL_GPU_TEXTUREFORMAT_R32G32_INT)
(r32g32b32a32-int SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT)
(r8g8b8a8-unorm-srgb SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB)
(b8g8r8a8-unorm-srgb SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB)
(bc1-unorm-srgb SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB)
(bc2-unorm-srgb SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB)
(bc3-unorm-srgb SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB)
(bc7-unorm-srgb SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB)
(d16-unorm SDL_GPU_TEXTUREFORMAT_D16_UNORM)
(d24-unorm SDL_GPU_TEXTUREFORMAT_D24_UNORM)
(d32-float SDL_GPU_TEXTUREFORMAT_D32_FLOAT)
(d24-unorm-s8-uint SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT)
(d32-float-s8-uint SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT))
(define-bitmask (SDL_GPUTextureUsageFlags uint32)
symbols->gpu-texture-usage-flags
gpu-texture-usage-flags->symbols
(sampler SDL_GPU_TEXTUREUSAGE_SAMPLER)
(color-target SDL_GPU_TEXTUREUSAGE_COLOR_TARGET)
(depth-stencil-target SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET)
(graphics-storage-read SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ)
(compute-storage-read SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ)
(compute-storage-write SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE)
(compute-storage-simultaneous-read-write
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE))
(define-enum SDL_GPUTextureType
symbol->gpu-texture-type
gpu-texture-type->symbol
(2d SDL_GPU_TEXTURETYPE_2D)
(2d-array SDL_GPU_TEXTURETYPE_2D_ARRAY)
(3d SDL_GPU_TEXTURETYPE_3D)
(cube SDL_GPU_TEXTURETYPE_CUBE)
(cube-array SDL_GPU_TEXTURETYPE_CUBE_ARRAY))
(define-enum SDL_GPUSampleCount
int->gpu-sample-count
gpu-sample-count->int
(1 SDL_GPU_SAMPLECOUNT_1)
(2 SDL_GPU_SAMPLECOUNT_2)
(4 SDL_GPU_SAMPLECOUNT_4)
(8 SDL_GPU_SAMPLECOUNT_8))
(define-enum SDL_GPUCubeMapFace
symbol->gpu-cube-map-face
gpu-cube-map-face->symbol
(positive-x SDL_GPU_CUBEMAPFACE_POSITIVEX)
(negative-x SDL_GPU_CUBEMAPFACE_NEGATIVEX)
(positive-y SDL_GPU_CUBEMAPFACE_POSITIVEY)
(negative-y SDL_GPU_CUBEMAPFACE_NEGATIVEY)
(positive-z SDL_GPU_CUBEMAPFACE_POSITIVEZ)
(negative-z SDL_GPU_CUBEMAPFACE_NEGATIVEZ))
(define-bitmask (SDL_GPUBufferUsageFlags uint32)
symbols->gpu-buffer-usage-flags
gpu-buffer-usage-flags->symbols
(vertex SDL_GPU_BUFFERUSAGE_VERTEX)
(index SDL_GPU_BUFFERUSAGE_INDEX)
(indirect SDL_GPU_BUFFERUSAGE_INDIRECT)
(graphics-storage-read SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ)
(compute-storage-read SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ)
(compute-storage-write SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE))
(define-enum SDL_GPUTransferBufferUsage
symbol->gpu-transfer-buffer-usage
gpu-transfer-buffer-usage->symbol
(upload SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD)
(download SDL_GPU_TRANSFERBUFFERUSAGE_DOWNLOAD))
(define-enum SDL_GPUShaderStage
symbol->gpu-shader-stage
gpu-shader-stage->symbol
(vertex SDL_GPU_SHADERSTAGE_VERTEX)
(fragment SDL_GPU_SHADERSTAGE_FRAGMENT))
(define-bitmask (SDL_GPUShaderFormat uint32)
symbols->gpu-shader-format
gpu-shader-format->symbols
(private SDL_GPU_SHADERFORMAT_PRIVATE)
(spirv SDL_GPU_SHADERFORMAT_SPIRV)
(dxbc SDL_GPU_SHADERFORMAT_DXBC)
(dxil SDL_GPU_SHADERFORMAT_DXIL)
(msl SDL_GPU_SHADERFORMAT_MSL)
(metallib SDL_GPU_SHADERFORMAT_METALLIB))
(define SDL_GPU_SHADERFORMAT_INVALID 0)
(define-enum SDL_GPUVertexElementFormat
symbol->gpu-vertex-element-format
gpu-vertex-element-format->symbol
(invalid SDL_GPU_VERTEXELEMENTFORMAT_INVALID)
(int SDL_GPU_VERTEXELEMENTFORMAT_INT)
(int2 SDL_GPU_VERTEXELEMENTFORMAT_INT2)
(int3 SDL_GPU_VERTEXELEMENTFORMAT_INT3)
(int4 SDL_GPU_VERTEXELEMENTFORMAT_INT4)
(uint SDL_GPU_VERTEXELEMENTFORMAT_UINT)
(uint2 SDL_GPU_VERTEXELEMENTFORMAT_UINT2)
(uint3 SDL_GPU_VERTEXELEMENTFORMAT_UINT3)
(uint4 SDL_GPU_VERTEXELEMENTFORMAT_UINT4)
(float SDL_GPU_VERTEXELEMENTFORMAT_FLOAT)
(float2 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2)
(float3 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3)
(float4 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4)
(byte2 SDL_GPU_VERTEXELEMENTFORMAT_BYTE2)
(byte4 SDL_GPU_VERTEXELEMENTFORMAT_BYTE4)
(ubyte2 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2)
(ubyte4 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4)
(byte2-norm SDL_GPU_VERTEXELEMENTFORMAT_BYTE2_NORM)
(byte4-norm SDL_GPU_VERTEXELEMENTFORMAT_BYTE4_NORM)
(ubyte2-norm SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM)
(ubyte4-norm SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM)
(short2 SDL_GPU_VERTEXELEMENTFORMAT_SHORT2)
(short4 SDL_GPU_VERTEXELEMENTFORMAT_SHORT4)
(ushort2 SDL_GPU_VERTEXELEMENTFORMAT_USHORT2)
(ushort4 SDL_GPU_VERTEXELEMENTFORMAT_USHORT4)
(short2-norm SDL_GPU_VERTEXELEMENTFORMAT_SHORT2_NORM)
(short4-norm SDL_GPU_VERTEXELEMENTFORMAT_SHORT4_NORM)
(ushort2-norm SDL_GPU_VERTEXELEMENTFORMAT_USHORT2_NORM)
(ushort4-norm SDL_GPU_VERTEXELEMENTFORMAT_USHORT4_NORM)
(half2 SDL_GPU_VERTEXELEMENTFORMAT_HALF2)
(half4 SDL_GPU_VERTEXELEMENTFORMAT_HALF4))
(define-enum SDL_GPUVertexInputRate
symbol->gpu-vertex-input-rate
gpu-vertex-input-rate->symbol
(vertex SDL_GPU_VERTEXINPUTRATE_VERTEX)
(instance SDL_GPU_VERTEXINPUTRATE_INSTANCE))
(define-enum SDL_GPUFillMode
symbol->gpu-fill-mode
gpu-fill-mode->symbol
(fill SDL_GPU_FILLMODE_FILL)
(line SDL_GPU_FILLMODE_LINE))
(define-enum SDL_GPUCullMode
symbol->gpu-cull-mode
gpu-cull-mode->symbol
(none SDL_GPU_CULLMODE_NONE)
(front SDL_GPU_CULLMODE_FRONT)
(back SDL_GPU_CULLMODE_BACK))
(define-enum SDL_GPUFrontFace
symbol->gpu-front-face
gpu-front-face->symbol
(counter-clockwise SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE)
(clockwise SDL_GPU_FRONTFACE_CLOCKWISE))
(define-enum SDL_GPUCompareOp
symbol->gpu-compare-op
gpu-compare-op->symbol
(invalid SDL_GPU_COMPAREOP_INVALID)
(never SDL_GPU_COMPAREOP_NEVER)
(less SDL_GPU_COMPAREOP_LESS)
(equal SDL_GPU_COMPAREOP_EQUAL)
(less-or-equal SDL_GPU_COMPAREOP_LESS_OR_EQUAL)
(greater SDL_GPU_COMPAREOP_GREATER)
(not-equal SDL_GPU_COMPAREOP_NOT_EQUAL)
(greater-or-equal SDL_GPU_COMPAREOP_GREATER_OR_EQUAL)
(always SDL_GPU_COMPAREOP_ALWAYS))
(define-enum SDL_GPUStencilOp
symbol->gpu-stencil-op
gpu-stencil-op->symbol
(invalid SDL_GPU_STENCILOP_INVALID)
(keep SDL_GPU_STENCILOP_KEEP)
(zero SDL_GPU_STENCILOP_ZERO)
(replace SDL_GPU_STENCILOP_REPLACE)
(increment-and-clamp SDL_GPU_STENCILOP_INCREMENT_AND_CLAMP)
(decrement-and-clamp SDL_GPU_STENCILOP_DECREMENT_AND_CLAMP)
(invert SDL_GPU_STENCILOP_INVERT)
(increment-and-wrap SDL_GPU_STENCILOP_INCREMENT_AND_WRAP)
(decrement-and-wrap SDL_GPU_STENCILOP_DECREMENT_AND_WRAP))
(define-enum SDL_GPUBlendOp
symbol->gpu-blend-op
gpu-blend-op->symbol
(invalid SDL_GPU_BLENDOP_INVALID)
(add SDL_GPU_BLENDOP_ADD)
(subtract SDL_GPU_BLENDOP_SUBTRACT)
(reverse-subtract SDL_GPU_BLENDOP_REVERSE_SUBTRACT)
(min SDL_GPU_BLENDOP_MIN)
(max SDL_GPU_BLENDOP_MAX))
(define-enum SDL_GPUBlendFactor
symbol->gpu-blend-factor
gpu-blend-factor->symbol
(invalid SDL_GPU_BLENDFACTOR_INVALID)
(zero SDL_GPU_BLENDFACTOR_ZERO)
(one SDL_GPU_BLENDFACTOR_ONE)
(src-color SDL_GPU_BLENDFACTOR_SRC_COLOR)
(one-minus-src-color SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR)
(dst-color SDL_GPU_BLENDFACTOR_DST_COLOR)
(one-minus-dst-color SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR)
(src-alpha SDL_GPU_BLENDFACTOR_SRC_ALPHA)
(one-minus-src-alpha SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA)
(dst-alpha SDL_GPU_BLENDFACTOR_DST_ALPHA)
(one-minus-dst-alpha SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA)
(constant-color SDL_GPU_BLENDFACTOR_CONSTANT_COLOR)
(one-minus-constant-color SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR)
(alpha-saturate SDL_GPU_BLENDFACTOR_SRC_ALPHA_SATURATE))
(define-bitmask (SDL_GPUColorComponentFlags uint8)
symbols->gpu-color-component-flags
gpu-color-component-flags->symbols
(r SDL_GPU_COLORCOMPONENT_R)
(g SDL_GPU_COLORCOMPONENT_G)
(b SDL_GPU_COLORCOMPONENT_B)
(a SDL_GPU_COLORCOMPONENT_A))
(define-enum SDL_GPUFilter
symbol->gpu-filter
gpu-filter->symbol
(nearest SDL_GPU_FILTER_NEAREST)
(linear SDL_GPU_FILTER_LINEAR))
(define-enum SDL_GPUSamplerMipmapMode
symbol->gpu-sampler-mipmap-mode
gpu-sampler-mipmap-mode->symbol
(nearest SDL_GPU_SAMPLERMIPMAPMODE_NEAREST)
(linear SDL_GPU_SAMPLERMIPMAPMODE_LINEAR))
(define-enum SDL_GPUSamplerAddressMode
symbol->gpu-sampler-address-mode
gpu-sampler-address-mode->symbol
(repease SDL_GPU_SAMPLERADDRESSMODE_REPEAT)
(mirrored-repeat SDL_GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT)
(clamp-to-edge SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE))
(define-enum SDL_GPUPresentMode
symbol->gpu-present-mode
gpu-present-mode->symbol
(vsync SDL_GPU_PRESENTMODE_VSYNC)
(immediate SDL_GPU_PRESENTMODE_IMMEDIATE)
(mailbox SDL_GPU_PRESENTMODE_MAILBOX))
(define-enum SDL_GPUSwapchainComposition
symbol->gpu-swapchain-composition
gpu-swapchain-composition->symbol
(sdr SDL_GPU_SWAPCHAINCOMPOSITION_SDR)
(sdr-linear SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR)
(hdr-extended-linear SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR)
(hdr10-st2048 SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2048))
(define-bstruct SDL_GPUViewport
(struct
(x float)
(y float)
(w float)
(h float)
(min_depth float)
(max_depth float)))
(define-bstruct SDL_GPUTextureTransferInfo
(struct
(transfer_buffer (* SDL_GPUTransferBuffer))
(offset uint32)
(pixels_per_row uint32)
(rows_per_layer uint32)))
(define-bstruct SDL_GPUTransferBufferLocation
(struct
(transfer_buffer (* SDL_GPUTransferBuffer))
(offset uint32)))
(define-bstruct SDL_GPUTextureLocation
(struct
(texture (* SDL_GPUTexture))
(mip_level uint32)
(layer uint32)
(x uint32)
(y uint32)
(z uint32)))
(define-bstruct SDL_GPUTextureRegion
(struct
(texture (* SDL_GPUTexture))
(mip_level uint32)
(layer uint32)
(x uint32)
(y uint32)
(z uint32)
(w uint32)
(h uint32)
(d uint32)))
(define-bstruct SDL_GPUBlitRegion
(struct
(texture (* SDL_GPUTexture))
(mip_level uint32)
(layer_or_depth_plane uint32)
(x uint32)
(y uint32)
(w uint32)
(h uint32)))
(define-bstruct SDL_GPUBufferLocation
(struct
(buffer (* SDL_GPUBuffer))
(offset uint32)))
(define-bstruct SDL_GPUBufferRegion
(struct
(buffer (* SDL_GPUBuffer))
(offset uint32)
(size uint32)))
(define-bstruct SDL_GPUVertexBufferDescription
(struct
(slot uint32)
(pitch uint32)
(input_rate int) ; SDL_GPUVertexInputRate
(instance_step_rate uint32)))
(define-bstruct SDL_GPUVertexAttribute
(struct
(location uint32)
(buffer_slot uint32)
(format int) ; SDL_GPUVertexElementFormat
(offset uint32)))
(define-bstruct SDL_GPUVertexInputState
(struct
(vertex_buffer_descriptions (* SDL_GPUVertexBufferDescription))
(num_vertex_buffers uint32)
(vertex_attributes (* SDL_GPUVertexAttribute))
(num_vertex_attributes uint32)))
(define-bstruct SDL_GPUStencilOpState
(struct
(fail_op int) ; SDL_GPUStencilOp
(pass_op int) ; SDL_GPUStencilOp
(depth_fail_op int) ; SDL_GPUStencilOp
(compare_op int) ; SDL_GPUCompareOp
))
(define-bstruct SDL_GPUColorTargetBlendState
(struct
(src_color_blendfactor int) ; SDL_GPUBlendFactor
(dst_color_blendfactor int) ; SDL_GPUBlendFactor
(color_blend_op int) ; SDL_GPUBlendOp
(src_alpha_blendfactor int) ; SDL_GPUBlendFactor
(dst_alpha_blendfactor int) ; SDL_GPUBlendFactor
(alpha_blend_op int) ; SDL_GPUBlendOp
(color_write_mask uint8) ; SDL_GPUColorComponentFlags
(enable_blend uint8) ; bool
(enable_color_write_mask uint8) ; bool
(_ uint8)
(_ uint8)))
(define-bstruct SDL_GPUShaderCreateInfo
(struct
(code_size size_t)
(code (* uint8))
(entrypoint (* uint8)) ; char*
(format uint32) ; SDL_GPUShaderFormat
(stage int) ; SDL_GPUShaderStage
(num_samplers uint32)
(num_storage_textures uint32)
(num_storage_buffers uint32)
(num_uniform_buffers uint32)
(props uint32) ; SDL_PropertiesID
))
(define-bstruct SDL_GPUTextureCreateInfo
(struct
(type int) ; SDL_GPUTextureType
(format int) ; SDL_GPUTextureFormat
(usage uint32) ; SDL_GPUTextureUsageFlags
(width uint32)
(height uint32)
(layer_count_or_depth uint32)
(num_levels uint32)
(sample_count int) ; SDL_GPUSampleCount
(props uint32) ; SDL_PropertiesID
))
(define-bstruct SDL_GPUBufferCreateInfo
(struct
(usage uint32) ; SDL_GPUBufferUsageFlags
(size uint32)
(props uint32) ; SDL_PropertiesID
))
(define-bstruct SDL_GPUTransferBufferCreateInfo
(struct
(usage uint32) ; SDL_GPUTransferBufferUsage
(size uint32)
(props uint32) ; SDL_PropertiesID
))
(define-bstruct SDL_GPURasterizerState
(struct
(fill_mode int) ; SDL_GPUFillMode
(cull_mode int) ; SDL_GPUCullMode
(front_face int) ; SDL_GPUFrontFace
(depth_bias_constant_factor float)
(depth_bias_clamp float)
(depth_bias_slope_factor float)
(enable_depth_bias uint8) ; bool
(enable_depth_clip uint8) ; bool
(_ uint8)
(_ uint8)))
(define-bstruct SDL_GPUMultisampleState
(struct
(sample_count int) ; SDL_GPUSampleCount
(sample_mask uint32)
(enable_mask uint8) ; bool
(_ uint8)
(_ uint8)
(_ uint8)))
(define-bstruct SDL_GPUDepthStencilState
(struct
(compare_op uint32) ; SDL_GPUCompareOp
(back_stencil_state SDL_GPUStencilOpState)
(front_stencil_state SDL_GPUStencilOpState)
(compare_mask uint8)
(write_mask uint8)
(enable_depth_test uint8) ; bool
(enable_depth_write uint8) ; bool
(enable_stencil_test uint8) ; bool
(_ uint8)
(_ uint8)
(_ uint8)))
(define-bstruct SDL_GPUColorTargetDescription
(struct
(format uint32) ; SDL_GPUTextureFormat
(blend_state SDL_GPUColorTargetBlendState)))
(define-bstruct SDL_GPUGraphicsPipelineTargetInfo
(struct
(color_target_descriptions (* SDL_GPUColorTargetDescription))
(num_color_targets uint32)
(depth_stencil_format uint32) ; SDL_GPUTextureFormat
(has_depth_stencil_target uint8) ; bool
(_ uint8)
(_ uint8)
(_ uint8)))
(define-bstruct SDL_GPUGraphicsPipelineCreateInfo
(struct
(vertex_shader (* SDL_GPUShader))
(fragment_shader (* SDL_GPUShader))
(vertex_input_state SDL_GPUVertexInputState)
(primitive_type int) ; SDL_GPUPrimitiveType
(rasterizer_state SDL_GPURasterizerState)
(multisample_state SDL_GPUMultisampleState)
(depth_stencil_state SDL_GPUDepthStencilState)
(target_info SDL_GPUGraphicsPipelineTargetInfo)
(props uint32) ; SDL_PropertiesID
))
(define-bstruct SDL_GPUComputePipelineCreateInfo
(struct
(code_size size_t)
(code (* uint8))
(entrypoint (* uint8)) ; char
(format int) ; SDL_GPUShaderFormat
(num_samplers uint32)
(num_readonly_storage_textures uint32)
(num_readonly_storage_buffers uint32)
(num_readwrite_storage_textures uint32)
(num_readwrite_storage_buffers uint32)
(num_uniform_buffers uint32)
(threadcount_x uint32)
(threadcount_y uint32)
(threadcount_z uint32)
(props uint32) ; SDL_PropertiesID
))
(define-bstruct SDL_GPUColorTargetInfo
(struct
(texture (* SDL_GPUTexture))
(mip_level uint32)
(layer_or_depth_plane uint32)
(clear_color SDL_FColor)
(load_op int) ; SDL_GPULoadOp
(store_op int) ; SDL_GPUStoreOp
(resolve_texture (* SDL_GPUTexture))
(resolve_mip_level uint32)
(resolve_layer uint32)
(cycle uint8) ; bool
(cycle_resolve_texture uint8) ; bool
(_ uint8)
(_ uint8)))
(define-bstruct SDL_GPUDepthStencilTargetInfo
(struct
(texture (* SDL_GPUTexture))
(clear_depth float)
(load_op int) ; SDL_GPULoadOp
(store_op int) ; SDL_GPUStoreOp
(stencil_load_op int) ; SDL_GPULoadOp
(stencil_store_op int) ; SDL_GPUStoreOp
(cycle uint8) ; bool
(clear_stencil uint8)
(_ uint8)
(_ uint8)))
(define-bstruct SDL_GPUBlitInfo
(struct
(source SDL_GPUBlitRegion)
(destination SDL_GPUBlitRegion)
(load_op int) ; SDL_GPULoadOp
(clear_color SDL_FColor)
(flip_mode int) ; SDL_FlipMode
(filter int) ; SDL_GPUFilter
(cycle uint8) ; bool
(_ uint8)
(_ uint8)
(_ uint8)))
(define-bstruct SDL_GPUBufferBinding
(struct
(buffer (* SDL_GPUBuffer))
(offset uint32)))
(define-bstruct SDL_GPUTextureSamplerBinding
(struct
(texture (* SDL_GPUTexture))
(sampler (* SDL_GPUSampler))))
(define-bstruct SDL_GPUStorageBufferReadWriteBinding
(struct
(buffer (* SDL_GPUBuffer))
(cycle uint8) ; bool
(_ uint8)
(_ uint8)
(_ uint8)))
(define-bstruct SDL_GPUStorageTextureReadWriteBinding
(struct
(texture (* SDL_GPUTexture))
(mip_level uint32)
(layer uint32)
(cycle uint8)
(_ uint8)
(_ uint8)
(_ uint8)))
(define-sdl SDL_AcquireGPUCommandBuffer '* -> '*)
(define-sdl SDL_AcquireGPUSwapchainTexture '* '* '* '* '* -> bool)
(define-sdl SDL_BeginGPUCopyPass '* -> '*)
(define-sdl SDL_BeginGPURenderPass '* '* uint32 '* -> '*)
(define-sdl SDL_BindGPUGraphicsPipeline '* '*)
(define-sdl SDL_BindGPUVertexBuffers '* uint32 '* uint32)
(define-sdl SDL_BlitGPUTexture '* '*)
(define-sdl SDL_CreateGPUBuffer '* '* -> '*)
(define-sdl SDL_CreateGPUDevice SDL_GPUShaderFormat bool '* -> '*)
(define-sdl SDL_CreateGPUGraphicsPipeline '* '* -> '*)
(define-sdl SDL_CreateGPUShader '* '* -> '*)
(define-sdl SDL_CreateGPUTexture '* '* -> '*)
(define-sdl SDL_CreateGPUTransferBuffer '* '* -> '*)
(define-sdl SDL_ClaimWindowForGPUDevice '* '* -> bool)
(define-sdl SDL_DestroyGPUDevice '*)
(define-sdl SDL_DrawGPUPrimitives '* uint32 uint32 uint32 uint32)
(define-sdl SDL_EndGPUCopyPass '*)
(define-sdl SDL_EndGPURenderPass '*)
(define-sdl SDL_GetGPUDeviceDriver '* -> '*)
(define-sdl SDL_GetGPUDriver int -> '*)
(define-sdl SDL_GetGPUSwapchainTextureFormat '* '* -> SDL_GPUTextureFormat)
(define-sdl SDL_GetNumGPUDrivers -> int)
(define-sdl SDL_GPUTextureSupportsSampleCount '* SDL_GPUTextureFormat SDL_GPUSampleCount -> bool)
(define-sdl SDL_MapGPUTransferBuffer '* '* bool -> '*)
(define-sdl SDL_PushGPUFragmentUniformData '* uint32 '* uint32)
(define-sdl SDL_PushGPUVertexUniformData '* uint32 '* uint32)
(define-sdl SDL_ReleaseGPUBuffer '* '*)
(define-sdl SDL_ReleaseGPUGraphicsPipeline '* '*)
(define-sdl SDL_ReleaseGPUShader '* '*)
(define-sdl SDL_ReleaseGPUTexture '* '*)
(define-sdl SDL_ReleaseGPUTransferBuffer '* '*)
(define-sdl SDL_ReleaseWindowFromGPUDevice '* '*)
(define-sdl SDL_SetGPUBufferName '* '* '*)
(define-sdl SDL_SubmitGPUCommandBuffer '* -> bool)
(define-sdl SDL_UnmapGPUTransferBuffer '* '*)
(define-sdl SDL_UploadToGPUBuffer '* '* '* bool)
|