User Guide

  • 2020.3
  • 07/10/2020
  • Public Content
Contents

You can create or modify shaders within the Graphics Frame Analyzer to see whether changes result in reduced rendering time with an acceptable level of overall scene quality. Use one of the following methods to revise/replace a section of code:
To compute the shader performance, click the
Profile
button. Graphics Frame Analyzer calculates the total execution time for the analyzed shader, individual time for each shader instruction, and the number of clocks that occurred during the measured period.
NOTE
Profiling is only supported on Intel® microarchitecture code name Ivy Bridge or higher. For
HLSL
, the profiling information is only available if you compiled the analyzed shader with D3D debug flag for the applicable version of Microsoft DirectX*. Otherwise profiling information is only available for
IL Assembly
, and the
Profile
button for
HLSL
is disabled.
Specifying a New Source
To replace the shader with another pre-existing one:
  1. Select the required ergs either in the
    Visualization
    or in the
    Scene Overview
    pane
    .
  2. Go to the Shaders tab.
  3. Select vertex/pixel/geometry/hull/domain/compute shader code in the
    Shader
    column.
  4. Select
    IL Assembly
    or
    HLSL
    from the drop-down list to edit assembly or HLSL code respectively.
    NOTE
    • The
      HLSL
      option is only available if you compile the application shaders at run time using the Microsoft DirectX* API. If your application uses shaders compiled at build time, only the 
      IL Assembly
      option is available for these shaders.
    • You cannot change Assembly shader code for Microsoft DirectX* 10 or Microsoft DirectX* 11 frames.
  5. Click
    Replace File...
    .
  6. In the
    Open
    window, select a file from which to load a new shader.
  7. Click
    Settings...
    to specify the options to the compiler in the
    Shader Settings
    dialog box:
    • In the
      Include Path
      field, specify a path to the shader’s header files for use by the compiler. If the edited shader was loaded from a file, the default is the path to the file; otherwise, there is no default.
    • For HLSL, in the
      Entry Point
      field, specify which function the compiler must treat as the main body for the shader. This option corresponds to the
      pFunctionName
      parameter in
      D3DXCompileShader
      for Microsoft DirectX* 9, in
      D3DX10CompileFromMemory
      for Microsoft DirectX* 10, or in
      D3DX11CompileFromMemory
      for Microsoft DirectX* 11. If multiple entry points exist in the shader file, supply the name of the "main" shader function in the edit box.    
    • In the
      Defines
      field, specify macros that correspond to:
      • the
        pDefines
        parameter in
        D3DXCompileShader
        for Microsoft DirectX* 9
      • the
        pDefines
        parameter in
        D3DX10CompilerFromMemory
        for Microsoft DirectX* 10
      • the
        pDefines
        parameter in
        D3DX11CompilerFromMemory
        for Microsoft DirectX* 11.
      • The format for the
        Defines
        field is SYMBOL=value; multiple entries are delimited by a semi-colon.
  8. Click
    OK
    .
  9. In the
    Shaders
    tab, click
    Apply
    to apply these settings to the required shader any time, without opening the
    Shader Settings
    dialog every time.
  10. To reject the corrections you made while editing the file, click
    Undo Edits
    . To revert the shader to the original state, click
    Revert
    .
Editing the Existing Shader Code
You can edit only one shader at a time.
NOTE
If you apply the
Simple Pixel Shader
or
Disable Erg(s)
experiment to a specific erg or a group of ergs, Graphics Frame Analyzer (DirectX 9, 10, 11) disables editing of the overridden shader and displays a corresponding warning in the
Shaders
tab.
To edit the shader in the text buffer:
  1. Select the required ergs either in the
    Visualization
    or in the .
  2. Go to the Shaders tab.
  3. Select vertex/pixel/geometry/hull/domain/compute shader code in the
    Shader
    column.
  4. Select
    IL Assembly
    or
    HLSL
    from the drop-down list to edit assembly or HLSL code respectively.
    NOTE
    You cannot modify Assembly shader code for Microsoft DirectX* 10 or Microsoft DirectX* 11 frames.
  5. Edit code as required in the code field. To clear edits that have not yet been applied, click
    Undo Edits
    .
  6. Once you have finished with the changes, click
    Settings...
    to specify the options to the compiler in the
    Shader Settings
    window.
  7. Click
    Apply
    to apply the new shader to the selected ergs.
  8. To reject the corrections you made while editing the file, click
    Undo Edits
    . To revert the shader to the original state, click
    Revert
    .
All compilation errors appear in the
Errors View
and the
Shader Replacer
window remains open.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804