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