15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci GREMEDY_string_marker 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_GREMEDY_string_marker 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContributors 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Dirk Reiners 125bd8deadSopenharmony_ci Yaki Tebeka 135bd8deadSopenharmony_ci 145bd8deadSopenharmony_ciContact 155bd8deadSopenharmony_ci 165bd8deadSopenharmony_ci Dirk Reiners, Iowa State University (dreiners 'at' iastate.edu) 175bd8deadSopenharmony_ci Yaki Tebeka, Graphic Remedy (yaki 'at' gremedy.com) 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ciStatus 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ci Implemented by gDEBugger (Version 1.2.1 or later) 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciVersion 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci Last Modified Date: October 16, 2007 265bd8deadSopenharmony_ci Author Revision: 1.4 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ciNumber 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci 311 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciDependencies 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci OpenGL 1.0 is required. 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ci The extension is written against the OpenGL 1.5 Specification. 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ciOverview 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci This extension defines a mechanism to insert textual markers into 415bd8deadSopenharmony_ci the OpenGL stream. 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci When debugging or profiling an OpenGL application some of the most 445bd8deadSopenharmony_ci important tools are stream loggers, which just output a list of the 455bd8deadSopenharmony_ci called OpenGL commands, and profilers, which show at which points 465bd8deadSopenharmony_ci the pipeline is bottlenecked for a given part of the frame. The 475bd8deadSopenharmony_ci problem in using these is that there is a definite loss of 485bd8deadSopenharmony_ci information between the application and the used debugger/profiler. 495bd8deadSopenharmony_ci The application generally has a pretty good idea what is rendered 505bd8deadSopenharmony_ci when (e.g. rendering background, landscape, building, players, 515bd8deadSopenharmony_ci particle effects, bullets etc.), but the debugger/profiler only 525bd8deadSopenharmony_ci sees the OpenGL stream. To analyze the stream developers have to 535bd8deadSopenharmony_ci guess what is done when by following the program code and the log 545bd8deadSopenharmony_ci output in parallel, which can get difficult for systems that 555bd8deadSopenharmony_ci restructure their internal pipeline or do lazy changes. 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci This extension is really only useful for these debuggers and 585bd8deadSopenharmony_ci profilers, and not for actual drivers. In fact, it is not expected 595bd8deadSopenharmony_ci that any standard driver would ever implement this extension. The 605bd8deadSopenharmony_ci main point of having this extension is to allow applications to have a 615bd8deadSopenharmony_ci clean way of accessing this functionality only when they are run 625bd8deadSopenharmony_ci under the control of a debugger/profiler, without having to 635bd8deadSopenharmony_ci recompile or change the application source code. 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ciIP Status 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci No known IP claims 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ciIssues 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci (1) Should the extension use \0-terminated strings to simplify use? 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci RESOLVED: yes. 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci This extension follows the latest precedent for strings, which is the ShaderSource(). 775bd8deadSopenharmony_ci It uses strings that are given as a list of ubytes with explicit length. However, If 785bd8deadSopenharmony_ci lengths is 0, then the string is assumed to be null-terminated. 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci (2) Should it be legal to call this inside Begin/End? 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci RESOLVED: no. 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci The benefit is questionable, and it would probably add 865bd8deadSopenharmony_ci overhead to a very critical path. 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ci (3) Should this be supported by GLX? 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci UNRESOLVED 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci Not strictly necessary, as most debugging is done locally. It would 935bd8deadSopenharmony_ci be cleaner, but I don't see a case for the effort. 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ciNew Procedures and Functions 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci void StringMarkerGREMEDY(sizei len, const void *string); 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ciNew Types 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ci None 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ciNew Tokens 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci None 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 1.5 Specification 1095bd8deadSopenharmony_ci(OpenGL Operation) 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci None 1125bd8deadSopenharmony_ci 1135bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 1.5 Specification (Rasterization) 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci None 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 1.5 Specification (Per-Fragment 1185bd8deadSopenharmony_ciOperations and the Frame Buffer) 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ci None 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 1.5 Specification 1235bd8deadSopenharmony_ci(Special Functions) 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci Add section 5.7 on page 212 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci 5.7 Markers 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci The command 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci void StringMarkerGREMEDY(sizei len, const void *string); 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci can be used to insert arbitrary marker strings into the command 1345bd8deadSopenharmony_ci stream that can be recorded by appropriate debugging tools / profiling tools / 1355bd8deadSopenharmony_ci drivers. They have no influence on the rendered image or the OpenGL state. 1365bd8deadSopenharmony_ci <string> is a pointer to the array of bytes representing the marker being 1375bd8deadSopenharmony_ci inserted, which need not be null-terminated. The length of the array is given 1385bd8deadSopenharmony_ci by <len>. If <string> is null-terminated, <len> should not include the terminator. 1395bd8deadSopenharmony_ci If lengths is 0, then the string is assumed to be null-terminated. 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 1.5 Specification (State and State 1425bd8deadSopenharmony_ciRequests) 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci None 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL 1.5 Specification (Invariance) 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ci None 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ciAdditions to the AGL/EGL/GLX/WGL Specifications 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ci None 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ciGLX Protocol 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ci None 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ciDependencies on EXT_extension_name 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci None 1615bd8deadSopenharmony_ci 1625bd8deadSopenharmony_ciErrors 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if any of the commands 1655bd8deadSopenharmony_ci defined in this extension is executed between the execution of Begin 1665bd8deadSopenharmony_ci and the corresponding execution of End. 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ciNew State 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ci None 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ciNew Implementation Dependent State 1735bd8deadSopenharmony_ci 1745bd8deadSopenharmony_ci None 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ciSample Code 1775bd8deadSopenharmony_ci 1785bd8deadSopenharmony_ci None 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ciRevision History 1815bd8deadSopenharmony_ci 1825bd8deadSopenharmony_ci 1.4, 10/16/07 yt: - Minor text changes. 1835bd8deadSopenharmony_ci 1.3, 06/08/05 yt: - Enable the use of \0-terminated strings by specifying 1845bd8deadSopenharmony_ci a 0 string length. 1855bd8deadSopenharmony_ci 1.2, 02/01/05 dr: - Change the extension Status 1865bd8deadSopenharmony_ci - Change the name of the extension 1875bd8deadSopenharmony_ci 1.1, 01/20/05 dr: (Thanks to Yaki Tebeka for suggestions!) 1885bd8deadSopenharmony_ci - Switched to programString style 1895bd8deadSopenharmony_ci - renamed to marker_string 1905bd8deadSopenharmony_ci 1.0, 01/17/05 dr: - Initial revision 191