Skip to content

Commit

Permalink
Updates for EyePattern::Refresh signature changes
Browse files Browse the repository at this point in the history
  • Loading branch information
azonenberg committed Oct 8, 2024
1 parent 1d4dd7e commit fd3974e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib
Submodule lib updated 44 files
+20 −4 scopehal/DemoOscilloscope.cpp
+7 −0 scopehal/EyeWaveform.h
+18 −0 scopehal/InstrumentChannel.cpp
+26 −0 scopehal/InstrumentChannel.h
+13 −1 scopehal/LeCroyOscilloscope.cpp
+1 −0 scopehal/LeCroyOscilloscope.h
+32 −0 scopehal/Multimeter.cpp
+14 −9 scopehal/Multimeter.h
+25 −0 scopehal/Oscilloscope.cpp
+9 −0 scopehal/Oscilloscope.h
+18 −0 scopehal/OscilloscopeChannel.cpp
+11 −0 scopehal/OscilloscopeChannel.h
+16 −2 scopehal/RSRTO6Oscilloscope.cpp
+1 −0 scopehal/RSRTO6Oscilloscope.h
+21 −2 scopehal/RigolOscilloscope.cpp
+1 −1 scopehal/SCPILinuxGPIBTransport.cpp
+1 −1 scopehal/SCPILinuxGPIBTransport.h
+1 −1 scopehal/SCPILxiTransport.cpp
+1 −1 scopehal/SCPILxiTransport.h
+1 −1 scopehal/SCPINullTransport.cpp
+1 −1 scopehal/SCPINullTransport.h
+1 −1 scopehal/SCPISocketCANTransport.cpp
+1 −1 scopehal/SCPISocketCANTransport.h
+24 −4 scopehal/SCPISocketTransport.cpp
+1 −1 scopehal/SCPISocketTransport.h
+1 −1 scopehal/SCPITMCTransport.cpp
+1 −1 scopehal/SCPITMCTransport.h
+1 −1 scopehal/SCPITransport.h
+1 −1 scopehal/SCPITwinLanTransport.cpp
+1 −1 scopehal/SCPITwinLanTransport.h
+1 −1 scopehal/SCPIUARTTransport.cpp
+1 −1 scopehal/SCPIUARTTransport.h
+73 −29 scopehal/SiglentSCPIOscilloscope.cpp
+2 −8 scopehal/SiglentSCPIOscilloscope.h
+19 −3 scopehal/TektronixOscilloscope.cpp
+6 −0 scopehal/TektronixOscilloscope.h
+25 −0 scopehal/TestWaveformSource.cpp
+4 −0 scopehal/TestWaveformSource.h
+9 −0 scopehal/Unit.cpp
+2 −0 scopehal/Unit.h
+1 −1 scopehal/VICPSocketTransport.cpp
+1 −1 scopehal/VICPSocketTransport.h
+4 −24 scopeprotocols/EyePattern.cpp
+1 −1 scopeprotocols/EyePattern.h
3 changes: 3 additions & 0 deletions src/ngscopeclient/Session.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ class Session
bool IsMultiScope()
{ return m_multiScope; }

MainWindow* GetMainWindow()
{ return m_mainWindow; }

/**
@brief Returns a pointer to the state for a BERT
*/
Expand Down
11 changes: 10 additions & 1 deletion src/ngscopeclient/WaveformArea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ DisplayedChannel::DisplayedChannel(StreamDescriptor stream, Session& session)
if(schan)
schan->AddRef();

vk::CommandPoolCreateInfo cmdPoolInfo(
vk::CommandPoolCreateFlagBits::eTransient | vk::CommandPoolCreateFlagBits::eResetCommandBuffer,
session.GetMainWindow()->GetRenderQueue()->m_family );
m_utilCmdPool = std::make_unique<vk::raii::CommandPool>(*g_vkComputeDevice, cmdPoolInfo);
vk::CommandBufferAllocateInfo bufinfo(**m_utilCmdPool, vk::CommandBufferLevel::ePrimary, 1);

m_utilCmdBuffer = make_unique<vk::raii::CommandBuffer>(
std::move(vk::raii::CommandBuffers(*g_vkComputeDevice, bufinfo).front()));

//Use GPU-side memory for rasterized waveform
//TODO: instead of using CPU-side mirror, use a shader to memset it when clearing?
m_rasterizedWaveform.SetCpuAccessHint(AcceleratorBuffer<float>::HINT_LIKELY);
Expand Down Expand Up @@ -168,7 +177,7 @@ bool DisplayedChannel::UpdateSize(ImVec2 newSize, MainWindow* top)
{
eye->SetWidth(roundedX);
eye->SetHeight(roundedY);
eye->Refresh();
eye->Refresh(*m_utilCmdBuffer, m_session.GetMainWindow()->GetRenderQueue());
}

x = roundedX;
Expand Down
3 changes: 3 additions & 0 deletions src/ngscopeclient/WaveformArea.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ class DisplayedChannel

///@brief Y axis position of our button within the view
float m_yButtonPos;

std::unique_ptr<vk::raii::CommandPool> m_utilCmdPool;
std::unique_ptr<vk::raii::CommandBuffer> m_utilCmdBuffer;
};

/**
Expand Down

0 comments on commit fd3974e

Please sign in to comment.