beamformer.meta.c (9161B)
1 /* See LICENSE for license details. */ 2 3 // GENERATED CODE 4 5 typedef enum { 6 BeamformerDataKind_Int16 = 0, 7 BeamformerDataKind_Int16Complex = 1, 8 BeamformerDataKind_Float32 = 2, 9 BeamformerDataKind_Float32Complex = 3, 10 BeamformerDataKind_Count, 11 } BeamformerDataKind; 12 13 typedef enum { 14 BeamformerDecodeMode_None = 0, 15 BeamformerDecodeMode_Hadamard = 1, 16 BeamformerDecodeMode_Count, 17 } BeamformerDecodeMode; 18 19 typedef enum { 20 BeamformerRCAOrientation_None = 0, 21 BeamformerRCAOrientation_Rows = 1, 22 BeamformerRCAOrientation_Columns = 2, 23 BeamformerRCAOrientation_Count, 24 } BeamformerRCAOrientation; 25 26 typedef enum { 27 BeamformerSamplingMode_2X = 0, 28 BeamformerSamplingMode_4X = 1, 29 BeamformerSamplingMode_Count, 30 } BeamformerSamplingMode; 31 32 typedef enum { 33 BeamformerAcquisitionKind_FORCES = 0, 34 BeamformerAcquisitionKind_UFORCES = 1, 35 BeamformerAcquisitionKind_HERCULES = 2, 36 BeamformerAcquisitionKind_RCA_VLS = 3, 37 BeamformerAcquisitionKind_RCA_TPW = 4, 38 BeamformerAcquisitionKind_UHERCULES = 5, 39 BeamformerAcquisitionKind_RACES = 6, 40 BeamformerAcquisitionKind_EPIC_FORCES = 7, 41 BeamformerAcquisitionKind_EPIC_UFORCES = 8, 42 BeamformerAcquisitionKind_EPIC_UHERCULES = 9, 43 BeamformerAcquisitionKind_Flash = 10, 44 BeamformerAcquisitionKind_HERO_PA = 11, 45 BeamformerAcquisitionKind_Count, 46 } BeamformerAcquisitionKind; 47 48 typedef enum { 49 BeamformerInterpolationMode_Nearest = 0, 50 BeamformerInterpolationMode_Linear = 1, 51 BeamformerInterpolationMode_Cubic = 2, 52 BeamformerInterpolationMode_Count, 53 } BeamformerInterpolationMode; 54 55 typedef enum { 56 BeamformerShaderDecodeFlags_DilateOutput = (1 << 0), 57 } BeamformerShaderDecodeFlags; 58 59 typedef enum { 60 BeamformerShaderFilterFlags_ComplexFilter = (1 << 0), 61 BeamformerShaderFilterFlags_MapChannels = (1 << 1), 62 BeamformerShaderFilterFlags_Demodulate = (1 << 2), 63 } BeamformerShaderFilterFlags; 64 65 typedef enum { 66 BeamformerShaderDASFlags_Fast = (1 << 0), 67 BeamformerShaderDASFlags_Sparse = (1 << 1), 68 BeamformerShaderDASFlags_CoherencyWeighting = (1 << 2), 69 BeamformerShaderDASFlags_SingleFocus = (1 << 3), 70 BeamformerShaderDASFlags_SingleOrientation = (1 << 4), 71 } BeamformerShaderDASFlags; 72 73 typedef enum { 74 BeamformerShaderKind_CudaDecode = 0, 75 BeamformerShaderKind_CudaHilbert = 1, 76 BeamformerShaderKind_Decode = 2, 77 BeamformerShaderKind_Filter = 3, 78 BeamformerShaderKind_Demodulate = 4, 79 BeamformerShaderKind_DAS = 5, 80 BeamformerShaderKind_MinMax = 6, 81 BeamformerShaderKind_Sum = 7, 82 BeamformerShaderKind_Render3D = 8, 83 BeamformerShaderKind_Count, 84 85 BeamformerShaderKind_ComputeFirst = BeamformerShaderKind_CudaDecode, 86 BeamformerShaderKind_ComputeLast = BeamformerShaderKind_Sum, 87 BeamformerShaderKind_ComputeCount = 8, 88 BeamformerShaderKind_RenderFirst = BeamformerShaderKind_Render3D, 89 BeamformerShaderKind_RenderLast = BeamformerShaderKind_Render3D, 90 BeamformerShaderKind_RenderCount = 1, 91 } BeamformerShaderKind; 92 93 typedef struct { 94 u32 decode_mode; 95 u32 input_channel_stride; 96 u32 input_sample_stride; 97 u32 input_transmit_stride; 98 u32 output_channel_stride; 99 u32 output_sample_stride; 100 u32 output_transmit_stride; 101 u32 transmit_count; 102 } BeamformerShaderDecodeBakeParameters; 103 104 typedef struct { 105 u32 decimation_rate; 106 u32 filter_length; 107 u32 input_channel_stride; 108 u32 input_sample_stride; 109 u32 input_transmit_stride; 110 u32 output_channel_stride; 111 u32 output_sample_stride; 112 u32 output_transmit_stride; 113 u32 sampling_mode; 114 f32 demodulation_frequency; 115 f32 sampling_frequency; 116 } BeamformerShaderFilterBakeParameters; 117 118 typedef struct { 119 u32 acquisition_count; 120 u32 acquisition_kind; 121 u32 channel_count; 122 u32 interpolation_mode; 123 u32 sample_count; 124 u32 transmit_receive_orientation; 125 f32 demodulation_frequency; 126 f32 f_number; 127 f32 focus_depth; 128 f32 sampling_frequency; 129 f32 speed_of_sound; 130 f32 time_offset; 131 f32 transmit_angle; 132 } BeamformerShaderDASBakeParameters; 133 134 typedef struct { 135 union { 136 BeamformerShaderDecodeBakeParameters Decode; 137 BeamformerShaderFilterBakeParameters Filter; 138 BeamformerShaderDASBakeParameters DAS; 139 }; 140 u32 data_kind; 141 u32 flags; 142 } BeamformerShaderBakeParameters; 143 144 read_only global s8 beamformer_shader_names[] = { 145 s8_comp("CudaDecode"), 146 s8_comp("CudaHilbert"), 147 s8_comp("Decode"), 148 s8_comp("Filter"), 149 s8_comp("Demodulate"), 150 s8_comp("DAS"), 151 s8_comp("MinMax"), 152 s8_comp("Sum"), 153 s8_comp("Render3D"), 154 }; 155 156 read_only global BeamformerShaderKind beamformer_reloadable_shader_kinds[] = { 157 BeamformerShaderKind_Decode, 158 BeamformerShaderKind_Filter, 159 BeamformerShaderKind_DAS, 160 BeamformerShaderKind_MinMax, 161 BeamformerShaderKind_Sum, 162 BeamformerShaderKind_Render3D, 163 }; 164 165 read_only global s8 beamformer_reloadable_shader_files[] = { 166 s8_comp("decode.glsl"), 167 s8_comp("filter.glsl"), 168 s8_comp("das.glsl"), 169 s8_comp("min_max.glsl"), 170 s8_comp("sum.glsl"), 171 s8_comp("render_3d.frag.glsl"), 172 }; 173 174 read_only global i32 beamformer_shader_reloadable_index_by_shader[] = { 175 -1, 176 -1, 177 0, 178 1, 179 1, 180 2, 181 3, 182 4, 183 5, 184 }; 185 186 read_only global i32 beamformer_reloadable_compute_shader_info_indices[] = { 187 0, 188 1, 189 2, 190 3, 191 4, 192 }; 193 194 read_only global i32 beamformer_reloadable_render_shader_info_indices[] = { 195 5, 196 }; 197 198 read_only global s8 beamformer_shader_global_header_strings[] = { 199 s8_comp("" 200 "#define DataKind_Int16 0\n" 201 "#define DataKind_Int16Complex 1\n" 202 "#define DataKind_Float32 2\n" 203 "#define DataKind_Float32Complex 3\n" 204 "\n"), 205 s8_comp("" 206 "#define DecodeMode_None 0\n" 207 "#define DecodeMode_Hadamard 1\n" 208 "\n"), 209 s8_comp("" 210 "#define RCAOrientation_None 0\n" 211 "#define RCAOrientation_Rows 1\n" 212 "#define RCAOrientation_Columns 2\n" 213 "\n"), 214 s8_comp("" 215 "#define SamplingMode_2X 0\n" 216 "#define SamplingMode_4X 1\n" 217 "\n"), 218 s8_comp("" 219 "#define AcquisitionKind_FORCES 0\n" 220 "#define AcquisitionKind_UFORCES 1\n" 221 "#define AcquisitionKind_HERCULES 2\n" 222 "#define AcquisitionKind_RCA_VLS 3\n" 223 "#define AcquisitionKind_RCA_TPW 4\n" 224 "#define AcquisitionKind_UHERCULES 5\n" 225 "#define AcquisitionKind_RACES 6\n" 226 "#define AcquisitionKind_EPIC_FORCES 7\n" 227 "#define AcquisitionKind_EPIC_UFORCES 8\n" 228 "#define AcquisitionKind_EPIC_UHERCULES 9\n" 229 "#define AcquisitionKind_Flash 10\n" 230 "#define AcquisitionKind_HERO_PA 11\n" 231 "\n"), 232 s8_comp("" 233 "#define InterpolationMode_Nearest 0\n" 234 "#define InterpolationMode_Linear 1\n" 235 "#define InterpolationMode_Cubic 2\n" 236 "\n"), 237 }; 238 239 read_only global s8 *beamformer_shader_flag_strings[] = { 240 (s8 []){ 241 s8_comp("DilateOutput"), 242 }, 243 (s8 []){ 244 s8_comp("ComplexFilter"), 245 s8_comp("MapChannels"), 246 s8_comp("Demodulate"), 247 }, 248 (s8 []){ 249 s8_comp("Fast"), 250 s8_comp("Sparse"), 251 s8_comp("CoherencyWeighting"), 252 s8_comp("SingleFocus"), 253 s8_comp("SingleOrientation"), 254 }, 255 0, 256 0, 257 0, 258 }; 259 260 read_only global u8 beamformer_shader_flag_strings_count[] = { 261 1, 262 3, 263 5, 264 0, 265 0, 266 0, 267 }; 268 269 read_only global i32 *beamformer_shader_header_vectors[] = { 270 (i32 []){0, 1}, 271 (i32 []){0, 3}, 272 (i32 []){4, 0, 5, 2}, 273 0, 274 0, 275 0, 276 }; 277 278 read_only global i32 beamformer_shader_header_vector_lengths[] = { 279 2, 280 2, 281 4, 282 0, 283 0, 284 0, 285 }; 286 287 read_only global s8 *beamformer_shader_bake_parameter_names[] = { 288 (s8 []){ 289 s8_comp("DecodeMode"), 290 s8_comp("InputChannelStride"), 291 s8_comp("InputSampleStride"), 292 s8_comp("InputTransmitStride"), 293 s8_comp("OutputChannelStride"), 294 s8_comp("OutputSampleStride"), 295 s8_comp("OutputTransmitStride"), 296 s8_comp("TransmitCount"), 297 }, 298 (s8 []){ 299 s8_comp("DecimationRate"), 300 s8_comp("FilterLength"), 301 s8_comp("InputChannelStride"), 302 s8_comp("InputSampleStride"), 303 s8_comp("InputTransmitStride"), 304 s8_comp("OutputChannelStride"), 305 s8_comp("OutputSampleStride"), 306 s8_comp("OutputTransmitStride"), 307 s8_comp("SamplingMode"), 308 s8_comp("DemodulationFrequency"), 309 s8_comp("SamplingFrequency"), 310 }, 311 (s8 []){ 312 s8_comp("AcquisitionCount"), 313 s8_comp("AcquisitionKind"), 314 s8_comp("ChannelCount"), 315 s8_comp("InterpolationMode"), 316 s8_comp("SampleCount"), 317 s8_comp("TransmitReceiveOrientation"), 318 s8_comp("DemodulationFrequency"), 319 s8_comp("FNumber"), 320 s8_comp("FocusDepth"), 321 s8_comp("SamplingFrequency"), 322 s8_comp("SpeedOfSound"), 323 s8_comp("TimeOffset"), 324 s8_comp("TransmitAngle"), 325 }, 326 0, 327 0, 328 0, 329 }; 330 331 read_only global u8 *beamformer_shader_bake_parameter_is_float[] = { 332 (u8 []){0, 0, 0, 0, 0, 0, 0, 0}, 333 (u8 []){0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}, 334 (u8 []){0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1}, 335 0, 336 0, 337 0, 338 }; 339 340 read_only global i32 beamformer_shader_bake_parameter_counts[] = { 341 8, 342 11, 343 13, 344 0, 345 0, 346 0, 347 }; 348 349 read_only global u8 beamformer_acquisition_kind_has_fixed_transmits[] = { 350 1, 351 0, 352 1, 353 0, 354 0, 355 0, 356 1, 357 1, 358 0, 359 0, 360 0, 361 0, 362 }; 363 364 read_only global s8 beamformer_acquisition_kind_strings[] = { 365 s8_comp("FORCES"), 366 s8_comp("UFORCES"), 367 s8_comp("HERCULES"), 368 s8_comp("VLS"), 369 s8_comp("TPW"), 370 s8_comp("UHERCULES"), 371 s8_comp("RACES"), 372 s8_comp("EPIC-FORCES"), 373 s8_comp("EPIC-UFORCES"), 374 s8_comp("EPIC-UHERCULES"), 375 s8_comp("Flash"), 376 s8_comp("HERO-PA"), 377 }; 378 379 read_only global s8 beamformer_interpolation_mode_strings[] = { 380 s8_comp("Nearest"), 381 s8_comp("Linear"), 382 s8_comp("Cubic"), 383 }; 384