easy_profiler
easy_profiler copied to clipboard
GPU timing for OpenGL
Any idea how that is done in general? Is it like getting opengl API calls wrapped in EASY_BLOCK
or is there more magic behind it?
I think it's necessary another type of block for GPU-timing. As far as I know gpu time measure in OpenGL needs call glBeginQuery...
and after swap buffering (or similar) glEndQuery
. In many case that is doing in different functions. In that case it's needs explicitly call something like EASY_GPU_BLOCK_END
. Since I haven't enough experience in OpenGL I'm studying it now =) We have some good examples of custom gpu-measuring. I think we will integrate it in easy_profiler in near future.
I found apitrace. Looks like they do profiling by hooking each API call.
I might take a stab at this if nobody gets to it before me, but I'm busy atm.
@yse I would advise against glBeginQuery
because you cannot nest it, so you can't actually measure blocks within blocks. It is better to use glQueryCounter
which simply requests the GPU to provide you with a timestamp for when the GPU reaches this call. You do this at the beginning and end of each block and then keep checking whether the counter result is available until you can store it in the profile.
@looki I'm really sorry that we have ignored your suggestion, but we have been very busy and missed your message 😞 It would be nice if you can help with the feature if you are still interested. @yse can you please participate in discussion or should we take a break (or even freeze it) for GPU profiling feature?
@looki did you happen to start any work regarding this?