1Name 2 3 ANGLE_program_binary_readiness_query 4 5Name Strings 6 7 GL_ANGLE_program_binary_readiness_query 8 9Contributors 10 11 Shahbaz Youssefi, Google 12 13Contact 14 15 Shahbaz Youssefi (syoussefi 'at' google.com) 16 17Notice 18 19 Copyright (c) 2024 The Khronos Group Inc. Copyright terms at 20 http://www.khronos.org/registry/speccopyright.html 21 22Status 23 24 Draft 25 26Version 27 28 Version 1, April 9, 2024 29 30Number 31 32 OpenGL ES Extension #?? 33 34Dependencies 35 36 Requires OpenGL ES 2.0 37 38 Written against the OpenGL ES 2.0 specification. 39 40Overview 41 42 After a program is linked, its binary can be queried by a call to 43 GetProgramBinary. In ANGLE, binary data may not necessarily be readily 44 available after link, for example because post-link tasks are filling in 45 caches that make the binary more useful. Calling GetProgramBinary in 46 such cases can lead to a CPU wait. 47 48 Ideally, applications should query the program binary after having used the 49 program with all graphics states it may be used in during the lifetime of 50 the application (often, that is after one frame). In that case, any binary 51 that may be generated and cached due to the state combinations is 52 associated with program's binary, making the next run of the application 53 fully hit the caches. 54 55 Nevertheless, this extension provides a query for the application to know 56 when ANGLE's best-guess binaries are cached and the program binary is ready 57 for retrieval. As long as this query returns FALSE, the application should 58 defer calling GetProgramBinary, or GetProgramiv with PROGRAM_BINARY_LENGTH 59 to avoid getting blocked on the CPU. 60 61New Procedures and Functions 62 63 None 64 65New Tokens 66 67 Accepted by the <pname> parameters of GetProgramiv: 68 69 PROGRAM_BINARY_READY_ANGLE 0x96BE 70 71Additions to the OpenGL ES Specification 72 73 Append to paragraph 8 of section 6.1.8 "Shader and Program Queries" 74 (description of GetProgramiv): 75 76 If pname is PROGRAM_BINARY_READY_ANGLE, TRUE is returned if a call to 77 GetProgramBinary will not block, and FALSE is returned otherwise. 78 79New State 80 81 None 82 83Conformance Tests 84 85 TBD 86 87Issues 88 89 None 90 91Revision History 92 93 Rev. Date Author Changes 94 ---- ------------- --------- ---------------------------------------- 95 1 Apr 09, 2024 syoussefi Initial version 96