Edit

kc3-lang/angle/extensions/ANGLE_memory_size.txt

Branch :

  • Show log

    Commit

  • Author : Geoff Lang
    Date : 2018-11-01 12:44:39
    Hash : 1590fcc4
    Message : Add a spec and tests for GL_ANGLE_memory_size. Change the data type of buffer memory sizes to 64 bit integers. BUG=892288 Change-Id: I10e07b86f2ccc0cb61c8d7ee0d439e00d5eb8d3a Reviewed-on: https://chromium-review.googlesource.com/c/1312244 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>

  • extensions/ANGLE_memory_size.txt
  • Name
    
        ANGLE_memory_size
    
    Name Strings
    
        GL_ANGLE_memory_size
    
    Contributors
    
        Geoff Lang
    
    Contact
    
        Geoff Lang (geofflang 'at' google.com)
    
    Notice
    
        Copyright (c) 2018 The Khronos Group Inc. Copyright terms at
            http://www.khronos.org/registry/speccopyright.html
    
    Status
    
        Draft
    
    Version
    
        Version 1, November 1, 2018
    
    Number
    
        OpenGL ES Extension #??
    
    Dependencies
    
        Requires OpenGL ES 2.0
    
        Written against the OpenGL ES 3.1 specification.
    
    Overview
    
        This extension allows the user to query the estimated memory internally
        allocated for an OpenGL resource. This information can be useful for
        determining which resources should be deleted under memory pressure.
    
    New Procedures and Functions
    
        None
    
    New Tokens
    
        Accepted by the <name> parameter of GetTexParameter*,
        GetTexLevelParameter*, GetBufferParameter* and GetRenderbufferParameter*
        functions:
    
            GL_MEMORY_SIZE_ANGLE              0x93AD
    
    Additions to the OpenGL ES 3.1 Specification
    
        Add an entry to Table 6.2, Buffer object parameters and their values:
    
        Name              Type  Initial Value Legal Values
        ----------------- ----- ------------- ------------------------
        MEMORY_SIZE_ANGLE int64 0             any non-negative integer
    
        Change the last sentence of the first paragraph of section 8.10.2,
        Texture Parameter Queries:
    
        - pname must be IMAGE_FORMAT_COMPATIBILITY_TYPE, TEXTURE_-
        - IMMUTABLE_FORMAT, TEXTURE_IMMUTABLE_LEVELS, or one of the symbolic
        - values in table 8.20.
        + pname must be IMAGE_FORMAT_COMPATIBILITY_TYPE, TEXTURE_-
        + IMMUTABLE_FORMAT, TEXTURE_IMMUTABLE_LEVELS, MEMORY_SIZE_ANGLE,
        + or one of the symbolic values in table 8.20.
    
        Add to the end of the fifth paragraph of section 8.10.3, Texture Level
        Parameter Queries:
    
        + queries of pname MEMORY_SIZE_ANGLE return the estimated number of bytes
        + allocated for level of the texture bound to target.
    
        Add a new paragraph after paragraph 3 in section 9.2.6, Renderbuffer
        Object Queries:
    
        If pname is MEMORY_SIZE_ANGLE, then params will contain the esimated
        number of bytes allocated for the renderbuffer bound to target.
    
    New State
    
        Add to Table 20.4: Buffer Object State
    
        Get value           Type Get Cmd                Min Value Description               Sec.
        ------------------- ---- ---------------------  --------- ------------------------- ----
        MEMORY_SIZE_ANGLE   Z+   GetBufferParameter64v  -         Estimated bytes allocated 6
    
        Add to Table 20.9: Textures (state per texture object)
    
        Get value           Type Get Cmd               Min Value Description               Sec.
        ------------------- ---- --------------------  --------- ------------------------- -----
        MEMORY_SIZE_ANGLE   Z+   GetTexParameter       -         Estimated bytes allocated 6.1.3
                                 GetTexLevelParameter
    
        Add to Table 20.16: Renderbuffer (state per renderbuffer object)
    
        Get value           Type Get Cmd                     Min Value Description               Sec.
        ------------------- ---- --------------------------  --------- ------------------------- -----
        MEMORY_SIZE_ANGLE   Z+   GetRenderbufferParameteriv  -         Estimated bytes allocated 9.2.6
    
    
    Interactions with the OpenGL ES 2.0 and 3.0 specifications:
    
        Remove all references to GetTexLevelParameter and replace references to
        GetBufferParameter64v with GetBufferParameteriv.
    
    Issues
    
        (1) Could the estimated number of bytes be specified more tightly to an
            upper or lower bound?
    
            RESOLVED: Implementations should attempt to return the lower bound on
            the allocated memory if exact numbers are not known. The lower bound is
            the most actionable value for making decisions when caching.
    
    Revision History
    
        Rev.    Date         Author     Changes
        ----  -------------  ---------  ----------------------------------------
          1    Nov 1, 2018   geofflang  Initial version