#Does anyone know how to use Nsight Systems? I'm trying to profile my Opengl game
41 messages · Page 1 of 1 (latest)
use nsight graphics instead, then use the gpu trace feature
hm I first tried that but (probably I don't know how to use it) I was able to capture only one frame. Can I capture multiple frames using it? My problem happens from time to time so I can't just profile a random frame to debug it
gpu trace can capture multiple frames in sequence (a low count though)
what are you trying to profile?
I get a wierd big lagspike from time to time
Like it can get to 30 ms or more
but I don't know when it happens, that's what I'm trying to figure out
so I need to profile multiple frames untill a get a "problematic frame"
hmm you could use timer queries to time each pass and store the results over time, then plot it
then you might see which ones spike
yes I have that in my program
but I can't like tell apriory when that would happen to start the profiler
or maybe I didn't understand what you proposed
you mean time each thing using GPU traces?
I presume you're using opengl
I'm talking about these
https://www.khronos.org/opengl/wiki/Query_Object
you can record two GPU timestamps, then take the difference to roughly see how long all the commands between the start and end took to execute
if you do this every frame, you can plot how long it took various passes to execute
I see ok
so you are saying that nsigny system won't help me in this case?
idk, I haven't used it 
you using Imgui for that plot
?
imgui + implot
I'm using a custom theme
thanks
well I just added that
it doesn't seem to corelate with my lag spike
like I profiled the entire main rendering part
and it didn't spike
tho I am clearly getting massive lag from time to time from swap buffers
afaik swapbuffers can lag since it also makes sure the GPU is synced or smth. It makes sure all commands ran correctly.