49 : m_red(channelColor.x)
50 , m_green(channelColor.y)
51 , m_blue(channelColor.z)
90 WaterfallToneMapArgs(uint32_t w, uint32_t h, uint32_t outwidth, uint32_t outheight, uint32_t o,
float x)
93 , m_outwidth(outwidth)
94 , m_outheight(outheight)
102 uint32_t m_outheight;
103 uint32_t m_offsetSamples;
111 float x, int32_t yo,
float y)
114 , m_outwidth(outwidth)
115 , m_outheight(outheight)
125 uint32_t m_outheight;
135 uint32_t windowHeight;
136 uint32_t windowWidth;
138 uint32_t offset_samples;
198 std::string GetName()
199 {
return m_stream.GetName(); }
204 std::shared_ptr<Texture> GetTexture()
207 void SetTexture(std::shared_ptr<Texture> tex)
233 std::shared_ptr<ComputePipeline> GetUniformAnalogPipeline()
237 std::string base =
"shaders/waveform-compute.";
239 if(ZeroHoldFlagSet())
240 suffix +=
".zerohold";
254 std::shared_ptr<ComputePipeline> GetHistogramPipeline()
258 std::string base =
"shaders/waveform-compute.";
273 std::shared_ptr<ComputePipeline> GetSparseAnalogPipeline()
277 std::string base =
"shaders/waveform-compute.";
279 int durationSSBOs = 0;
280 if(ZeroHoldFlagSet())
282 suffix +=
".zerohold";
298 std::shared_ptr<ComputePipeline> GetUniformDigitalPipeline()
302 std::string base =
"shaders/waveform-compute.";
317 std::shared_ptr<ComputePipeline> GetSparseDigitalPipeline()
321 std::string base =
"shaders/waveform-compute.";
323 int durationSSBOs = 0;
333 std::shared_ptr<ComputePipeline> GetToneMapPipeline()
336 bool ZeroHoldFlagSet()
338 return m_stream.GetFlags() & Stream::STREAM_DO_NOT_INTERPOLATE;
344 auto data = m_stream.GetData();
351 bool ShouldFillUnder()
352 {
return m_stream.GetFlags() & Stream::STREAM_FILL_UNDER; }
354 bool ZeroHoldCursorBehaviour()
356 return ZeroHoldFlagSet();
359 bool ShouldMapDurations()
361 return ZeroHoldFlagSet() && !IsDensePacked();
365 bool IsPersistenceEnabled()
368 void SetPersistenceEnabled(
bool b)
374 void SetYButtonPos(
float y)
377 float GetYButtonPos()
383 std::string m_colorRamp;
436 std::unique_ptr<vk::raii::CommandPool> m_utilCmdPool;
437 std::unique_ptr<vk::raii::CommandBuffer> m_utilCmdBuffer;
451 bool Render(
int iArea,
int numAreas, ImVec2 clientArea);
453 vk::raii::CommandBuffer& cmdbuf,
454 std::vector<std::shared_ptr<DisplayedChannel> >& channels,
455 bool clearPersistence);
459 size_t GetStreamCount()
465 std::shared_ptr<DisplayedChannel> GetDisplayedChannel(
size_t i)
476 void ClearPersistence();
491 void ChannelButton(std::shared_ptr<DisplayedChannel> chan,
size_t index);
493 void RenderGrid(ImVec2 start, ImVec2 size, std::map<float, float>& gridmap,
float& vbot,
float& vtop);
494 void RenderYAxis(ImVec2 size, std::map<float, float>& gridmap,
float vbot,
float vtop);
502 void RenderAnalogWaveform(std::shared_ptr<DisplayedChannel> channel, ImVec2 start, ImVec2 size);
503 void RenderEyeWaveform(std::shared_ptr<DisplayedChannel> channel, ImVec2 start, ImVec2 size);
510 void RenderComplexSignal(
512 int visleft,
int visright,
513 float xstart,
float xend,
float xoff,
514 float ybot,
float ymid,
float ytop,
517 void MakePathSignalBody(ImDrawList* list,
float xstart,
float xend,
float ybot,
float ymid,
float ytop);
519 void ToneMapEyeWaveform(std::shared_ptr<DisplayedChannel> channel, vk::raii::CommandBuffer& cmdbuf);
523 void RasterizeAnalogOrDigitalWaveform(
524 std::shared_ptr<DisplayedChannel> channel,
525 vk::raii::CommandBuffer& cmdbuf,
526 bool clearPersistence);
538 void EdgeDropArea(
const std::string& name, ImVec2 start, ImVec2 size, ImGuiDir splitDir);
540 void FilterMenu(std::shared_ptr<DisplayedChannel> chan);
543 float PixelsToYAxisUnits(
float pix);
544 float YAxisUnitsToPixels(
float volt);
545 float YAxisUnitsToYPosition(
float volt);
546 float YPositionToYAxisUnits(
float y);
547 float PickStepSize(
float volts_per_half_span,
int min_steps = 2,
int max_steps = 5);
588 DRAG_STATE_CHANNEL_LAST,
590 DRAG_STATE_TRIGGER_LEVEL,
591 DRAG_STATE_TRIGGER_SECONDARY_LEVEL,
592 DRAG_STATE_BER_LEVEL,
594 DRAG_STATE_PEAK_MARKER
663typedef std::pair<WaveformArea*, size_t> DragDescriptor;
Declaration of TextureManager.
Definition: WaveformArea.h:76
Context data for a single channel being displayed within a WaveformArea.
Definition: WaveformArea.h:190
std::shared_ptr< ComputePipeline > m_sparseAnalogComputePipeline
Compute pipeline for rendering sparse analog waveforms.
Definition: WaveformArea.h:425
size_t GetRasterizedY()
Return the Y axis size of the rasterized waveform.
Definition: WaveformArea.h:226
bool UpdateSize(ImVec2 newSize, MainWindow *top)
Handles a change in size of the displayed waveform.
Definition: WaveformArea.cpp:141
std::shared_ptr< ComputePipeline > m_histogramComputePipeline
Compute pipeline for rendering histogram waveforms.
Definition: WaveformArea.h:422
size_t m_rasterizedX
X axis size of rasterized waveform.
Definition: WaveformArea.h:398
Session & m_session
Parent session object.
Definition: WaveformArea.h:389
size_t GetRasterizedX()
Return the X axis size of the rasterized waveform.
Definition: WaveformArea.h:220
void PrepareToRasterize(size_t x, size_t y)
Prepares to rasterize the waveform at the specified resolution.
Definition: WaveformArea.cpp:290
bool m_persistenceEnabled
Persistence enable flag.
Definition: WaveformArea.h:413
__attribute__((noinline)) std
Gets the pipeline for drawing uniform analog waveforms, creating it if necessary.
Definition: WaveformArea.h:232
float m_yButtonPos
Y axis position of our button within the view.
Definition: WaveformArea.h:434
std::vector< PeakLabel > m_peakLabels
Active labels for peaks associated with the current waveform.
Definition: WaveformArea.h:381
size_t m_cachedX
X axis size of the texture as of last UpdateSize() call.
Definition: WaveformArea.h:407
std::shared_ptr< ComputePipeline > m_sparseDigitalComputePipeline
Compute pipeline for rendering sparse digital waveforms.
Definition: WaveformArea.h:431
std::shared_ptr< ComputePipeline > m_toneMapPipe
Compute pipeline for tone mapping fp32 images to RGBA.
Definition: WaveformArea.h:416
std::shared_ptr< ComputePipeline > m_uniformAnalogComputePipeline
Compute pipeline for rendering uniform analog waveforms.
Definition: WaveformArea.h:419
AcceleratorBuffer< float > m_rasterizedWaveform
Buffer storing our rasterized waveform, prior to tone mapping.
Definition: WaveformArea.h:392
size_t m_cachedY
Y axis size of the texture as of last UpdateSize() call.
Definition: WaveformArea.h:410
size_t m_rasterizedY
Y axis size of rasterized waveform.
Definition: WaveformArea.h:401
YAML::Node Serialize(IDTable &table) const
Serializes the configuration for this channel.
Definition: WaveformArea.cpp:316
AcceleratorBuffer< uint32_t > m_indexBuffer
Buffer for X axis indexes (only used for sparse waveforms)
Definition: WaveformArea.h:395
std::shared_ptr< Texture > m_texture
The texture storing our final rendered waveform.
Definition: WaveformArea.h:404
std::shared_ptr< ComputePipeline > m_uniformDigitalComputePipeline
Compute pipeline for rendering uniform digital waveforms.
Definition: WaveformArea.h:428
Definition: WaveformArea.h:64
Category
Category the filter should be displayed under in the GUI.
Definition: Filter.h:108
Bidirectional table mapping integer IDs in scopesession files to object pointers.
Definition: IDTable.h:49
Top level application window.
Definition: MainWindow.h:115
A single channel on an oscilloscope.
Definition: OscilloscopeChannel.h:49
A Session stores all of the instrument configuration and other state the user has open.
Definition: Session.h:95
Definition: WaveformArea.h:108
Descriptor for a single stream coming off a channel.
Definition: StreamDescriptor.h:46
A timestamp, measured in seconds + femtoseconds.
Definition: Marker.h:42
Abstract base class for oscilloscope / logic analyzer trigger inputs.
Definition: Trigger.h:46
A unit of measurement, plus conversion to pretty-printed output.
Definition: Unit.h:57
Definition: WaveformArea.h:88
bool g_hasShaderInt64
Indicates whether the int64 type is available for use in shaders and SSBOs.
Definition: VulkanInit.cpp:171
Definition: WaveformArea.h:133
State for a single peak label.
Definition: WaveformArea.h:154
int m_peakAlpha
Alpha decay. Decays by a small amount per frame after the peak disappears.
Definition: WaveformArea.h:180
float m_labelYpos
Y axis position of the label's centroid.
Definition: WaveformArea.h:159
int64_t m_labelXpos
X axis position of the label's centroid.
Definition: WaveformArea.h:156
float m_fwhm
Calculated FWHM of the peak.
Definition: WaveformArea.h:183
int64_t m_labelXsize
X axis size of the label (for collision detection)
Definition: WaveformArea.h:168
int64_t m_peakXpos
X axis position of the peak last refresh.
Definition: WaveformArea.h:162
int64_t m_labelYsize
Y axis size of the label (for collision detection)
Definition: WaveformArea.h:171
float m_peakYpos
Y axis position of the peak last refresh.
Definition: WaveformArea.h:165