Name EXT_debug_tool Name Strings GL_EXT_debug_tool Contact Baldur Karlsson (baldurk 'at' baldurk.org) Contributors Baldur Karlsson Status Shipping in RenderDoc from March 24, 2015. Version Date: March 24, 2015 Revision: 1 Number No number assigned yet Dependencies OpenGL 1.0 is required. The extension is written against the OpenGL 4.5 specification, Core Profile. Overview This extension adds a query for applications to determine whether a debugging tool is currently active, as well as its name and purpose. For example this information could be used to be able to selectively enable additional debugging paths or disable optimisations to produce better debugging. Likewise one could disable debugging to allow for better profiling. IP Status No known IP claims. New Procedures and Functions None New Types None New Tokens Accepted by the parameter of IsEnabled: DEBUG_TOOL_EXT 0x???? Accepted by the parameter of GetString: DEBUG_TOOL_NAME_EXT 0x???? Accepted by the parameter of GetIntegerv: DEBUG_TOOL_PURPOSE_EXT 0x???? Returned by GetIntegerv when is DEBUG_TOOL_PURPOSE_EXT: DEBUG_TOOL_FRAME_CAPTURE_BIT_EXT 0x0001 DEBUG_TOOL_TRACE_CAPTURE_BIT_EXT 0x0002 DEBUG_TOOL_API_CALL_LOG_BIT_EXT 0x0004 DEBUG_TOOL_PROFILING_BIT_EXT 0x0008 DEBUG_TOOL_VALIDATION_BIT_EXT 0x0010 Additions to Chapter 20 of the OpenGL 4.5 (Core) Specification (Debug output) Add a new Section 20.10 (Debug Tools) Queries are provided for application developers to be able to determine if an external debugger, profiler or other debug tool is currently active on the current GL context. When calling IsEnabled with DEBUG_TOOL_EXT, if a debug tool is active in the current GL context TRUE will be returned, in all other cases FALSE will be returned. If the DEBUG_TOOL_EXT query returns TRUE two further queries are available - DEBUG_TOOL_NAME_EXT and DEBUG_TOOL_PURPOSE_EXT. If DEBUG_TOOL_EXT returns FALSE, then these two queries will return default values of an empty string and 0 respectively. Calling GetString with a name of DEBUG_TOOL_NAME_EXT will return an ASCII string containing the name of the debug tool currently active on the GL context. Calling GetIntegerv with a pname of DEBUG_TOOL_PURPOSE_EXT will return a bitfield containing the purpose of the debug tool currently active on the GL context: - If DEBUG_TOOL_FRAME_CAPTURE_BIT is set then the debug tool is taking single-frame captures of the application's GL calls, for later replay and analysis. - If DEBUG_TOOL_TRACE_CAPTURE_BIT is set then the debug tool is recording a continuous stream of all GL calls made by the application, for later replay and analysis. - If DEBUG_TOOL_API_CALL_LOG_BIT is set then the debug tool is recording a stream of all GL calls made by the application, however in a simple format such as text which is intended solely for reading, not replay and analysis. - If DEBUG_TOOL_PROFILING_BIT is set then the debug tool is performing some live profiling and performance analysis as the application is running. - If DEBUG_TOOL_VALIDATION_BIT is set then the debug tool is doing additional and verbose error checking and validation to notify the application developer of any problems or potential problems. This bitfield means application developers do not have to know in advance the purpose of debug tools from their names, and can disambiguate if a debug tools can serve multiple purposes." Additions to the AGL/EGL/GLX/WGL Specifications None GLX Protocol None Errors None New State Get Value Type Get Command Initial Value Description Sec Attrib ------------------------ ---- ----------- ------------- -------------------- ----- ------- DEBUG_TOOL_EXT B IsEnabled FALSE Is a debug tool 20.10 - currently present DEBUG_TOOL_NAME_EXT S GetString "" Name of the debug 20.10 - tool DEBUG_TOOL_PURPOSE_EXT Z+ GetIntegerv 0 The purpose(s) of 20.10 - the tool New Implementation Dependent State None Issues None Revision History Rev. Date Author Changes ---- ---------- --------- ------------------------------------------ 1 2015-04-20 baldurk Initial draft.