15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci KHR_no_error 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_KHR_no_error 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContributors 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Maurice Ribble 125bd8deadSopenharmony_ci Dominik Witczak 135bd8deadSopenharmony_ci Christophe Riccio 145bd8deadSopenharmony_ci Piers Daniell 155bd8deadSopenharmony_ci Jon Leech 165bd8deadSopenharmony_ci James Jones 175bd8deadSopenharmony_ci Daniel Kartch 185bd8deadSopenharmony_ci Steve Hill 195bd8deadSopenharmony_ci Jan-Harald Fredriksen 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciContact 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci Maurice Ribble (mribble 'at' qti.qualcomm.com) 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ciNotice 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ci Copyright (c) 2012-2014 The Khronos Group Inc. Copyright terms at 285bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ciSpecification Update Policy 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 335bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL and OpenGL ES Working Groups. For 345bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 355bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 365bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 375bd8deadSopenharmony_ci described in more detail at 385bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciStatus 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci Complete. 435bd8deadSopenharmony_ci Approved by the Khronos Board of Promoters on May 8, 2015. 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ciVersion 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci Version 6, February 25, 2015 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ciNumber 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci ARB Extension #175 525bd8deadSopenharmony_ci OpenGL ES Extension #243 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ciDependencies 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ci Requires OpenGL ES 2.0 or OpenGL 2.0. 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ci Written against the OpenGL ES 3.1 specification. 595bd8deadSopenharmony_ci 605bd8deadSopenharmony_ci Interacts with EGL_KHR_create_context_no_error (or equivalent) extension. 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ci CONTEXT_FLAG_NO_ERROR_BIT_KHR is only supported if the OpenGL version has 635bd8deadSopenharmony_ci support for context flags (as defined in the OpenGL 4.5 core spec) or an 645bd8deadSopenharmony_ci extension supporting equivalent functionality is exposed. 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ciOverview 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci With this extension enabled any behavior that generates a GL error will 695bd8deadSopenharmony_ci have undefined behavior. The reason this extension exists is performance 705bd8deadSopenharmony_ci can be increased and power usage decreased. When this mode is used, a GL 715bd8deadSopenharmony_ci driver can have undefined behavior where it would have generated a GL error 725bd8deadSopenharmony_ci without this extension. This could include application termination. In 735bd8deadSopenharmony_ci general this extension should be used after you have verified all the GL 745bd8deadSopenharmony_ci errors are removed, and an application is not the kind that would check 755bd8deadSopenharmony_ci for GL errors and adjust behavior based on those errors. 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ciNew Procedures and Functions 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ci None 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ciNew Tokens 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ciAdditions to the OpenGL ES Specification 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci Add the following to the end of section 2.3.1 "Errors": 885bd8deadSopenharmony_ci 895bd8deadSopenharmony_ci If this context was created with the no error mode enabled then any place 905bd8deadSopenharmony_ci where the driver would have generated an error instead has undefined 915bd8deadSopenharmony_ci behavior. This could include application termination. All calls to 925bd8deadSopenharmony_ci GetError will return NO_ERROR or OUT_OF_MEMORY. OUT_OF_MEMORY 935bd8deadSopenharmony_ci errors are a special case because they already allow for undefined behavior 945bd8deadSopenharmony_ci and are more difficult for application developers to predict than other 955bd8deadSopenharmony_ci errors. This extension allows OUT_OF_MEMORY errors to be delayed, which 965bd8deadSopenharmony_ci can be useful for optimizing multithreaded drivers, but eventually the 975bd8deadSopenharmony_ci OUT_OF_MEMORY error should be reported if an implementation would have 985bd8deadSopenharmony_ci reported this error. Since behavior of OUT_OF_MEMORY errors are undefined 995bd8deadSopenharmony_ci there is some implementation flexibility here. However, this behavior may 1005bd8deadSopenharmony_ci provide useful information on some implementations that do report 1015bd8deadSopenharmony_ci OUT_OF_MEMORY without crashing. 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci Add the following in the section that describes CONTEXT_FLAGS: 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ci If CONTEXT_FLAG_NO_ERROR_BIT_KHR is set in CONTEXT_FLAGS, then no error 1065bd8deadSopenharmony_ci behavior is enabled for this context. 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ciErrors 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci None 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ciNew State 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci None 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ciConformance Tests 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci TBD 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ciIssues 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci (1) How does this extension interact with KHR_robustness and debug contexts? 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ci RESOLVED: The EGL/WGL/GLX layers should prevent these features from being 1255bd8deadSopenharmony_ci enabled at the same time. However, if they are somehow enabled at the same 1265bd8deadSopenharmony_ci time this extension should be ignored. 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci (2) Can we provide a guarantee bad usage of this API won't affect other apps 1295bd8deadSopenharmony_ci that are running? This implies (but perhaps is not limited to) the risk of 1305bd8deadSopenharmony_ci resource leaks (eg. If I use incorrect coordinates when executing load ops on 1315bd8deadSopenharmony_ci images, am I guaranteed such ops will return the spec-guaranteed values or 1325bd8deadSopenharmony_ci can I accidentally read someone else's memory?) and crashing other apps if I 1335bd8deadSopenharmony_ci do horrendous stuff with the API. 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci RESOLVED: GL already allows passing in invalid pointers in some calls that 1365bd8deadSopenharmony_ci read or write to memory outside this apps process space. Many drivers/OS 1375bd8deadSopenharmony_ci models today offer protection from one process accessing memory from another 1385bd8deadSopenharmony_ci process. If you have that sort of protection before this extension then using 1395bd8deadSopenharmony_ci this extension does not remove such protections. 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci To put it another way this should not turn off kernel level or hardware level 1425bd8deadSopenharmony_ci protections. 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci (3) Should glGetError() always return NO_ERROR or have undefined results? 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci RESOLVED: It should for all errors except OUT_OF_MEMORY. For OUT_OF_MEMORY 1475bd8deadSopenharmony_ci errors the error may be delayed to allow more optimization in multithreaded 1485bd8deadSopenharmony_ci drivers, but if a driver would typically not crash and return OUT_OF_MEMORY 1495bd8deadSopenharmony_ci then it should eventually return OUT_OF_MEMORY in this mode. Since 1505bd8deadSopenharmony_ci OUT_OF_MEMORY errors have undefined behavior this can't really be enforced. 1515bd8deadSopenharmony_ci The reason OUT_OF_MEMORY errors aren't just converted to NO_ERROR like other 1525bd8deadSopenharmony_ci errors is because some implementations don't crash on OUT_OF_MEMORY errors 1535bd8deadSopenharmony_ci and apps can't easily predict when OUT_OF_MEMORY errors will happen so on 1545bd8deadSopenharmony_ci these implementations apps might want to check for OUT_OF_MEMORY errors at 1555bd8deadSopenharmony_ci certain points to see if things have gone very badly and then decide to do 1565bd8deadSopenharmony_ci something else if they see an OUT_OF_MEMORY error. 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci (4) Should we add something similar for CheckFramebufferStatus()? 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci RESOLVED: NO. It is unclear what the gain of this would be, and this is 1615bd8deadSopenharmony_ci vendor specific behavior. The same is true for ValidateProgram and 1625bd8deadSopenharmony_ci ValidateProgramPipeline. Also these features aren't as frequent as other GL 1635bd8deadSopenharmony_ci calls so the gains from optimizing these would be much smaller. 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci (5) Should there be a CONTEXT_FLAG for this behavior? 1665bd8deadSopenharmony_ci 1675bd8deadSopenharmony_ci RESOLVED: If CONTEXT_FLAGS are supported in the version of OpenGL being used 1685bd8deadSopenharmony_ci or with an extension then yes. 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ciRevision History 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci Rev. Date Author Changes 1735bd8deadSopenharmony_ci ---- ------------ --------- ---------------------------------------- 1745bd8deadSopenharmony_ci 1 Jan 28, 2015 ribble Initial version 1755bd8deadSopenharmony_ci 2 Jan 29, 2015 ribble Added issues list 1765bd8deadSopenharmony_ci 3 Jan 30, 2015 ribble Split into separate GL and EGL extensions 1775bd8deadSopenharmony_ci 4 Feb 18, 2015 ribble Add special OOM error case and cleanup 1785bd8deadSopenharmony_ci 5 Feb 23, 2015 ribble Add CONTEXT_FLAG issue 1795bd8deadSopenharmony_ci 6 Feb 25, 2015 ribble Spec cleanup 180