azonenberg changed the topic of #scopehal to: libscopehal, libscopeprotocols, and glscopeclient development and testing | https://github.com/glscopeclient/scopehal-apps | Logs: https://libera.irclog.whitequark.org/scopehal
Degi_ has joined #scopehal
Degi has quit [Ping timeout: 252 seconds]
Degi_ is now known as Degi
<_whitenotifier-7> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±2] https://github.com/glscopeclient/scopehal/compare/71f700a584be...ad444d177dce
<_whitenotifier-7> [scopehal] azonenberg ad444d1 - LeCroyOscilloscope: added ForceHDMode() setting.
<_whitenotifier-7> [scopehal-apps] azonenberg pushed 1 commit to master [+0/-0/±3] https://github.com/glscopeclient/scopehal-apps/compare/2cf39f3a684a...ef2c1f19d43f
<_whitenotifier-7> [scopehal-apps] azonenberg ef2c1f1 - Added preference for LeCroy scopes to force 16 bit resolution for network transfers. Fixes #477.
<_whitenotifier-7> [scopehal-apps] azonenberg closed issue #477: Add preference to force 16-bit mode on 8-bit LeCroy scopes - https://github.com/glscopeclient/scopehal-apps/issues/477
<azonenberg> And another pending todo taken care of. Next up: assembling the AKL-AD4 prototype i've had sitting on the bench for probably a week now
bgamari has quit [Ping timeout: 260 seconds]
bgamari has joined #scopehal
<_whitenotifier-7> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±2] https://github.com/glscopeclient/scopehal/compare/ad444d177dce...bf2f26fa2678
<_whitenotifier-7> [scopehal] azonenberg bf2f26f - Min/max statistics: fixed regression
<_whitenotifier-7> [scopehal-apps] azonenberg pushed 2 commits to master [+0/-0/±5] https://github.com/glscopeclient/scopehal-apps/compare/ef2c1f19d43f...56ad2c933d00
<_whitenotifier-7> [scopehal-apps] azonenberg 042c9ff - WaveformGroup: don't crash when updating measurements on a channel that has no data yet
<_whitenotifier-7> [scopehal-apps] azonenberg 56ad2c9 - Apply instrument prefrences when loading a file, not just when adding a new instrument
<_whitenotifier-7> [scopehal-apps] azonenberg pushed 1 commit to master [+0/-0/±2] https://github.com/glscopeclient/scopehal-apps/compare/56ad2c933d00...cb48660cc0cc
<_whitenotifier-7> [scopehal-apps] azonenberg cb48660 - Fixed missing include
massi has joined #scopehal
<_whitenotifier-7> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±1] https://github.com/glscopeclient/scopehal/compare/bf2f26fa2678...142241b7d608
<_whitenotifier-7> [scopehal] azonenberg 142241b - Filter: don't save range/offset for digital/protocol streams
<_whitenotifier-7> [scopehal-apps] azonenberg pushed 1 commit to master [+0/-0/±1] https://github.com/glscopeclient/scopehal-apps/compare/cb48660cc0cc...dc1465df20f2
<_whitenotifier-7> [scopehal-apps] azonenberg dc1465d - Updated submodules
<_whitenotifier-7> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±1] https://github.com/glscopeclient/scopehal/compare/142241b7d608...540646ff8ded
<_whitenotifier-7> [scopehal] azonenberg 540646f - SubtractFilter: fixed typo
<_whitenotifier-7> [scopehal-apps] azonenberg pushed 1 commit to master [+0/-0/±1] https://github.com/glscopeclient/scopehal-apps/compare/dc1465df20f2...8c05d5008b3f
<_whitenotifier-7> [scopehal-apps] azonenberg 8c05d50 - Updated submodules with bug fix
bvernoux has joined #scopehal
<bvernoux> Hello
<bvernoux> @azonenberg, does scopehal-apps is ready to be rebuilt now ?
<bvernoux> Latest status is Linux build failed
<bvernoux> I was waiting a go to try again to fix the Windows build
<bvernoux> especially as you have done some great refactor which shall use less RAM and to be faster
<bvernoux> @azonenberg, could you fix the Linux build ? I see latest commit fail https://github.com/glscopeclient/scopehal-apps/runs/8110119078?check_suite_focus=true
massi has quit [Remote host closed the connection]
<_whitenotifier-7> [scopehal-apps] Biswa96 commented on issue #470: Windows CI build is broken despite finding Vulkan SDK - https://github.com/glscopeclient/scopehal-apps/issues/470#issuecomment-1233164837
jevinskie[m] has joined #scopehal
<_whitenotifier-7> [scopehal-apps] Biswa96 deleted a comment on issue #470: Windows CI build is broken despite finding Vulkan SDK - https://github.com/glscopeclient/scopehal-apps/issues/470#issuecomment-1233164837
<bvernoux> I'm using latest VulkanSDK it seems that work
<bvernoux> build in progress
<bvernoux> default VulkanSDK install is not enough as it requires mode stuff IIRC to be clarified
<bvernoux> I have installed also the allocator and other stuff from the SDK
<bvernoux> mode=>more
<bvernoux> hmm 'glslc' is not recognized as an internal or external command,
<electronic_eel> bvernoux: glslc is a new build-time dependency. it is the shader-compiler
<bvernoux> Yes it was missing a path to find it
<bvernoux> export PATH=/c/VulkanSDK/1.3.224.1/Bin:$PATH
<bvernoux> do the trick
<bvernoux> on mingw64
<electronic_eel> ah, you are building on windows. this is more involved than on linux
<bvernoux> yes
<bvernoux> this Vulkan SDK is full of trap ;)
<electronic_eel> at least it is not full of crap, so it is worth working around the traps ;)
<bvernoux> yes
<bvernoux> Just need to identify all env vars to set
<bvernoux> then the magic will maybe happen ;)
<bvernoux> so far I try to build here locally then I will try to fix the CI Build
<bvernoux> which is a bit different
<electronic_eel> but is c:\VulkanSDK\1.3.224.1\ a sensible install path for it on windows? i would more expect something like %ProgramFiles%\VulkanSDK\1.3.224.1\
<electronic_eel> or %ProgramFiles%\Kronosgroup\VulkanSDK\1.3.224.1\
<bvernoux> wooo
<bvernoux> [100%] Linking CXX executable glscopeclient.exe
<bvernoux> [100%] Built target glscopeclient
<bvernoux> wooo good news
<bvernoux> It build with the CI ;)
<bvernoux> let's wait until the end to check all work fine
<bvernoux> Then I will do a PR to fix the CI Build
<bvernoux> the exe is built but when I launch it => vkCreateInstance: ErrorIncompatibleDriver
<bvernoux> strange as basic vkcube.exe works with my GFX card
<azonenberg> Try with --debug and make sure it's tryiong to use your actual GPU and not some emulated thing?
<bvernoux> --debug does not output anything more
<bvernoux> I have launched it with a cmd forced on my GFX card like I do on old glscopeclient.exe
<bvernoux> C:\Program Files\glscopeclient>glscopeclient.exe --debug --stdout-only
<bvernoux> ←[31;1m←[31;1mERROR:←[0m vk::SystemError:←[0m vkCreateInstance: ErrorIncompatibleDriver
<bvernoux> Initializing Vulkan
<bvernoux> the error is not very helpful ;)
<bvernoux> VulkanSDK\1.3.224.1\Demos\cube work fine
<bvernoux> I will check if you have enabled special features in the vkCreateInstance()
<azonenberg> i ask for vulkan 1.1 i think but only actually need 1.0
<azonenberg> you can try patching that in the init call
<azonenberg> i'm probably going to change the official dependency to 1.0
<azonenberg> but i'd expect most modern GPUs will support 1.2 or 1.3 so that's *probably* not your issue?
<bvernoux> ha yes the example cube.c use VK_API_VERSION_1_0
<azonenberg> (and i think we should still be able to initialize and query devices)
<bvernoux> yes very strange
<bvernoux> hmm I do not find the vkCreateInstance
<bvernoux> in code
<_whitenotifier-7> [scopehal-apps] Biswa96 commented on issue #470: Windows CI build is broken despite finding Vulkan SDK - https://github.com/glscopeclient/scopehal-apps/issues/470#issuecomment-1233315591
<bvernoux> ha found ;)
<bvernoux> in VulkanInit
<bvernoux> let's try with v1.0 ;)
<_whitenotifier-7> [scopehal-apps] azonenberg commented on issue #470: Windows CI build is broken despite finding Vulkan SDK - https://github.com/glscopeclient/scopehal-apps/issues/470#issuecomment-1233319694
<_whitenotifier-7> [scopehal-apps] bvernoux commented on issue #470: Windows CI build is broken despite finding Vulkan SDK - https://github.com/glscopeclient/scopehal-apps/issues/470#issuecomment-1233322661
<bvernoux> hmm same issue when trying v1.0
<bvernoux> there is definitely something wrong
<azonenberg> that's starting to smell like a driver issue then
<bvernoux> but the vkdemo work
<bvernoux> the init is a bit different but very similar
<bvernoux> C:\VulkanSDK\1.3.224.1\Demos\x64\Debug\vkcube.exe
<azonenberg> I mean, i've seen drivers randomly segfault if you updated stuff at the wrong time etc
<bvernoux> Ok I have built it with VisualStudio ;)
<bvernoux> there is no any segfault or crash here
<bvernoux> just that error
<azonenberg> you've built glscopeclient or the cube demo?
<bvernoux> both
<bvernoux> but cube demo is built with VS project
<azonenberg> and does the cube run or no?
<bvernoux> yes cube work fine
<azonenberg> your own compiled version i mean
<bvernoux> with a nice 3D cube
<azonenberg> not their provided binary
<bvernoux> my own built version
<azonenberg> huh interesting
<bvernoux> yes they do not provide any bin for demo
<azonenberg> well keep investigating i guess
<bvernoux> the main difference is it is built with VS2019
<bvernoux> vs MINGW64 for glscopeclient
<bvernoux> glscopclient use vk C++ API too
<azonenberg> that's a header-only wrapper that invokes the C API under the hood
<azonenberg> you should be able to step through in a debugger and find the C API calls
<_whitenotifier-7> [scopehal-apps] Biswa96 commented on issue #470: Windows CI build is broken despite finding Vulkan SDK - https://github.com/glscopeclient/scopehal-apps/issues/470#issuecomment-1233332518
<bvernoux> I have rebuilt vulkaninfo
<bvernoux> what a crap it was full of undefined stuff
<bvernoux> it returns tons of things related to my GFX card
<azonenberg> Yep. but does it work?
<azonenberg> no errors there?
<azonenberg> (also i just change the VulkanInit code to request api version 1.0 in libscopehal, but not pushed yet)
<bvernoux> ok let's download latest Nvidia driver for my old GFX card ;)
<bvernoux> yes it works
<bvernoux> all vulkan examples works
<bvernoux> vkcube.exe
<bvernoux> vkcubepp.exe
<bvernoux> vulkaninfo.exe (after comment of some defines not supported for windows ...)
<azonenberg> (Have you tried another computer also?)
<bvernoux> no
<bvernoux> I will try on my other one
<azonenberg> So at this point we dont know if it's a windows issue or something about this specific machine
<bvernoux> yes
<bvernoux> the build work at least
<bvernoux> i'm not far to fix it on CI Build
<azonenberg> great. if you want to PR those changes that's a start
<bvernoux> but there is a path issue with ninja
<azonenberg> (when you get it fixed)
<azonenberg> also the Linux CI build is currently broken for similar reasons (lack of vulkan SDK)
<azonenberg> if someone wants to work on that
<azonenberg> i've been too busy to touch it
<bvernoux> I'm installing NVIDIA Driver v425.31
<bvernoux> instead of my old windows10 driver v388
<bvernoux> that could change lot of things ;)
<bvernoux> next step to test on my other really more recent computer with Quadro GFX card
<bvernoux> It will be great to add the details of vulkaninfo in glscopeclient
<bvernoux> especially to check if required features are present or not as we have a very extensive list of feature and if they are supported or not on the GFX card
<azonenberg> So, we print out a ton of stuff once we have the context initialized :p
<azonenberg> of all available cards and various features
<azonenberg> most stuff is optional. almost all of the opengl features we need are standard/core in vulkan
<azonenberg> if 8/16 bit integer support are available (not core but widely supported) we'll use them
<azonenberg> with CPU-side software fallback if not available
<azonenberg> we require 32-bit integer support (which is core) and will use 64 bit integers if supported, otherwise fall back with a shader based bignum library that splits them into 32-bit halves
<bvernoux> hahaha
<bvernoux> what a joke ;)
<bvernoux> it works now
<azonenberg> what changed
<bvernoux> just relaunched glscopeclient.exe with newer Nvidia driver and it start
<azonenberg> the driver?
<bvernoux> Installed v425
<bvernoux> instead of defautl windows10 v388 drivers
<bvernoux> yes only the NVidia drivers
<azonenberg> and does it actually work now? try actually loading a waveform etc
<azonenberg> and if you run with --debug do you see vulkan info printed?
<bvernoux> let's rebuild with vulkan 1.1 ;)
<bvernoux> it shall work
<azonenberg> i'm changing the code to use 1.0 so that it's more widely compatible
<azonenberg> although i think all of our target platforms support at least 1.1, if i can get away with 1.0 i will
<bvernoux> yes
<bvernoux> could you push it ?
<bvernoux> like that I will rebuild with exactly same code here
<bvernoux> to heck
<bvernoux> to check
<bvernoux> I could push an alternative way to build glscopeclient for windows too
<_whitenotifier-7> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±1] https://github.com/glscopeclient/scopehal/compare/540646ff8ded...cc2cc1c61421
<_whitenotifier-7> [scopehal] azonenberg cc2cc1c - Changed default Vulkan version to 1.0 instead of 1.1
<_whitenotifier-7> [scopehal-apps] azonenberg pushed 1 commit to master [+0/-0/±1] https://github.com/glscopeclient/scopehal-apps/compare/8c05d5008b3f...d14eea230d8f
<_whitenotifier-7> [scopehal-apps] azonenberg d14eea2 - Updated to latest scopehal
<bvernoux> I confirm it work perfectly
<bvernoux> oups
<azonenberg> great. so now you just have to fix the CI?
<bvernoux> yes the demo works
<azonenberg> Great
<azonenberg> At this point we're using vulkan internally in a few spots but most rendering is still GL. The main rewrite hasn't happened yet
<azonenberg> but getting the infrastructure in place was necessary first
<bvernoux> it clearly seems faster
<bvernoux> there is memory optimization only right now ?
<bvernoux> with vulkan instead of opengl ?
<azonenberg> So one of the big recent changes is the new internal data model
<azonenberg> where we don't drag around sparse offset/duration data for uniformly sampled waveforms anymore
<azonenberg> there's a lot more RTTI checks and code complexity to make up for it
<azonenberg> but the net result is a 5x reduction in ram consumption and ram bandwidth used by uniformly sampled waveforms
<bvernoux> ha great
<azonenberg> we're now also using memory pools in the Pico driver (not yet deployed elsewhere) to avoid excessive allocations and deallocations of DMA-pinned memory (expensive, several ms each)
<bvernoux> especially as uniformly sampled waveforms is used for 99% of case
<azonenberg> Yes
<bvernoux> which means same base time correct ?
<azonenberg> Correct
<bvernoux> which never change
<azonenberg> well
<azonenberg> it can change but not within the waveform
<bvernoux> so yes it is a very good optimization
<azonenberg> we had some optimizations in place for that already
<azonenberg> but they were only when consuming the data
<azonenberg> you still had to produce the offset/duration values even if you never read them
<azonenberg> this refactoring took me almost two weeks and completely changed the internal data model to be two separate class types
<azonenberg> and now the data is not stored if not used
<azonenberg> we also have some more major improvements that you won't see yet
<azonenberg> where we store data in combined CPU/GPU buffers and only copy if necessary
<azonenberg> this will start to show visible performance improvements once the new Vulkan renderer lands
<azonenberg> and when we've pushed more waveform processing to Vulkan
<azonenberg> in particular there will be a lot less needless memcpy'ing
<azonenberg> and a lot less redundant CPU-GPU-CPU transfers
<azonenberg> ultimately the goal is to have waveform data pushed from CPU to GPU, live almost exclusively on the GPU, and only be copied to the CPU if needed by a filter block that doesn't have a GPU version available
<_whitenotifier-7> [scopehal-apps] Johnsel commented on issue #471: Look at alternative CI platforms - https://github.com/glscopeclient/scopehal-apps/issues/471#issuecomment-1233493039
<_whitenotifier-7> [scopehal-apps] Johnsel edited a comment on issue #471: Look at alternative CI platforms - https://github.com/glscopeclient/scopehal-apps/issues/471#issuecomment-1233493039
<_whitenotifier-7> [scopehal-apps] bvernoux commented on issue #470: Windows CI build is broken despite finding Vulkan SDK - https://github.com/glscopeclient/scopehal-apps/issues/470#issuecomment-1233512252
<_whitenotifier-7> [scopehal-apps] bvernoux edited a comment on issue #470: Windows CI build is broken despite finding Vulkan SDK - https://github.com/glscopeclient/scopehal-apps/issues/470#issuecomment-1233512252
<azonenberg> Chasing what appears to be a file corruption bug
<_whitenotifier-7> [scopehal-apps] azonenberg pushed 2 commits to master [+0/-0/±4] https://github.com/glscopeclient/scopehal-apps/compare/d14eea230d8f...c0b490a80dda
<_whitenotifier-7> [scopehal-apps] azonenberg a90321d - Updated comment header in unit test
<_whitenotifier-7> [scopehal-apps] azonenberg c0b490a - Fixed major regression causing corruption of uniformly sampled waveform data when saving a file
<azonenberg> balrog, bvernoux: please update to that version ASAP
<bvernoux> I think I have found the solution
<bvernoux> echo "/c/VulkanSDK/1.3.224.1/Bin" >> $GITHUB_PATH
<bvernoux> it is a magic stuff in CI
<bvernoux> it set env variable for all the session
<bvernoux> I have synced the source to your latest code
<azonenberg> great, do you have a PR ready to go?
bvernoux has quit [Quit: Leaving]
<_whitenotifier-7> [scopehal-apps] azonenberg pushed 1 commit to master [+0/-0/±1] https://github.com/glscopeclient/scopehal-apps/compare/c0b490a80dda...121e7c587b38
<_whitenotifier-7> [scopehal-apps] azonenberg 121e7c5 - Bug fix: avoid refreshing eye patterns twice when a new waveform comes in