Intel® GPA tip: Interpreting API errors when using Intel GPA Frame Analyzer

Submit New Article

May 11, 2010 11:00 PM PDT


Introduction
Saving a frame from your game for later analysis is one of the major features of Intel® Graphics Performance Analyzers (Intel® GPA). When Intel GPA creates this file, it saves the context of all Microsoft DirectX* API calls that were used to create the frame.

However, in some situations Intel GPA Frame Analyzer may report DX API errors in the capture file, even though no errors were reported when running your game or when capturing the file. The rest of this article explains why you may see these errors, and how to check whether these are an issue that may affect your analysis and optimization task.

Situation #1 -- Playback errors occur when creation and playback graphics devices are different
Another situation where you might see errors within Intel GPA Frame Analyzer occurs when you attempt to load a frame capture file on a graphics device that is different from the graphics device you used to create the capture file. Even though Intel GPA will print a warning message for this situation, the tool does allow you to continue -- but you're responsible for ensuring that this works OK.

In this situation the errors that occur within Intel GPA Frame Analyzer may be significant, and keep you from successfully analyzing this frame. As you might expect, issues will most likely occur when the original graphics device has far more capabilities than the device you are using for playback -- such as a high-end, discrete graphics card and a low-end netbook. Therefore, making DX calls that attempt to use resources and features that don't exist will have unpredictable results, and this is not something that Intel GPA can fix for you.

So a good "rule of thumb" when using a single frame capture file on multiple devices:
  • capture the frame on the least capable device, since the more capable devices will likely provide all the capabilities of the original device (and therefore have no issues)
  • don't use a frame capture file created on one vendor's system with another vendor's system (since it's more likely that they'll have various features that don't quite match across architectures)
Situation #2 -- Playback errors are expected and can be ignored
As mentioned above, all DirectX calls are saved to the capture file. But the original game code may make DX calls that it expects may generate errors, and since they are expected the game doesn't report these errors back to the user. When you then load that capture file into Intel GPA Frame Analyzer, Intel GPA may report an error message that one or more API errors were found (even though none were reported when running the game), and ask whether you want to continue loading the file.

The Intel GPA development team has seen this in a couple of cases already -- one game attempts to use a proprietary texture format, and if that texture map creation call fails it then creates that texture map using a more portable texture format. In another situation a developer wants to see whether a particular graphic resource exists -- to do this they check the return code from a DX API call that attempts to use that resource.

So in both of these cases the user doesn't see any errors, but the original API call appears in the frame capture file. In both cases when loading the file you'll see an error in Intel GPA Frame Analyzer -- to verify that all is in fact OK, select one or more ergs within the GUI, then open the "API Log" tab to examine the API calls, where Intel GPA will highlight any errors in red. If all items highlighted in red are expected, just ignore them.

Conclusion
This article has described a couple of situations where you may see errors when loading and/or playing back frame capture files within Intel GPA Frame Analyzer. We've attempted to help you understand the nature of these errors, and whether you can ignore these errors during your analysis.

If you still have questions after reading this article, please use the Intel GPA Support Forum to ask a question or describe an issue you are having with the product.


* Other names and brands may be claimed as the property of others.



Do you need more help?


This article applies to: Intel® Graphics Performance Analyzers (Intel® GPA),   Visual Computing Source,   Intel® Graphics Performance Analyzers Knowledge Base