Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e51ce6286fae
Choose a base ref
...
head repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6462bc2628e0
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Aug 15, 2020

  1. Copy the full SHA
    783ac21 View commit details
  2. Copy the full SHA
    6462bc2 View commit details
Showing with 8 additions and 4 deletions.
  1. +1 −1 lib
  2. +1 −0 src/glscopeclient/WaveformArea_events.cpp
  3. +2 −1 src/glscopeclient/WaveformArea_rendering.cpp
  4. +4 −2 src/glscopeclient/shaders/waveform-compute.glsl
2 changes: 1 addition & 1 deletion lib
Submodule lib updated from 22a7b2 to 07d4bb
1 change: 1 addition & 0 deletions src/glscopeclient/WaveformArea_events.cpp
Original file line number Diff line number Diff line change
@@ -879,6 +879,7 @@ void WaveformArea::OnWaveformDataReady()
}

//Redraw everything
SetGeometryDirty();
queue_draw();
m_group->m_timeline.queue_draw();
}
3 changes: 2 additions & 1 deletion src/glscopeclient/WaveformArea_rendering.cpp
Original file line number Diff line number Diff line change
@@ -166,6 +166,7 @@ void WaveformArea::PrepareGeometry(WaveformRenderData* wdata)
else
{
//Need AVX512DQ or AVX512VL for VCTVQQ2PS
//TODO: see if there is any way to speed this up at least a little on AVX2?
if(g_hasAvx512DQ || g_hasAvx512VL)
Int64ToFloatAVX512(wdata->m_mappedXBuffer, reinterpret_cast<int64_t*>(&andat->m_offsets[0]), wdata->m_count);
else
@@ -174,7 +175,7 @@ void WaveformArea::PrepareGeometry(WaveformRenderData* wdata)
float* psamps = reinterpret_cast<float*>(__builtin_assume_aligned(&andat->m_samples[0], 16));
if(fft)
{
wdata->m_mappedYBuffer = reinterpret_cast<float*>(aligned_alloc(32, wdata->m_count*sizeof(float)));
yoff = 0;
yscale = 1;
for(size_t j=0; j<wdata->m_count; j++)
wdata->m_mappedYBuffer[j] = DbToYPosition(-70 - (20 * log10(psamps[j]))); //TODO: don't hard code plot limits
6 changes: 4 additions & 2 deletions src/glscopeclient/shaders/waveform-compute.glsl
Original file line number Diff line number Diff line change
@@ -117,6 +117,10 @@ void main()
endy = InterpolateY(left, right, slope, gl_GlobalInvocationID.x + 1);
}

//Clip to window size
starty = min(starty, MAX_HEIGHT);
endy = min(endy, MAX_HEIGHT);

//Sort Y coordinates from min to max
int ymin = int(min(starty, endy));
int ymax = int(max(starty, endy));
@@ -126,9 +130,7 @@ void main()

//Fill in the space between min and max for this segment
for(int y=ymin; y <= ymax; y++)
{
g_workingBuffer[gl_LocalInvocationID.x][y] += alpha;
}

//TODO: antialiasing
//TODO: decimation at very wide zooms