Open claudeha opened 5 years ago
Thanks for trying out FrameRetrace!
A couple of things can be going wrong:
you want to use the FrameRetrace branch to trace your application. Features have been added to apitrace since my branchpoint which change the trace file format. I have an open task to rebase my tool so it works on master (I need those fixes and features too)
frame 2 is usually not where you want to analyze a workload. The earliest frames in a trace often contain GL commands that compile programs and set up state to be used later on in the render loop. FrameRetrace will loop over the target frame many hundreds of time, and you don't want to be calling glCreateShader hundreds of times. Choose a frame that is in the render loop.
There may be some feature or extension in your trace that I haven't seen in previous workloads. If you can put the trace file somewhere that I can access, then I'm happy to analyze and add support. I can usually do this within a day or two.
I'm on the frameretrace branch (remotes/origin/HEAD -> origin/frameretrace)
Good to know, I choose frame 100 out of the 163 in my trace (it told me how many when I entered 1000) and the server survived! However, I just see the API calls and Metrics, all the Shader tabs are blank despite the API calls including glUseProgram(1).
https://mathr.co.uk/tmp/Fragmentarium-2.5.0.trace.7z 1.5MB (compressed from 91MB)
darn, I'm not able to retrace that file, probably because you have a radeon system:
error: failed to create OpenGL 4.1 compat context.
For radeon, the gpu metrics may not be well-supported. You have to compile a 3rd-party library that was written for windows tools. I hacked the source from that project to enable radeon, but I don't know how often that functionality has been used. See:
apitrace/retrace/daemon/amd_gpa/fetch_gpa.sh
You need that library to see "real" hardware metrics from the GPU.
To see the shader source, you select renders by clicking on the bars in the graph. It should show the programs that were active for the selected renders. Is that not working?
On 23/08/2019 21:01, Mark Janes wrote:
To see the shader source, you select renders by clicking on the bars in the graph. It should show the programs that were active for the selected renders. Is that not working? Ok, that is working. But it only seems to show the shaders used by Qt to render the whole application window, and not the shaders used within a Qt widget to render a fractal image (which are the ones I was curious to inspect). Nor does it show compiled forms, just the source - I have the source of the shaders because the main program is a shader editor.
The implementation that obtains ssa/simd assemblies is done with INTEL_DEBUG={dump_shader_stage}
I don't know if the Mesa radeon driver has a hook to dump compiled shaders, but if it's there, it would not be hard to expose in FrameRetrace. I'm currently hooking up ARB_debug to make the capture more reliable, and would prefer to have the radeon driver dump shader artifacts through that mechanism.
I'll need some help to get radeon compilation artifacts into frameretrace. I work at Intel, and can't dedicate time to that particular feature. If you have an intel gpu, you could probably use it to find performance issues that apply to both platforms.
You may not have selected the render that draws the fractal image. It should be easy to find using the render target tab. Select "highlight render", and "stop at render" and advance through the bars in the graph. I keyboard nav should work with the arrow keys. The selected render should be drawn in pink, and the render target should build up through the renders. Find the one that renders the pixels you are interested in and you should see the program.
If you have misrendering or performance issues, you can edit the shader directly in FrameRetrace and recompile to see if gpu metrics change.
what I did:
what I expected:
what happened:
FrameRetrace server died.
, pressingOk
quitswith frame count set to 1, it doesn't error out, but it doesn't show the information I was looking for
excerpt from glxinfo:
Debian Buster with apitrace fresh from git