Guest User

Untitled

a guest
Jan 28th, 2024
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. diff --git a/src/ngscopeclient/shaders/waveform-compute.glsl b/src/ngscopeclient/shaders/waveform-compute.glsl
  2. index 049c645e..e7979839 100644
  3. --- a/src/ngscopeclient/shaders/waveform-compute.glsl
  4. +++ b/src/ngscopeclient/shaders/waveform-compute.glsl
  5. @@ -236,21 +236,26 @@ void main()
  6. }
  7.  
  8. //Setup for main loop
  9. + bool l_done = false;
  10. +
  11. if(gl_LocalInvocationID.y == 0)
  12. g_done = false;
  13.  
  14. + barrier();
  15. + memoryBarrierShared();
  16. +
  17. #ifdef DENSE_PACK
  18. uint istart = uint(floor(gl_GlobalInvocationID.x / xscale)) + offset_samples;
  19. uint iend = uint(floor((gl_GlobalInvocationID.x + 1) / xscale)) + offset_samples;
  20. if(iend <= 0)
  21. - g_done = true;
  22. + l_done = true;
  23. #else
  24. uint istart = xind[gl_GlobalInvocationID.x];
  25. if( (gl_GlobalInvocationID.x + 1) < windowWidth)
  26. {
  27. uint iend = xind[gl_GlobalInvocationID.x + 1];
  28. if(iend <= 0)
  29. - g_done = true;
  30. + l_done = true;
  31. }
  32. #endif
  33. uint i = istart + gl_GlobalInvocationID.y;
  34. @@ -369,17 +374,20 @@ void main()
  35.  
  36. //Check if we're at the end of the pixel
  37. if(right.x > gl_GlobalInvocationID.x + 1)
  38. - g_done = true;
  39. + l_done = true;
  40. }
  41.  
  42. else
  43. {
  44. - g_done = true;
  45. + l_done = true;
  46. g_updating[gl_LocalInvocationID.y] = false;
  47. }
  48.  
  49. i += ROWS_PER_BLOCK;
  50.  
  51. + if (l_done)
  52. + g_done = true;
  53. +
  54. //Only update if we need to
  55. for(int y = 0; y<ROWS_PER_BLOCK; y++)
  56. {
  57.  
Advertisement
Add Comment
Please, Sign In to add comment