Analyzing Application Textures

Graphics Frame Analyzer allows you to review all textures for the selected ergs and determine whether this aspect of your application can be optimized. Using high-resolution textures, non-compressed formats, or multiple textures within a frame can negatively affect your application performance. To speed up the rendering, you can try to:

  • Reduce the size of textures
  • Reduce the number of textures used in the scene by using one texture for a set of objects
  • Reduce the texture filtering setting
  • Reduce the number of texture fetches in the shaders

To review a texture used in the frame:

  1. In the Bar chart, select the ergs that use the texture you want to analyze.

    To preview all textures used in the frame, you can select all the ergs at once.

  2. Select the texture thumbnail in the Resource viewer.

    Graphics Frame Analyzer displays the texture preview, with all the texture parameters. At the same time, all ergs that are using this texture get highlighted with an orange marker in the Bar chart.

    You can flip the texture image by clicking the button. This is useful if your texture is stored in memory in the reverse order and appears upside down. For 3D textures and image textures, you can also select the image layer from the Layer input control.

You can also experiment with storage parameters of a texture to determine whether specifying different parameters during texture creation can reduce memory bandwidth and/or sampler utilization.

NOTE

You cannot modify the storage parameters in the following cases:

  • The texture is used in the frame as a render target or an image texture.
  • The texture is a cube map or a cube map array.

To experiment with the selected texture:

  1. Modify storage parameters of a texture:
    • Reduce each of the texture dimensions.
    • Change the sample count in the range between 1 and the maximum number of samples supported by the platform.
      This option is only available for OpenGL desktop applications.

      CAUTION

      Changing the sample count could break rendering since the original texture is replaced with a multisampled one. Multisample textures also require changes to shaders sampling from those textures, as multisampled textures have a dedicated sampler type and texel fetch functions. These changes are not applied automatically and you have to make them manually for each draw call that uses the original texture as input.

  2. Click the button to apply the changes.
    A new texture is created with the specified parameters and the contents of the original texture are scaled to the new size. This texture replaces the original one across the entire frame.

You do not have to rebuild the application and re-capture the scene to see the effect of this experiment: render targets and the metric values get updated automatically.

You can export the texture image by clicking the button or pressing Ctrl+S. You can choose between DirectDraw Surface (DDS), Khronos Texture (KTX), or PNG formats.

See Also

Graphics Frame Analyzer Window: Profiling View

For more complete information about compiler optimizations, see our Optimization Notice.