beamformer.meta.c (22750B)
1 /* See LICENSE for license details. */ 2 3 // GENERATED CODE 4 5 // NOTE: Constants (Integer) 6 #define BeamformerChunkChannelCount (16) 7 #define BeamformerFilterSlots (4) 8 #define BeamformerMaxBacklogFrames (4096) 9 #define BeamformerMaxChannelCount (256) 10 #define BeamformerMaxEmissionsCount (256) 11 #define BeamformerMaxComputeShaderStages (16) 12 #define BeamformerMaxParameterBlocks (16) 13 #define BeamformerMaxRawDataFramesInFlight (3) 14 15 // NOTE: Constants (Float) 16 17 typedef enum { 18 BeamformerShaderResourceKind_Buffer = 0, 19 BeamformerShaderResourceKind_Count, 20 } BeamformerShaderResourceKind; 21 22 typedef enum { 23 BeamformerShaderBufferSlot_BeamformedData = 0, 24 BeamformerShaderBufferSlot_PingPong = 1, 25 BeamformerShaderBufferSlot_Count, 26 } BeamformerShaderBufferSlot; 27 28 typedef enum { 29 BeamformerDecodeMode_None = 0, 30 BeamformerDecodeMode_Hadamard = 1, 31 BeamformerDecodeMode_Count, 32 } BeamformerDecodeMode; 33 34 typedef enum { 35 BeamformerRCAOrientation_None = 0, 36 BeamformerRCAOrientation_Rows = 1, 37 BeamformerRCAOrientation_Columns = 2, 38 BeamformerRCAOrientation_Count, 39 } BeamformerRCAOrientation; 40 41 typedef enum { 42 BeamformerSamplingMode_2X = 0, 43 BeamformerSamplingMode_4X = 1, 44 BeamformerSamplingMode_Count, 45 } BeamformerSamplingMode; 46 47 typedef enum { 48 BeamformerDataKind_Int16 = 0, 49 BeamformerDataKind_Int16Complex = 1, 50 BeamformerDataKind_Float32 = 2, 51 BeamformerDataKind_Float32Complex = 3, 52 BeamformerDataKind_Float16 = 4, 53 BeamformerDataKind_Float16Complex = 5, 54 BeamformerDataKind_Count, 55 } BeamformerDataKind; 56 57 typedef enum { 58 BeamformerContrastMode_None = 0, 59 BeamformerContrastMode_A1S2 = 1, 60 BeamformerContrastMode_Count, 61 } BeamformerContrastMode; 62 63 typedef enum { 64 BeamformerEmissionKind_Sine = 0, 65 BeamformerEmissionKind_Chirp = 1, 66 BeamformerEmissionKind_Count, 67 } BeamformerEmissionKind; 68 69 typedef enum { 70 BeamformerInterpolationMode_Nearest = 0, 71 BeamformerInterpolationMode_Linear = 1, 72 BeamformerInterpolationMode_Cubic = 2, 73 BeamformerInterpolationMode_Count, 74 } BeamformerInterpolationMode; 75 76 typedef enum { 77 BeamformerFilterKind_Kaiser = 0, 78 BeamformerFilterKind_MatchedChirp = 1, 79 BeamformerFilterKind_Count, 80 } BeamformerFilterKind; 81 82 typedef enum { 83 BeamformerAcquisitionKind_FORCES = 0, 84 BeamformerAcquisitionKind_UFORCES = 1, 85 BeamformerAcquisitionKind_HERCULES = 2, 86 BeamformerAcquisitionKind_RCA_VLS = 3, 87 BeamformerAcquisitionKind_RCA_TPW = 4, 88 BeamformerAcquisitionKind_UHERCULES = 5, 89 BeamformerAcquisitionKind_RACES = 6, 90 BeamformerAcquisitionKind_EPIC_FORCES = 7, 91 BeamformerAcquisitionKind_EPIC_UFORCES = 8, 92 BeamformerAcquisitionKind_EPIC_UHERCULES = 9, 93 BeamformerAcquisitionKind_Flash = 10, 94 BeamformerAcquisitionKind_HERO_PA = 11, 95 BeamformerAcquisitionKind_ULM = 12, 96 BeamformerAcquisitionKind_Count, 97 } BeamformerAcquisitionKind; 98 99 typedef enum { 100 BeamformerShaderKind_Decode = 0, 101 BeamformerShaderKind_Filter = 1, 102 BeamformerShaderKind_Demodulate = 2, 103 BeamformerShaderKind_DAS = 3, 104 BeamformerShaderKind_Sum = 4, 105 BeamformerShaderKind_MinMax = 5, 106 BeamformerShaderKind_Hilbert = 6, 107 BeamformerShaderKind_CoherencyWeighting = 7, 108 BeamformerShaderKind_Reshape = 8, 109 BeamformerShaderKind_BufferClear = 9, 110 BeamformerShaderKind_RenderBeamformed = 10, 111 BeamformerShaderKind_Count, 112 113 BeamformerShaderKind_ComputeFirst = BeamformerShaderKind_Decode, 114 BeamformerShaderKind_ComputeLast = BeamformerShaderKind_Hilbert, 115 BeamformerShaderKind_ComputeCount = 7, 116 BeamformerShaderKind_ComputeHelpersFirst = BeamformerShaderKind_CoherencyWeighting, 117 BeamformerShaderKind_ComputeHelpersLast = BeamformerShaderKind_Reshape, 118 BeamformerShaderKind_ComputeHelpersCount = 2, 119 BeamformerShaderKind_ComputeInternalFirst = BeamformerShaderKind_BufferClear, 120 BeamformerShaderKind_ComputeInternalLast = BeamformerShaderKind_BufferClear, 121 BeamformerShaderKind_ComputeInternalCount = 1, 122 BeamformerShaderKind_RenderFirst = BeamformerShaderKind_RenderBeamformed, 123 BeamformerShaderKind_RenderLast = BeamformerShaderKind_RenderBeamformed, 124 BeamformerShaderKind_RenderCount = 1, 125 } BeamformerShaderKind; 126 127 typedef struct { 128 b32 use_shared_memory; 129 u32 decode_mode; 130 u32 output_channel_stride; 131 u32 output_sample_stride; 132 u32 output_transmit_stride; 133 u32 to_process; 134 u32 transmit_count; 135 u32 chunk_channel_count; 136 b32 cooperative_matrix; 137 u32 cooperative_matrix_m; 138 u32 cooperative_matrix_n; 139 u32 cooperative_matrix_k; 140 } BeamformerDecodeBakeParameters; 141 142 typedef struct { 143 u32 demodulate; 144 u32 complex_filter; 145 u32 decimation_rate; 146 u32 filter_length; 147 u32 input_channel_stride; 148 u32 input_sample_stride; 149 u32 input_transmit_stride; 150 u32 output_channel_stride; 151 u32 output_sample_stride; 152 u32 output_transmit_stride; 153 u32 sample_count; 154 u32 batch_sample_count; 155 f32 demodulation_frequency; 156 f32 sampling_frequency; 157 } BeamformerFilterBakeParameters; 158 159 typedef struct { 160 u32 coherency_weighting; 161 u32 single_focus; 162 u32 single_orientation; 163 u32 sparse; 164 u32 acquisition_count; 165 u32 acquisition_kind; 166 u32 channel_count; 167 u32 chunk_channel_count; 168 u32 interpolation_mode; 169 u32 sample_count; 170 u32 transmit_receive_orientation; 171 f32 demodulation_frequency; 172 f32 f_number; 173 f32 focus_depth; 174 f32 sampling_frequency; 175 f32 speed_of_sound; 176 f32 time_offset; 177 f32 transmit_angle; 178 } BeamformerDASBakeParameters; 179 180 typedef struct { 181 u32 size_x; 182 u32 size_y; 183 u32 size_z; 184 u32 input_stride_x; 185 u32 input_stride_y; 186 u32 input_stride_z; 187 u32 output_stride_x; 188 u32 output_stride_y; 189 u32 output_stride_z; 190 b32 interleave; 191 b32 deinterleave; 192 } BeamformerReshapeBakeParameters; 193 194 typedef struct { 195 u64 hadamard_buffer; 196 u64 rf_buffer; 197 u64 output_buffer; 198 } BeamformerDecodePushConstants; 199 200 typedef struct { 201 u64 input_data; 202 u64 filter_coefficients; 203 u32 output_element_offset; 204 } BeamformerFilterPushConstants; 205 206 typedef struct { 207 m4 xdc_transform; 208 m4 voxel_transform; 209 v2 xdc_element_pitch; 210 u64 array_parameters; 211 u64 output_frame; 212 u64 incoherent_frame; 213 u32 rf_element_offset; 214 u32 output_size_x; 215 u32 output_size_y; 216 u32 output_size_z; 217 u32 cycle_t; 218 i32 channel_offset; 219 } BeamformerDASPushConstants; 220 221 typedef struct { 222 u64 output_data; 223 u64 input_data; 224 u32 image_elements; 225 f32 scale; 226 } BeamformerSumPushConstants; 227 228 typedef struct { 229 u64 left_side_buffer; 230 u64 right_side_buffer; 231 f32 scale; 232 u32 output_size_x; 233 u32 output_size_y; 234 u32 output_size_z; 235 } BeamformerCoherencyWeightingPushConstants; 236 237 typedef struct { 238 u64 output_buffer; 239 u64 left_input_buffer; 240 u64 right_input_buffer; 241 } BeamformerReshapePushConstants; 242 243 typedef struct { 244 uv4 clear_v4; 245 u64 data; 246 u32 bins; 247 } BeamformerBufferClearPushConstants; 248 249 typedef struct { 250 m4 mvp_matrix; 251 u64 positions; 252 u64 normals; 253 v4 bounding_box_colour; 254 f32 bounding_box_fraction; 255 f32 db_cutoff; 256 f32 threshold; 257 f32 gamma; 258 u64 input_data; 259 u32 input_size_x; 260 u32 input_size_y; 261 u32 input_size_z; 262 u32 data_kind; 263 } BeamformerRenderBeamformedPushConstants; 264 265 typedef struct { 266 f32 cycles; 267 f32 frequency; 268 } BeamformerSineParameters; 269 270 typedef struct { 271 f32 duration; 272 f32 min_frequency; 273 f32 max_frequency; 274 } BeamformerChirpParameters; 275 276 typedef struct { 277 BeamformerEmissionKind kind; 278 union { 279 BeamformerSineParameters sine; 280 BeamformerChirpParameters chirp; 281 }; 282 } BeamformerEmissionParameters; 283 284 typedef struct { 285 f32 cutoff_frequency; 286 f32 beta; 287 u32 length; 288 } BeamformerKaiserFilterParameters; 289 290 typedef struct { 291 f32 duration; 292 f32 min_frequency; 293 f32 max_frequency; 294 } BeamformerMatchedChirpFilterParameters; 295 296 typedef struct { 297 BeamformerFilterKind kind; 298 f32 sampling_frequency; 299 b32 complex; 300 union { 301 BeamformerKaiserFilterParameters kaiser; 302 BeamformerMatchedChirpFilterParameters matched_chirp; 303 }; 304 } BeamformerFilterParameters; 305 306 typedef struct { 307 m4 das_voxel_transform; 308 m4 xdc_transform; 309 v2 xdc_element_pitch; 310 uv2 raw_data_dimensions; 311 v2 focal_vector; 312 u32 transmit_receive_orientation; 313 u32 sample_count; 314 u32 channel_count; 315 u32 acquisition_count; 316 BeamformerAcquisitionKind acquisition_kind; 317 BeamformerDecodeMode decode_mode; 318 BeamformerSamplingMode sampling_mode; 319 f32 time_offset; 320 b32 single_focus; 321 b32 single_orientation; 322 } BeamformerParametersHead; 323 324 typedef struct { 325 iv4 output_points; 326 f32 sampling_frequency; 327 f32 demodulation_frequency; 328 f32 speed_of_sound; 329 f32 f_number; 330 BeamformerInterpolationMode interpolation_mode; 331 b32 coherency_weighting; 332 u32 decimation_rate; 333 } BeamformerUIParameters; 334 335 typedef struct { 336 BeamformerContrastMode contrast_mode; 337 BeamformerEmissionParameters emission_parameters; 338 } BeamformerExtraParameters; 339 340 typedef struct { 341 m4 das_voxel_transform; 342 m4 xdc_transform; 343 v2 xdc_element_pitch; 344 uv2 raw_data_dimensions; 345 v2 focal_vector; 346 u32 transmit_receive_orientation; 347 u32 sample_count; 348 u32 channel_count; 349 u32 acquisition_count; 350 BeamformerAcquisitionKind acquisition_kind; 351 BeamformerDecodeMode decode_mode; 352 BeamformerSamplingMode sampling_mode; 353 f32 time_offset; 354 b32 single_focus; 355 b32 single_orientation; 356 iv4 output_points; 357 f32 sampling_frequency; 358 f32 demodulation_frequency; 359 f32 speed_of_sound; 360 f32 f_number; 361 BeamformerInterpolationMode interpolation_mode; 362 b32 coherency_weighting; 363 u32 decimation_rate; 364 BeamformerContrastMode contrast_mode; 365 BeamformerEmissionParameters emission_parameters; 366 } BeamformerParameters; 367 368 typedef struct { 369 m4 das_voxel_transform; 370 m4 xdc_transform; 371 v2 xdc_element_pitch; 372 uv2 raw_data_dimensions; 373 v2 focal_vector; 374 u32 transmit_receive_orientation; 375 u32 sample_count; 376 u32 channel_count; 377 u32 acquisition_count; 378 BeamformerAcquisitionKind acquisition_kind; 379 BeamformerDecodeMode decode_mode; 380 BeamformerSamplingMode sampling_mode; 381 f32 time_offset; 382 b32 single_focus; 383 b32 single_orientation; 384 iv4 output_points; 385 f32 sampling_frequency; 386 f32 demodulation_frequency; 387 f32 speed_of_sound; 388 f32 f_number; 389 BeamformerInterpolationMode interpolation_mode; 390 b32 coherency_weighting; 391 u32 decimation_rate; 392 BeamformerContrastMode contrast_mode; 393 BeamformerEmissionParameters emission_parameters; 394 i16 channel_mapping[BeamformerMaxChannelCount]; 395 i16 sparse_elements[BeamformerMaxEmissionsCount]; 396 u8 transmit_receive_orientations[BeamformerMaxEmissionsCount]; 397 f32 steering_angles[BeamformerMaxEmissionsCount]; 398 f32 focal_depths[BeamformerMaxEmissionsCount]; 399 i32 compute_stages[BeamformerMaxComputeShaderStages]; 400 i32 compute_stage_parameters[BeamformerMaxComputeShaderStages]; 401 u32 compute_stages_count; 402 BeamformerDataKind data_kind; 403 } BeamformerSimpleParameters; 404 405 typedef struct { 406 v2 focal_vectors[BeamformerMaxChannelCount]; 407 i16 sparse_elements[BeamformerMaxChannelCount]; 408 u16 transmit_receive_orientations[BeamformerMaxChannelCount]; 409 } BeamformerDASArrayParameters; 410 411 typedef union { 412 BeamformerDecodeBakeParameters Decode; 413 BeamformerFilterBakeParameters Filter; 414 BeamformerDASBakeParameters DAS; 415 BeamformerReshapeBakeParameters Reshape; 416 } BeamformerShaderBakeParameters; 417 418 read_only global u8 beamformer_data_kind_element_size[] = { 419 2, 420 2, 421 4, 422 4, 423 2, 424 2, 425 }; 426 427 read_only global u8 beamformer_data_kind_element_count[] = { 428 1, 429 2, 430 1, 431 2, 432 1, 433 2, 434 }; 435 436 read_only global u8 beamformer_data_kind_byte_size[] = { 437 2 * 1, 438 2 * 2, 439 4 * 1, 440 4 * 2, 441 2 * 1, 442 2 * 2, 443 }; 444 445 read_only global b8 beamformer_data_kind_complex[] = { 446 0, 447 1, 448 0, 449 1, 450 0, 451 1, 452 }; 453 454 read_only global s8 beamformer_data_kind_glsl_type[] = { 455 s8_comp("int16_t"), 456 s8_comp("i16vec2"), 457 s8_comp("float32_t"), 458 s8_comp("f32vec2"), 459 s8_comp("float16_t"), 460 s8_comp("f16vec2"), 461 }; 462 463 read_only global s8 beamformer_data_kind_s8[] = { 464 s8_comp("Int16"), 465 s8_comp("Int16Complex"), 466 s8_comp("Float32"), 467 s8_comp("Float32Complex"), 468 s8_comp("Float16"), 469 s8_comp("Float16Complex"), 470 }; 471 472 read_only global u8 beamformer_contrast_mode_samples[] = { 473 1, 474 3, 475 }; 476 477 read_only global u8 beamformer_acquisition_kind_has_fixed_transmits[] = { 478 1, 479 0, 480 1, 481 0, 482 0, 483 0, 484 1, 485 1, 486 0, 487 0, 488 0, 489 0, 490 0, 491 }; 492 493 read_only global s8 beamformer_acquisition_kind_strings[] = { 494 s8_comp("FORCES"), 495 s8_comp("UFORCES"), 496 s8_comp("HERCULES"), 497 s8_comp("VLS"), 498 s8_comp("TPW"), 499 s8_comp("UHERCULES"), 500 s8_comp("RACES"), 501 s8_comp("EPIC-FORCES"), 502 s8_comp("EPIC-UFORCES"), 503 s8_comp("EPIC-UHERCULES"), 504 s8_comp("Flash"), 505 s8_comp("HERO-PA"), 506 s8_comp("ULM"), 507 }; 508 509 read_only global s8 beamformer_filter_kind_strings[] = { 510 s8_comp("Kaiser"), 511 s8_comp("MatchedChirp"), 512 }; 513 514 read_only global s8 beamformer_interpolation_mode_strings[] = { 515 s8_comp("Nearest"), 516 s8_comp("Linear"), 517 s8_comp("Cubic"), 518 }; 519 520 read_only global s8 beamformer_shader_resource_kind_strings[] = { 521 s8_comp("Buffer"), 522 }; 523 524 read_only global s8 game_shader_buffer_slot_strings[] = { 525 s8_comp("BeamformedData"), 526 s8_comp("PingPong"), 527 }; 528 529 read_only global s8 beamformer_shader_names[] = { 530 s8_comp("Decode"), 531 s8_comp("Filter"), 532 s8_comp("Demodulate"), 533 s8_comp("DAS"), 534 s8_comp("Sum"), 535 s8_comp("MinMax"), 536 s8_comp("Hilbert"), 537 s8_comp("CoherencyWeighting"), 538 s8_comp("Reshape"), 539 s8_comp("BufferClear"), 540 s8_comp("RenderBeamformed"), 541 }; 542 543 read_only global BeamformerShaderKind beamformer_reloadable_shader_kinds[] = { 544 BeamformerShaderKind_Decode, 545 BeamformerShaderKind_Filter, 546 BeamformerShaderKind_DAS, 547 BeamformerShaderKind_Sum, 548 BeamformerShaderKind_MinMax, 549 BeamformerShaderKind_CoherencyWeighting, 550 BeamformerShaderKind_Reshape, 551 BeamformerShaderKind_BufferClear, 552 BeamformerShaderKind_RenderBeamformed, 553 }; 554 555 read_only global s8 *beamformer_reloadable_shader_files[] = { 556 (s8 []){s8_comp("decode.glsl")}, 557 (s8 []){s8_comp("filter.glsl")}, 558 (s8 []){s8_comp("das.glsl")}, 559 (s8 []){s8_comp("sum.glsl")}, 560 (s8 []){s8_comp("min_max.glsl")}, 561 (s8 []){s8_comp("coherency_weighting.glsl")}, 562 (s8 []){s8_comp("reshape.glsl")}, 563 (s8 []){s8_comp("buffer_clear.glsl")}, 564 (s8 []){s8_comp("render_3d.vert.glsl"), s8_comp("render_3d.frag.glsl")}, 565 }; 566 567 read_only global i32 beamformer_shader_reloadable_index_by_shader[] = { 568 0, 569 1, 570 1, 571 2, 572 3, 573 4, 574 -1, 575 5, 576 6, 577 7, 578 8, 579 }; 580 581 read_only global i32 beamformer_reloadable_compute_shader_info_indices[] = { 582 0, 583 1, 584 2, 585 3, 586 4, 587 }; 588 589 read_only global i32 beamformer_reloadable_compute_helpers_shader_info_indices[] = { 590 5, 591 6, 592 }; 593 594 read_only global i32 beamformer_reloadable_compute_internal_shader_info_indices[] = { 595 7, 596 }; 597 598 read_only global i32 beamformer_reloadable_render_shader_info_indices[] = { 599 8, 600 }; 601 602 read_only global s8 beamformer_shader_global_header_strings[] = { 603 s8_comp("" 604 "#define DecodeMode_None 0\n" 605 "#define DecodeMode_Hadamard 1\n" 606 "\n"), 607 s8_comp("" 608 "layout(push_constant, std430) uniform PushConstants {\n" 609 " uint64_t hadamard_buffer;\n" 610 " uint64_t rf_buffer;\n" 611 " uint64_t output_buffer;\n" 612 "};\n" 613 "\n"), 614 s8_comp("" 615 "#define ShaderBufferSlot_BeamformedData 0\n" 616 "#define ShaderBufferSlot_PingPong 1\n" 617 "\n"), 618 s8_comp("" 619 "#define ShaderResourceKind_Buffer 0\n" 620 "\n"), 621 s8_comp("" 622 "layout(push_constant, std430) uniform PushConstants {\n" 623 " uint64_t input_data;\n" 624 " uint64_t filter_coefficients;\n" 625 " uint32_t output_element_offset;\n" 626 "};\n" 627 "\n"), 628 s8_comp("#define MaxChannelCount (256)\n\n"), 629 s8_comp("" 630 "#define AcquisitionKind_FORCES 0\n" 631 "#define AcquisitionKind_UFORCES 1\n" 632 "#define AcquisitionKind_HERCULES 2\n" 633 "#define AcquisitionKind_RCA_VLS 3\n" 634 "#define AcquisitionKind_RCA_TPW 4\n" 635 "#define AcquisitionKind_UHERCULES 5\n" 636 "#define AcquisitionKind_RACES 6\n" 637 "#define AcquisitionKind_EPIC_FORCES 7\n" 638 "#define AcquisitionKind_EPIC_UFORCES 8\n" 639 "#define AcquisitionKind_EPIC_UHERCULES 9\n" 640 "#define AcquisitionKind_Flash 10\n" 641 "#define AcquisitionKind_HERO_PA 11\n" 642 "#define AcquisitionKind_ULM 12\n" 643 "\n"), 644 s8_comp("" 645 "#define InterpolationMode_Nearest 0\n" 646 "#define InterpolationMode_Linear 1\n" 647 "#define InterpolationMode_Cubic 2\n" 648 "\n"), 649 s8_comp("" 650 "#define RCAOrientation_None 0\n" 651 "#define RCAOrientation_Rows 1\n" 652 "#define RCAOrientation_Columns 2\n" 653 "\n"), 654 s8_comp("" 655 "struct DASArrayParameters {\n" 656 " f32vec2 focal_vectors[MaxChannelCount];\n" 657 " int16_t sparse_elements[MaxChannelCount];\n" 658 " uint16_t transmit_receive_orientations[MaxChannelCount];\n" 659 "};\n" 660 "\n"), 661 s8_comp("" 662 "layout(push_constant, std430) uniform PushConstants {\n" 663 " f32mat4 xdc_transform;\n" 664 " f32mat4 voxel_transform;\n" 665 " f32vec2 xdc_element_pitch;\n" 666 " uint64_t array_parameters;\n" 667 " uint64_t output_frame;\n" 668 " uint64_t incoherent_frame;\n" 669 " uint32_t rf_element_offset;\n" 670 " uint32_t output_size_x;\n" 671 " uint32_t output_size_y;\n" 672 " uint32_t output_size_z;\n" 673 " uint32_t cycle_t;\n" 674 " int32_t channel_offset;\n" 675 "};\n" 676 "\n"), 677 s8_comp("" 678 "layout(push_constant, std430) uniform PushConstants {\n" 679 " uint64_t output_data;\n" 680 " uint64_t input_data;\n" 681 " uint32_t image_elements;\n" 682 " float32_t scale;\n" 683 "};\n" 684 "\n"), 685 s8_comp("" 686 "layout(push_constant, std430) uniform PushConstants {\n" 687 " uint64_t left_side_buffer;\n" 688 " uint64_t right_side_buffer;\n" 689 " float32_t scale;\n" 690 " uint32_t output_size_x;\n" 691 " uint32_t output_size_y;\n" 692 " uint32_t output_size_z;\n" 693 "};\n" 694 "\n"), 695 s8_comp("" 696 "layout(push_constant, std430) uniform PushConstants {\n" 697 " uint64_t output_buffer;\n" 698 " uint64_t left_input_buffer;\n" 699 " uint64_t right_input_buffer;\n" 700 "};\n" 701 "\n"), 702 s8_comp("" 703 "layout(push_constant, std430) uniform PushConstants {\n" 704 " u32vec4 clear_v4;\n" 705 " uint64_t data;\n" 706 " uint32_t bins;\n" 707 "};\n" 708 "\n"), 709 s8_comp("" 710 "layout(push_constant, std430) uniform PushConstants {\n" 711 " f32mat4 mvp_matrix;\n" 712 " uint64_t positions;\n" 713 " uint64_t normals;\n" 714 " f32vec4 bounding_box_colour;\n" 715 " float32_t bounding_box_fraction;\n" 716 " float32_t db_cutoff;\n" 717 " float32_t threshold;\n" 718 " float32_t gamma;\n" 719 " uint64_t input_data;\n" 720 " uint32_t input_size_x;\n" 721 " uint32_t input_size_y;\n" 722 " uint32_t input_size_z;\n" 723 " uint32_t data_kind;\n" 724 "};\n" 725 "\n"), 726 }; 727 728 read_only global b8 beamformer_shader_has_primitive[] = { 729 0, 730 0, 731 0, 732 0, 733 0, 734 0, 735 0, 736 0, 737 1, 738 }; 739 740 read_only global b8 beamformer_shader_primitive_is_vertex[] = { 741 0, 742 0, 743 0, 744 0, 745 0, 746 0, 747 0, 748 0, 749 1, 750 }; 751 752 read_only global i32 *beamformer_shader_header_vectors[] = { 753 (i32 []){0, 1}, 754 (i32 []){2, 3, 4}, 755 (i32 []){5, 6, 7, 8, 2, 3, 9, 10}, 756 (i32 []){11}, 757 0, 758 (i32 []){12}, 759 (i32 []){13}, 760 (i32 []){14}, 761 (i32 []){15}, 762 }; 763 764 read_only global i32 beamformer_shader_header_vector_lengths[] = { 765 2, 766 3, 767 8, 768 1, 769 0, 770 1, 771 1, 772 1, 773 1, 774 }; 775 776 read_only global s8 *beamformer_shader_bake_parameter_names[] = { 777 (s8 []){ 778 s8_comp("UseSharedMemory"), 779 s8_comp("DecodeMode"), 780 s8_comp("OutputChannelStride"), 781 s8_comp("OutputSampleStride"), 782 s8_comp("OutputTransmitStride"), 783 s8_comp("ToProcess"), 784 s8_comp("TransmitCount"), 785 s8_comp("ChunkChannelCount"), 786 s8_comp("CooperativeMatrix"), 787 s8_comp("CooperativeMatrixM"), 788 s8_comp("CooperativeMatrixN"), 789 s8_comp("CooperativeMatrixK"), 790 }, 791 (s8 []){ 792 s8_comp("Demodulate"), 793 s8_comp("ComplexFilter"), 794 s8_comp("DecimationRate"), 795 s8_comp("FilterLength"), 796 s8_comp("InputChannelStride"), 797 s8_comp("InputSampleStride"), 798 s8_comp("InputTransmitStride"), 799 s8_comp("OutputChannelStride"), 800 s8_comp("OutputSampleStride"), 801 s8_comp("OutputTransmitStride"), 802 s8_comp("SampleCount"), 803 s8_comp("BatchSampleCount"), 804 s8_comp("DemodulationFrequency"), 805 s8_comp("SamplingFrequency"), 806 }, 807 (s8 []){ 808 s8_comp("CoherencyWeighting"), 809 s8_comp("SingleFocus"), 810 s8_comp("SingleOrientation"), 811 s8_comp("Sparse"), 812 s8_comp("AcquisitionCount"), 813 s8_comp("AcquisitionKind"), 814 s8_comp("ChannelCount"), 815 s8_comp("ChunkChannelCount"), 816 s8_comp("InterpolationMode"), 817 s8_comp("SampleCount"), 818 s8_comp("TransmitReceiveOrientation"), 819 s8_comp("DemodulationFrequency"), 820 s8_comp("FNumber"), 821 s8_comp("FocusDepth"), 822 s8_comp("SamplingFrequency"), 823 s8_comp("SpeedOfSound"), 824 s8_comp("TimeOffset"), 825 s8_comp("TransmitAngle"), 826 }, 827 0, 828 0, 829 0, 830 (s8 []){ 831 s8_comp("SizeX"), 832 s8_comp("SizeY"), 833 s8_comp("SizeZ"), 834 s8_comp("InputStrideX"), 835 s8_comp("InputStrideY"), 836 s8_comp("InputStrideZ"), 837 s8_comp("OutputStrideX"), 838 s8_comp("OutputStrideY"), 839 s8_comp("OutputStrideZ"), 840 s8_comp("Interleave"), 841 s8_comp("Deinterleave"), 842 }, 843 0, 844 0, 845 }; 846 847 read_only global u32 beamformer_shader_bake_parameter_float_bits[] = { 848 0x00000000UL, 849 0x00003000UL, 850 0x0003f800UL, 851 0x00000000UL, 852 0x00000000UL, 853 0x00000000UL, 854 0x00000000UL, 855 0x00000000UL, 856 0x00000000UL, 857 }; 858 859 read_only global u8 beamformer_shader_bake_parameter_counts[] = { 860 12, 861 14, 862 18, 863 0, 864 0, 865 0, 866 11, 867 0, 868 0, 869 }; 870 871 read_only global u8 beamformer_shader_push_constant_sizes[] = { 872 sizeof(BeamformerDecodePushConstants), 873 sizeof(BeamformerFilterPushConstants), 874 sizeof(BeamformerDASPushConstants), 875 sizeof(BeamformerSumPushConstants), 876 0, 877 sizeof(BeamformerCoherencyWeightingPushConstants), 878 sizeof(BeamformerReshapePushConstants), 879 sizeof(BeamformerBufferClearPushConstants), 880 sizeof(BeamformerRenderBeamformedPushConstants), 881 }; 882