Debugging Tools: Difference between revisions
Dark Photon (talk | contribs) mNo edit summary |
Dark Photon (talk | contribs) m (Change heading level. h2 provides for lines between sections which makes this page easier to scan.) |
||
Line 1: | Line 1: | ||
There are several tools that can aid in the debugging of your OpenGL program. | There are several tools that can aid in the debugging of your OpenGL program. | ||
== Debug Output == | |||
{{main|Debug Output}} | {{main|Debug Output}} | ||
Line 9: | Line 9: | ||
Most drivers expose this functionality only on debug contexts: context should be created with CONTEXT_DEBUG_BIT set.. | Most drivers expose this functionality only on debug contexts: context should be created with CONTEXT_DEBUG_BIT set.. | ||
== RenderDoc == | |||
: https://renderdoc.org/ | : https://renderdoc.org/ | ||
Line 16: | Line 16: | ||
RenderDoc is a stand-alone graphics debugging tool, released under the MIT License, that supports OpenGL 3.2+ (Core Profile only) development on Windows and Linux. Besides OpenGL, RenderDoc can also be used to debug [https://www.khronos.org/vulkan/ Vulkan] and several other graphics APIs. Online documentation is available at https://renderdoc.org/docs/index.html. | RenderDoc is a stand-alone graphics debugging tool, released under the MIT License, that supports OpenGL 3.2+ (Core Profile only) development on Windows and Linux. Besides OpenGL, RenderDoc can also be used to debug [https://www.khronos.org/vulkan/ Vulkan] and several other graphics APIs. Online documentation is available at https://renderdoc.org/docs/index.html. | ||
== BuGLe == | |||
: https://www.opengl.org/sdk/tools/BuGLe/ | : https://www.opengl.org/sdk/tools/BuGLe/ | ||
Line 24: | Line 24: | ||
'''Note:''' It was officially announced on November 23 2014 that BuGLe is no longer being developed. [https://www.opengl.org/sdk/tools/BuGLe/news.php] | '''Note:''' It was officially announced on November 23 2014 that BuGLe is no longer being developed. [https://www.opengl.org/sdk/tools/BuGLe/news.php] | ||
== AMD CodeXL == | |||
: https://gpuopen.com/compute-product/codexl/ | : https://gpuopen.com/compute-product/codexl/ | ||
Line 36: | Line 36: | ||
It also supported [http://www.opengl.org/registry/specs/GREMEDY/string_marker.txt GL_GREMEDY_string_marker] for leaving natural language description markers in your source code, which made it easier for you to locate where in your application that GL call sequences were being executed. | It also supported [http://www.opengl.org/registry/specs/GREMEDY/string_marker.txt GL_GREMEDY_string_marker] for leaving natural language description markers in your source code, which made it easier for you to locate where in your application that GL call sequences were being executed. | ||
== APITrace == | |||
: https://github.com/apitrace/apitrace | : https://github.com/apitrace/apitrace | ||
Line 43: | Line 43: | ||
APITrace is another free (as in freedom) software. It is a toolkit for debugging and profiling OpenGL and DirectX applications running on Linux or Windows. You first run your program to generate a "trace file", and this file can then be replayed or explored using the tools provided. | APITrace is another free (as in freedom) software. It is a toolkit for debugging and profiling OpenGL and DirectX applications running on Linux or Windows. You first run your program to generate a "trace file", and this file can then be replayed or explored using the tools provided. | ||
== GLIntercept == | |||
: https://github.com/dtrebilco/glintercept | : https://github.com/dtrebilco/glintercept | ||
Line 62: | Line 62: | ||
'''Cons:''' The program is intended for applications that have a single GL context. Windows Only. It is compatible with OpenGL 3.x and above, but it will not provide the best form of logging for some of the more recent APIs and extensions. | '''Cons:''' The program is intended for applications that have a single GL context. Windows Only. It is compatible with OpenGL 3.x and above, but it will not provide the best form of logging for some of the more recent APIs and extensions. | ||
== GLSL-Debugger == | |||
: http://glsl-debugger.github.io/ | : http://glsl-debugger.github.io/ | ||
Line 73: | Line 73: | ||
The source code has been opened in 2013 and actively developing Open Source fork is now available: http://glsl-debugger.github.io/. This is a fork of the original glslDevil project. | The source code has been opened in 2013 and actively developing Open Source fork is now available: http://glsl-debugger.github.io/. This is a fork of the original glslDevil project. | ||
== Xcode tools == | |||
: https://developer.apple.com/xcode/ | : https://developer.apple.com/xcode/ | ||
Line 80: | Line 80: | ||
Under Mac OS X, Apple provides two very handy tools for debugging OpenGL applications as part of Xcode: [https://developer.apple.com/library/mac/documentation/GraphicsImaging/Conceptual/OpenGLDriverMonitorUserGuide/Introduction/Introduction.html OpenGL Driver Monitor] and [https://developer.apple.com/library/mac/documentation/GraphicsImaging/Conceptual/OpenGLProfilerUserGuide/Introduction/Introduction.html OpenGL Profiler]. | Under Mac OS X, Apple provides two very handy tools for debugging OpenGL applications as part of Xcode: [https://developer.apple.com/library/mac/documentation/GraphicsImaging/Conceptual/OpenGLDriverMonitorUserGuide/Introduction/Introduction.html OpenGL Driver Monitor] and [https://developer.apple.com/library/mac/documentation/GraphicsImaging/Conceptual/OpenGLProfilerUserGuide/Introduction/Introduction.html OpenGL Profiler]. | ||
== Vogl == | |||
: https://github.com/ValveSoftware/vogl | : https://github.com/ValveSoftware/vogl | ||
Line 87: | Line 87: | ||
Vogl is a free (as in freedom) software released under the MIT License by RAD Game Tools and Valve Software. It is an OpenGL capture / playback debugger running on Linux, Windows, and Mac OSX. | Vogl is a free (as in freedom) software released under the MIT License by RAD Game Tools and Valve Software. It is an OpenGL capture / playback debugger running on Linux, Windows, and Mac OSX. | ||
== AMD GPU PerfStudio == | |||
: http://gpuopen.com/archive/gpu-perfstudio/ | : http://gpuopen.com/archive/gpu-perfstudio/ | ||
Line 94: | Line 94: | ||
Supports Windows and Linux, can be used to analyze frames, see textures, buffers, shaders, etc. Also works on non-AMD hardware. | Supports Windows and Linux, can be used to analyze frames, see textures, buffers, shaders, etc. Also works on non-AMD hardware. | ||
== NVIDIA NSight == | |||
: https://www.nvidia.com/object/nsight.html | : https://www.nvidia.com/object/nsight.html |
Revision as of 01:40, 13 January 2018
There are several tools that can aid in the debugging of your OpenGL program.
Debug Output
Description: Debug Output is an OpenGL feature that makes error checking from functions easier. It is a core feature of GL 4.3, and available through extensions for older versions.
Most drivers expose this functionality only on debug contexts: context should be created with CONTEXT_DEBUG_BIT set..
RenderDoc
Description: RenderDoc is a stand-alone graphics debugging tool, released under the MIT License, that supports OpenGL 3.2+ (Core Profile only) development on Windows and Linux. Besides OpenGL, RenderDoc can also be used to debug Vulkan and several other graphics APIs. Online documentation is available at https://renderdoc.org/docs/index.html.
BuGLe
Description: BuGLe is a free (as in freedom) software released under the GPLv2. It is a toolkit for debugging and profiling OpenGL applications running on UNIX-like systems. It consists of two parts: a collection of filter-sets that observe and sometimes modify calls to the OpenGL API, and a graphical debugger (gldb-gui) that helps in setting breakpoints, capturing errors, and examining state (including shader code, buffers and a visual feedback of the textures, the color buffers and depth buffer).
Note: It was officially announced on November 23 2014 that BuGLe is no longer being developed. [1]
AMD CodeXL
Description: AMD's CodeXL is the successor to Graphic Remedy's gDebugger.
gDebugger was a commercial application that hooked into your application and displayed info in text and graphical form in its own window. It could also show GPU utilization. You could use it to find out where the bottleneck is in your app. There were Windows and Linux versions.
It also supported GL_GREMEDY_string_marker for leaving natural language description markers in your source code, which made it easier for you to locate where in your application that GL call sequences were being executed.
APITrace
Description: APITrace is another free (as in freedom) software. It is a toolkit for debugging and profiling OpenGL and DirectX applications running on Linux or Windows. You first run your program to generate a "trace file", and this file can then be replayed or explored using the tools provided.
GLIntercept
Description:
GLIntercept is a free open sourced program intended for Windows platforms. After installing, a folder (C:\Program Files\GLIntercept*_* where the asterisks are the version numbers) will have been created. This folder holds several sample configuration files of interest which can be used to configure GLIntercept: gliConfig.ini, gliConfig_AuthorStd.ini, gliConfig_ExtOverride.ini, etc. In addition, this folder holds a version of the OpenGL32.dll
file which acts an intermediary between your system's OpenGL implementation and GLIntercept. To utilize this functionality, copy the DLL and a customized copy of the gliConfig.ini file to your application's target folder (usually where the .EXE resides) and run your application. All invoked OpenGL function calls will route through the DLL, allowing GLIntercept to detect:
- Errors
- Function calls before context creation
- Resource leaks
Once you close your app, GLI dumps the above info into gliLog.txt.
You may configure GLI to output a XML log file (upon pressing [Ctrl]+[Shift]+[f]) showing all of the OpenGL functions called, problems and used shaders and textures. GLI will make a folder where your EXE is and places the XML files and all related files like screen captures and textures.
In gliConfig.ini, check out section "LogPerFrame".
Cons: The program is intended for applications that have a single GL context. Windows Only. It is compatible with OpenGL 3.x and above, but it will not provide the best form of logging for some of the more recent APIs and extensions.
GLSL-Debugger
Description: GLSL-Debugger is similar in concept to gDebugger. It works transparently just like gDebugger, and it can debug the shaders line by line. It is also free.
Linux and Windows.
The source code has been opened in 2013 and actively developing Open Source fork is now available: http://glsl-debugger.github.io/. This is a fork of the original glslDevil project.
Xcode tools
Description: Under Mac OS X, Apple provides two very handy tools for debugging OpenGL applications as part of Xcode: OpenGL Driver Monitor and OpenGL Profiler.
Vogl
Description: Vogl is a free (as in freedom) software released under the MIT License by RAD Game Tools and Valve Software. It is an OpenGL capture / playback debugger running on Linux, Windows, and Mac OSX.
AMD GPU PerfStudio
Description: Supports Windows and Linux, can be used to analyze frames, see textures, buffers, shaders, etc. Also works on non-AMD hardware.
NVIDIA NSight
Description: The Visual Studio Edition that allows visual debugging and profiling of OpenGL / CUDA / D3D (and more) programs on Windows.
NSight Eclipse Edition provides similar support for Linux and Mac OS.