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: 6fcae18b2221
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: ab663aff26c3
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Sep 6, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    skmcgrail Sean McGrail
    Copy the full SHA
    ab663af View commit details
Showing with 8 additions and 3 deletions.
  1. +1 −1 lib
  2. +7 −2 src/glscopeclient/WaveformArea_rendering.cpp
2 changes: 1 addition & 1 deletion lib
Submodule lib updated from 6b2b87 to 36a191
9 changes: 7 additions & 2 deletions src/glscopeclient/WaveformArea_rendering.cpp
Original file line number Diff line number Diff line change
@@ -172,12 +172,17 @@ void WaveformArea::PrepareGeometry(WaveformRenderData* wdata, bool update_wavefo
//trivially map sample indexes to X pixel coordinates.
//TODO: can we parallelize this? move to a compute shader?
auto group = wdata->m_area->m_group;
int64_t offset_samples = (group->m_xAxisOffset / pdat->m_timescale);
float xscale = (pdat->m_timescale * group->m_pixelsPerXUnit);
for(int j=0; j<wdata->m_area->m_width; j++)
{
int64_t target = floor(j / xscale) + offset_samples;
wdata->m_mappedIndexBuffer[j] = BinarySearchForGequal(
(int64_t*)&pdat->m_offsets[0],
wdata->m_count,
(j + group->m_xAxisOffset) / pdat->m_timescale);
target - 5); //Small fudge factor to fix graphical artifacts (some columns of pixels not being drawn)
//I think these might be floating point rounding issues somewhere? Need to debug more
//but for now, this fixes rendering.
}

//Scale alpha by zoom.
@@ -193,7 +198,7 @@ void WaveformArea::PrepareGeometry(WaveformRenderData* wdata, bool update_wavefo
wdata->m_mappedConfigBuffer[4] = wdata->m_count; //depth
wdata->m_mappedFloatConfigBuffer[5] = alpha_scaled; //alpha
wdata->m_mappedFloatConfigBuffer[6] = pdat->m_triggerPhase * group->m_pixelsPerXUnit; //xoff
wdata->m_mappedFloatConfigBuffer[7] = pdat->m_timescale * group->m_pixelsPerXUnit; //xscale
wdata->m_mappedFloatConfigBuffer[7] = pdat->m_timescale * group->m_pixelsPerXUnit; //xscale
wdata->m_mappedFloatConfigBuffer[8] = ybase; //ybase
wdata->m_mappedFloatConfigBuffer[9] = yscale; //yscale
wdata->m_mappedFloatConfigBuffer[10] = channel->GetOffset(); //yoff