beamformer_parameters.h (2660B)
1 /* See LICENSE for license details. */ 2 3 /* TODO(rnp): 4 * [ ]: shader kinds have ballooned; shader stats table needs to be compressed 5 * [ ]: Upload previously exported data for display. maybe this is a UI thing but doing it 6 * programatically would be nice. 7 * [ ]: Add interface for multi frame upload. RF upload already uses an offset into SM so 8 * that part works fine. We just need a way of specify a multi frame upload. (Data must 9 * be organized for simple offset access per frame). 10 */ 11 12 typedef struct { 13 /* NOTE(rnp): this wants to be iterated on both dimensions. it depends entirely on which 14 * visualization method you want to use. the coalescing function wants both directions */ 15 float times[32][BeamformerShaderKind_ComputeCount]; 16 float rf_time_deltas[32]; 17 } BeamformerComputeStatsTable; 18 19 /* X(type, id, pretty name) */ 20 #define BEAMFORMER_VIEW_PLANE_TAG_LIST \ 21 X(XZ, 0, "XZ") \ 22 X(YZ, 1, "YZ") \ 23 X(XY, 2, "XY") \ 24 X(Arbitrary, 3, "Arbitrary") 25 26 typedef enum { 27 #define X(type, id, pretty) BeamformerViewPlaneTag_##type = id, 28 BEAMFORMER_VIEW_PLANE_TAG_LIST 29 #undef X 30 BeamformerViewPlaneTag_Count, 31 } BeamformerViewPlaneTag; 32 33 #define BEAMFORMER_CONSTANTS_LIST \ 34 X(FilterSlots, 4) \ 35 X(MaxChannelCount, 256) \ 36 X(MaxComputeShaderStages, 16) \ 37 X(MaxParameterBlockSlots, 16) \ 38 X(MaxRawDataFramesInFlight, 3) \ 39 X(MaxSavedFrames, 16) 40 #define X(k, v, ...) Beamformer##k = v, 41 typedef enum {BEAMFORMER_CONSTANTS_LIST} BeamformerConstants; 42 #undef X 43 44 #define BEAMFORMER_LIVE_IMAGING_DIRTY_FLAG_LIST \ 45 X(ImagePlaneOffsets, 0) \ 46 X(TransmitPower, 1) \ 47 X(TGCControlPoints, 2) \ 48 X(SaveData, 3) \ 49 X(SaveNameTag, 4) \ 50 X(StopImaging, 5) 51 /* NOTE(rnp): if this exceeds 32 you need to fix the flag handling code */ 52 53 #define BEAMFORMER_LIVE_IMAGING_PARAMETERS_LIST \ 54 X(active, uint32_t, , 1) \ 55 X(save_enabled, uint32_t, , 1) \ 56 X(save_active, uint32_t, , 1) \ 57 X(transmit_power, float, , 1) \ 58 X(image_plane_offsets, float, [BeamformerViewPlaneTag_Count], BeamformerViewPlaneTag_Count) \ 59 X(tgc_control_points, float, [8], 8) \ 60 X(save_name_tag_length, int32_t, , 1) \ 61 X(save_name_tag, char, [128], 128) 62 63 #define X(name, type, size, ...) type name size; 64 typedef struct {BEAMFORMER_LIVE_IMAGING_PARAMETERS_LIST} BeamformerLiveImagingParameters; 65 #undef X