Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphics Profiling

Ive got an application which drops to around 10fps. I profiled it with xperf which showed my app was using just 20% of the CPU, with none of my methods using a larger than expected amount of that 20%.

This seems to indicate that the vast drop in fps is because the graphics card isnt able to keep up with rendering the frame, resulting in my program stopping while it catches up...

Is there some way to profile what the graphics card is up to and work out what my program is telling it to do thats slowing it down, so that I can try to improve the frame rate?

like image 593
Fire Lancer Avatar asked May 12 '09 11:05

Fire Lancer


People also ask

What is GPU profiling?

The Profile GPU Rendering tool indicates the relative time that each stage of the rendering pipeline takes to render the previous frame. This knowledge can help you identify bottlenecks in the pipeline, so that you can know what to optimize to improve your app's rendering performance.

How do I open my GPU Visualizer?

To run GPU Visualizer press Ctrl Shift , (comma). A new window should pop up. It's tool built into Unreal. It has very precise categories like: BeginOcclusionTests, ShadowDepths, RenderVelocities.

How to Open GPU Profiler Ue4?

To use the live GPU profiler, press the Backtick key to open the console and then input stat GPU and press Enter. You can also bring the live GPU profiler up via the Stat submenu in the Viewport Options dropdown.


3 Answers

For debugging / profiling graphics, try Nvidia PerfHUD

NVIDIA PerfHUD is a powerful real-time performance analysis tool for Direct3D applications.

There is also an ATI solution, called 'GPU PerfStudio'

GPU PerfStudio is a real-time performance analysis tool which has been designed to help tune the graphics performance of your DirectX 9, DirectX 10, and OpenGL applications. GPU PerfStudio displays real-time API, driver and hardware data which can be visualized using extremely flexible plotting and bar chart mechanisms. The application being profiled maybe executed locally or remotely over the network. GPU PerfStudio allows the developer to override key rendering states in real-time for rapid bottleneck detection. An auto-analysis window can be used for identifying performance issues at various stages of the graphics pipeline. No special drivers or code modifications are needed to use GPU PerfStudio.

You can find more information and download links here:

  • http://developer.nvidia.com/object/nvperfhud_home.html
  • http://developer.amd.com/tools-and-sdks/graphics-development/gpu-perfstudio/
like image 84
Evil Activity Avatar answered Oct 01 '22 05:10

Evil Activity


Also, check out this article on FPS:

FPS vs Frame Time

Basically it talks about the fact that a drop from 200fps to 190fps is negligible, whereas a drop from 30fps to 20fps is a MUCH bigger deal. For better performance measuring, you should be calculating frame time rather than FPS.

You never told us what your fps is or what the program is doing at all, so your "vast drop" might not be a big deal at all.

For DirectX, there is PIX for profiling the CPU and GPU operations. It can give very detailed info, and might be worth looking into.

Hope that helps!

like image 23
JPhi1618 Avatar answered Oct 01 '22 06:10

JPhi1618


You can try using dxprof (search in google). It's lightweight app that draws real-time bars, each bar corresponding to one DirectX event (such as draw-call or resource copy). You can freeze the bars and check calls stack to find out where the draw-call originates from.

like image 40
Kirill Avatar answered Oct 01 '22 06:10

Kirill