Path: blob/main_old/extensions/ANGLE_memory_size.txt
1693 views
Name12ANGLE_memory_size34Name Strings56GL_ANGLE_memory_size78Contributors910Geoff Lang1112Contact1314Geoff Lang (geofflang 'at' google.com)1516Notice1718Copyright (c) 2018 The Khronos Group Inc. Copyright terms at19http://www.khronos.org/registry/speccopyright.html2021Status2223Draft2425Version2627Version 1, November 1, 20182829Number3031OpenGL ES Extension #??3233Dependencies3435Requires OpenGL ES 2.03637Written against the OpenGL ES 3.1 specification.3839Overview4041This extension allows the user to query the estimated memory internally42allocated for an OpenGL resource. This information can be useful for43determining which resources should be deleted under memory pressure.4445New Procedures and Functions4647None4849New Tokens5051Accepted by the <name> parameter of GetTexParameter*,52GetTexLevelParameter*, GetBufferParameter* and GetRenderbufferParameter*53functions:5455GL_MEMORY_SIZE_ANGLE 0x93AD5657Additions to the OpenGL ES 3.1 Specification5859Add an entry to Table 6.2, Buffer object parameters and their values:6061Name Type Initial Value Legal Values62----------------- ----- ------------- ------------------------63MEMORY_SIZE_ANGLE int64 0 any non-negative integer6465Change the last sentence of the first paragraph of section 8.10.2,66Texture Parameter Queries:6768- pname must be IMAGE_FORMAT_COMPATIBILITY_TYPE, TEXTURE_-69- IMMUTABLE_FORMAT, TEXTURE_IMMUTABLE_LEVELS, or one of the symbolic70- values in table 8.20.71+ pname must be IMAGE_FORMAT_COMPATIBILITY_TYPE, TEXTURE_-72+ IMMUTABLE_FORMAT, TEXTURE_IMMUTABLE_LEVELS, MEMORY_SIZE_ANGLE,73+ or one of the symbolic values in table 8.20.7475Add to the end of the fifth paragraph of section 8.10.3, Texture Level76Parameter Queries:7778+ queries of pname MEMORY_SIZE_ANGLE return the estimated number of bytes79+ allocated for level of the texture bound to target.8081Add a new paragraph after paragraph 3 in section 9.2.6, Renderbuffer82Object Queries:8384If pname is MEMORY_SIZE_ANGLE, then params will contain the esimated85number of bytes allocated for the renderbuffer bound to target.8687New State8889Add to Table 20.4: Buffer Object State9091Get value Type Get Cmd Min Value Description Sec.92------------------- ---- --------------------- --------- ------------------------- ----93MEMORY_SIZE_ANGLE Z+ GetBufferParameter64v - Estimated bytes allocated 69495Add to Table 20.9: Textures (state per texture object)9697Get value Type Get Cmd Min Value Description Sec.98------------------- ---- -------------------- --------- ------------------------- -----99MEMORY_SIZE_ANGLE Z+ GetTexParameter - Estimated bytes allocated 6.1.3100GetTexLevelParameter101102Add to Table 20.16: Renderbuffer (state per renderbuffer object)103104Get value Type Get Cmd Min Value Description Sec.105------------------- ---- -------------------------- --------- ------------------------- -----106MEMORY_SIZE_ANGLE Z+ GetRenderbufferParameteriv - Estimated bytes allocated 9.2.6107108109Interactions with the OpenGL ES 2.0 and 3.0 specifications:110111Remove all references to GetTexLevelParameter and replace references to112GetBufferParameter64v with GetBufferParameteriv.113114Issues115116(1) Could the estimated number of bytes be specified more tightly to an117upper or lower bound?118119RESOLVED: Implementations should attempt to return the lower bound on120the allocated memory if exact numbers are not known. The lower bound is121the most actionable value for making decisions when caching.122123Revision History124125Rev. Date Author Changes126---- ------------- --------- ----------------------------------------1271 Nov 1, 2018 geofflang Initial version128129130