I’ve been experiencing a somewhat-low frame-rate in my current project. In the hopes of diagnosing the source of the issue, turned to PStats, and now could use some help with interpreting the results.
Note that the results described below were obtained with “gl-finish” set to “1”; without that I end up with a significant chunk of time spent in “clear”.
Looking at the graph produced by PStats, I seem to have a lot of time spent in “Draw->Primitive”, and specifically in the sub-graph of that which is labelled “Setup”. A look at the “Primitive batches” graph showed a value of over one hundred (I think that it was), but while flattening reduced that number to around fifty, this doesn’t seem to have produced a significant increase in the frame-rate. I do note that the primitives in question seem to predominantly be categorised under “Triangles”, rather than “Triangle-strips”.
So, what is “Setup”, and is there anything that I might do to reduce the amount of time that it’s taking up? Are there still too many primitive batches? Are there any other values that I should look at?
Finally, I do note that reducing the complexity of my custom CG shaders seemed to help: while “Draw->Primitive->Setup” still predominated, the associated value was slightly reduced and the frame-rate increased a little. (I do realise that I should probably be using GLSL shaders; these shaders are hold-overs from before I picked up GLSL, and aren’t intended to be part of the final product.)