annotate src/glslang/glslang_c_interface.nim @ 477:f226c99b5043

add: matrix multiplications, tests
author Sam <sam@basx.dev>
date Fri, 30 Dec 2022 15:56:17 +0700
parents 9eeaeb35eb1c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
463
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
1 import std/strformat
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
2
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
3 when defined(linux):
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
4 const platform = "linux"
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
5 when defined(windows):
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
6 const platform = "windows"
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
7
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
8
462
0bc8643cfe25 add: more steps in setup
Sam <sam@basx.dev>
parents: 461
diff changeset
9 when defined(release):
463
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
10 const libversion = "release"
462
0bc8643cfe25 add: more steps in setup
Sam <sam@basx.dev>
parents: 461
diff changeset
11 else:
463
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
12 const libversion = "debug"
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
13
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
14
91544fc1afe5 did: hello world triangle, a bit of code organization
Sam <sam@basx.dev>
parents: 462
diff changeset
15 # required to link the GLSL compiler
471
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
16 when defined(linux):
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
17 {.passl: &"-Lthirdparty/lib/glslang/{platform}_{libversion}" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
18 {.passl: &"-Lthirdparty/lib/spirv-tools/{platform}_{libversion}" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
19 {.passl: "-lglslang" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
20 {.passl: "-lglslang-default-resource-limits" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
21 {.passl: "-lHLSL" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
22 {.passl: "-lMachineIndependent" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
23 {.passl: "-lGenericCodeGen" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
24 {.passl: "-lOSDependent" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
25 {.passl: "-lOGLCompiler" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
26 {.passl: "-lSPIRV" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
27 {.passl: "-lSPIRV-Tools-opt" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
28 {.passl: "-lSPIRV-Tools" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
29 {.passl: "-lSPIRV-Tools-diff" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
30 {.passl: "-lSPIRV-Tools-fuzz" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
31 {.passl: "-lSPIRV-Tools-link" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
32 {.passl: "-lSPIRV-Tools-lint" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
33 {.passl: "-lSPIRV-Tools-opt" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
34 {.passl: "-lSPIRV-Tools-reduce" .}
462
0bc8643cfe25 add: more steps in setup
Sam <sam@basx.dev>
parents: 461
diff changeset
35
471
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
36 {.passl: "-lstdc++" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
37 {.passl: "-lm" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
38 when defined(windows):
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
39 when libversion == "release":
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
40 const LIB_POSTFIX = ".lib"
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
41 when libversion == "debug":
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
42 const LIB_POSTFIX = "d.lib"
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
43
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
44 {.passl: "/link" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
45 {.passl: &"/LIBPATH:./thirdparty/lib/glslang/{platform}_{libversion}" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
46 {.passl: &"/LIBPATH:./thirdparty/lib/spirv-tools/{platform}_{libversion}" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
47 {.passl: "glslang" & LIB_POSTFIX .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
48 {.passl: "glslang-default-resource-limits" & LIB_POSTFIX .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
49 {.passl: "HLSL" & LIB_POSTFIX .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
50 {.passl: "MachineIndependent" & LIB_POSTFIX .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
51 {.passl: "GenericCodeGen" & LIB_POSTFIX .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
52 {.passl: "OSDependent" & LIB_POSTFIX .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
53 {.passl: "OGLCompiler" & LIB_POSTFIX .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
54 {.passl: "SPIRV" & LIB_POSTFIX .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
55 {.passl: "SPIRV-Tools-opt.lib" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
56 {.passl: "SPIRV-Tools.lib" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
57 {.passl: "SPIRV-Tools-diff.lib" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
58 {.passl: "SPIRV-Tools-fuzz.lib" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
59 {.passl: "SPIRV-Tools-link.lib" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
60 {.passl: "SPIRV-Tools-lint.lib" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
61 {.passl: "SPIRV-Tools-opt.lib" .}
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
62 {.passl: "SPIRV-Tools-reduce.lib" .}
462
0bc8643cfe25 add: more steps in setup
Sam <sam@basx.dev>
parents: 461
diff changeset
63
471
9eeaeb35eb1c did: make it work on windows
sam <sam@basx.dev>
parents: 463
diff changeset
64
462
0bc8643cfe25 add: more steps in setup
Sam <sam@basx.dev>
parents: 461
diff changeset
65
461
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
66 import
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
67 glslang_c_shader_types
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
68
462
0bc8643cfe25 add: more steps in setup
Sam <sam@basx.dev>
parents: 461
diff changeset
69 type
0bc8643cfe25 add: more steps in setup
Sam <sam@basx.dev>
parents: 461
diff changeset
70 glslang_shader_t* {.nodecl incompleteStruct.} = object
0bc8643cfe25 add: more steps in setup
Sam <sam@basx.dev>
parents: 461
diff changeset
71 glslang_program_t* {.nodecl incompleteStruct.} = object
461
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
72 glslang_limits_t* {.bycopy.} = object
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
73 non_inductive_for_loops*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
74 while_loops*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
75 do_while_loops*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
76 general_uniform_indexing*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
77 general_attribute_matrix_vector_indexing*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
78 general_varying_indexing*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
79 general_sampler_indexing*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
80 general_variable_indexing*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
81 general_constant_matrix_vector_indexing*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
82 glslang_resource_t* {.bycopy.} = object
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
83 max_lights*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
84 max_clip_planes*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
85 max_texture_units*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
86 max_texture_coords*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
87 max_vertex_attribs*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
88 max_vertex_uniform_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
89 max_varying_floats*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
90 max_vertex_texture_image_units*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
91 max_combined_texture_image_units*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
92 max_texture_image_units*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
93 max_fragment_uniform_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
94 max_draw_buffers*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
95 max_vertex_uniform_vectors*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
96 max_varying_vectors*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
97 max_fragment_uniform_vectors*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
98 max_vertex_output_vectors*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
99 max_fragment_input_vectors*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
100 min_program_texel_offset*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
101 max_program_texel_offset*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
102 max_clip_distances*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
103 max_compute_work_group_count_x*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
104 max_compute_work_group_count_y*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
105 max_compute_work_group_count_z*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
106 max_compute_work_group_size_x*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
107 max_compute_work_group_size_y*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
108 max_compute_work_group_size_z*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
109 max_compute_uniform_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
110 max_compute_texture_image_units*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
111 max_compute_image_uniforms*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
112 max_compute_atomic_counters*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
113 max_compute_atomic_counter_buffers*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
114 max_varying_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
115 max_vertex_output_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
116 max_geometry_input_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
117 max_geometry_output_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
118 max_fragment_input_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
119 max_image_units*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
120 max_combined_image_units_and_fragment_outputs*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
121 max_combined_shader_output_resources*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
122 max_image_samples*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
123 max_vertex_image_uniforms*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
124 max_tess_control_image_uniforms*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
125 max_tess_evaluation_image_uniforms*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
126 max_geometry_image_uniforms*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
127 max_fragment_image_uniforms*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
128 max_combined_image_uniforms*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
129 max_geometry_texture_image_units*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
130 max_geometry_output_vertices*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
131 max_geometry_total_output_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
132 max_geometry_uniform_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
133 max_geometry_varying_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
134 max_tess_control_input_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
135 max_tess_control_output_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
136 max_tess_control_texture_image_units*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
137 max_tess_control_uniform_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
138 max_tess_control_total_output_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
139 max_tess_evaluation_input_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
140 max_tess_evaluation_output_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
141 max_tess_evaluation_texture_image_units*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
142 max_tess_evaluation_uniform_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
143 max_tess_patch_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
144 max_patch_vertices*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
145 max_tess_gen_level*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
146 max_viewports*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
147 max_vertex_atomic_counters*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
148 max_tess_control_atomic_counters*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
149 max_tess_evaluation_atomic_counters*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
150 max_geometry_atomic_counters*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
151 max_fragment_atomic_counters*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
152 max_combined_atomic_counters*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
153 max_atomic_counter_bindings*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
154 max_vertex_atomic_counter_buffers*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
155 max_tess_control_atomic_counter_buffers*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
156 max_tess_evaluation_atomic_counter_buffers*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
157 max_geometry_atomic_counter_buffers*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
158 max_fragment_atomic_counter_buffers*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
159 max_combined_atomic_counter_buffers*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
160 max_atomic_counter_buffer_size*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
161 max_transform_feedback_buffers*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
162 max_transform_feedback_interleaved_components*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
163 max_cull_distances*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
164 max_combined_clip_and_cull_distances*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
165 max_samples*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
166 max_mesh_output_vertices_nv*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
167 max_mesh_output_primitives_nv*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
168 max_mesh_work_group_size_x_nv*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
169 max_mesh_work_group_size_y_nv*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
170 max_mesh_work_group_size_z_nv*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
171 max_task_work_group_size_x_nv*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
172 max_task_work_group_size_y_nv*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
173 max_task_work_group_size_z_nv*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
174 max_mesh_view_count_nv*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
175 max_mesh_output_vertices_ext*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
176 max_mesh_output_primitives_ext*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
177 max_mesh_work_group_size_x_ext*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
178 max_mesh_work_group_size_y_ext*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
179 max_mesh_work_group_size_z_ext*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
180 max_task_work_group_size_x_ext*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
181 max_task_work_group_size_y_ext*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
182 max_task_work_group_size_z_ext*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
183 max_mesh_view_count_ext*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
184 maxDualSourceDrawBuffersEXT*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
185 limits*: glslang_limits_t
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
186 glslang_input_t* {.bycopy.} = object
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
187 language*: glslang_source_t
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
188 stage*: glslang_stage_t
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
189 client*: glslang_client_t
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
190 client_version*: glslang_target_client_version_t
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
191 target_language*: glslang_target_language_t
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
192 target_language_version*: glslang_target_language_version_t
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
193 code*: cstring
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
194 default_version*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
195 default_profile*: glslang_profile_t
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
196 force_default_version_and_profile*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
197 forward_compatible*: cint
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
198 messages*: glslang_messages_t
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
199 resource*: ptr glslang_resource_t
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
200 glsl_include_result_t* {.bycopy.} = object
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
201 ## Header file name or NULL if inclusion failed
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
202 header_name*: cstring
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
203 ## Header contents or NULL
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
204 header_data*: cstring
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
205 header_length*: csize_t
462
0bc8643cfe25 add: more steps in setup
Sam <sam@basx.dev>
parents: 461
diff changeset
206 glsl_include_local_func* = proc (ctx: pointer; header_name: cstring; includer_name: cstring; include_depth: csize_t): ptr glsl_include_result_t
0bc8643cfe25 add: more steps in setup
Sam <sam@basx.dev>
parents: 461
diff changeset
207 glsl_include_system_func* = proc (ctx: pointer; header_name: cstring; includer_name: cstring; include_depth: csize_t): ptr glsl_include_result_t
0bc8643cfe25 add: more steps in setup
Sam <sam@basx.dev>
parents: 461
diff changeset
208 glsl_free_include_result_func* = proc (ctx: pointer; result: ptr glsl_include_result_t): cint
461
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
209 glsl_include_callbacks_t* {.bycopy.} = object
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
210 include_system*: glsl_include_system_func
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
211 include_local*: glsl_include_local_func
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
212 free_include_result*: glsl_free_include_result_func
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
213 glslang_spv_options_t* {.bycopy.} = object
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
214 generate_debug_info*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
215 strip_debug_info*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
216 disable_optimizer*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
217 optimize_size*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
218 disassemble*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
219 validate*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
220 emit_nonsemantic_shader_debug_info*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
221 emit_nonsemantic_shader_debug_source*: bool
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
222
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
223 proc glslang_initialize_process*(): cint {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
224 proc glslang_finalize_process*() {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
225 proc glslang_shader_create*(input: ptr glslang_input_t): ptr glslang_shader_t {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
226 proc glslang_shader_delete*(shader: ptr glslang_shader_t) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
227 proc glslang_shader_set_preamble*(shader: ptr glslang_shader_t; s: cstring) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
228 proc glslang_shader_shift_binding*(shader: ptr glslang_shader_t; res: glslang_resource_type_t; base: cuint) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
229 proc glslang_shader_shift_binding_for_set*(shader: ptr glslang_shader_t; res: glslang_resource_type_t; base: cuint; set: cuint) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
230 proc glslang_shader_set_options*(shader: ptr glslang_shader_t; options: cint) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
231
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
232 proc glslang_shader_set_glsl_version*(shader: ptr glslang_shader_t; version: cint) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
233 proc glslang_shader_preprocess*(shader: ptr glslang_shader_t; input: ptr glslang_input_t): cint {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
234 proc glslang_shader_parse*(shader: ptr glslang_shader_t; input: ptr glslang_input_t): cint {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
235 proc glslang_shader_get_preprocessed_code*(shader: ptr glslang_shader_t): cstring {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
236 proc glslang_shader_get_info_log*(shader: ptr glslang_shader_t): cstring {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
237 proc glslang_shader_get_info_debug_log*(shader: ptr glslang_shader_t): cstring {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
238 proc glslang_program_create*(): ptr glslang_program_t {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
239 proc glslang_program_delete*(program: ptr glslang_program_t) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
240 proc glslang_program_add_shader*(program: ptr glslang_program_t; shader: ptr glslang_shader_t) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
241 proc glslang_program_link*(program: ptr glslang_program_t; messages: cint): cint {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
242
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
243 proc glslang_program_add_source_text*(program: ptr glslang_program_t; stage: glslang_stage_t; text: cstring; len: csize_t) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
244 proc glslang_program_set_source_file*(program: ptr glslang_program_t; stage: glslang_stage_t; file: cstring) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
245 proc glslang_program_map_io*(program: ptr glslang_program_t): cint {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
246 proc glslang_program_SPIRV_generate*(program: ptr glslang_program_t; stage: glslang_stage_t) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
247 proc glslang_program_SPIRV_generate_with_options*(program: ptr glslang_program_t; stage: glslang_stage_t; spv_options: ptr glslang_spv_options_t) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
248 proc glslang_program_SPIRV_get_size*(program: ptr glslang_program_t): csize_t {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
249 proc glslang_program_SPIRV_get*(program: ptr glslang_program_t; a2: ptr cuint) {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
250 proc glslang_program_SPIRV_get_ptr*(program: ptr glslang_program_t): ptr cuint {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
251 proc glslang_program_SPIRV_get_messages*(program: ptr glslang_program_t): cstring {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
252 proc glslang_program_get_info_log*(program: ptr glslang_program_t): cstring {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
253 proc glslang_program_get_info_debug_log*(program: ptr glslang_program_t): cstring {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
254
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
255 proc glslang_default_resource*(): ptr glslang_resource_t {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
256 proc glslang_default_resource_string*(): cstring {.importc.}
59d861a6a5c4 add: initial version
Sam <sam@basx.dev>
parents:
diff changeset
257 proc glslang_decode_resource_limits*(resources: ptr glslang_resource_t , config: cstring) {.importc.}