15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    ARB_texture_query_levels
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_ARB_texture_query_levels
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Christophe Riccio, AMD (christophe.riccio'at'amd.com)
125bd8deadSopenharmony_ci    
135bd8deadSopenharmony_ciContributors  
145bd8deadSopenharmony_ci    
155bd8deadSopenharmony_ci    Pat Brown, NVIDIA
165bd8deadSopenharmony_ci    Bruce Merry
175bd8deadSopenharmony_ci    
185bd8deadSopenharmony_ciNotice
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ci    Copyright (c) 2012-2013 The Khronos Group Inc. Copyright terms at
215bd8deadSopenharmony_ci        http://www.khronos.org/registry/speccopyright.html
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ciSpecification Update Policy
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci    Khronos-approved extension specifications are updated in response to
265bd8deadSopenharmony_ci    issues and bugs prioritized by the Khronos OpenGL Working Group. For
275bd8deadSopenharmony_ci    extensions which have been promoted to a core Specification, fixes will
285bd8deadSopenharmony_ci    first appear in the latest version of that core Specification, and will
295bd8deadSopenharmony_ci    eventually be backported to the extension document. This policy is
305bd8deadSopenharmony_ci    described in more detail at
315bd8deadSopenharmony_ci        https://www.khronos.org/registry/OpenGL/docs/update_policy.php
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ciStatus
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ci    Complete.
365bd8deadSopenharmony_ci    Approved by the ARB on 2012/06/12.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ciVersion
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci    Last Modified Date: June 6, 2012
415bd8deadSopenharmony_ci    Revision: 10
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ciNumber
445bd8deadSopenharmony_ci
455bd8deadSopenharmony_ci    ARB Extension #140
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ciDependencies
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ci    OpenGL 3.0 is required.
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    OpenGL Shading Language 1.30 is required
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    This extension is written against the OpenGL 4.2 specification and 
545bd8deadSopenharmony_ci    version 4.20 of the OpenGL Shading Language Specification.
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ciOverview
575bd8deadSopenharmony_ci
585bd8deadSopenharmony_ci    This extension provides a new set of texture functions
595bd8deadSopenharmony_ci    (textureQueryLevels) in the OpenGL Shading Language that exposes the
605bd8deadSopenharmony_ci    number of accessible mipmap levels in the texture associated with a GLSL
615bd8deadSopenharmony_ci    sampler variable.  The set of accessible levels includes all the levels of
625bd8deadSopenharmony_ci    the texture defined either through TexImage*, TexStorage*, or TextureView*
635bd8deadSopenharmony_ci    (ARB_texture_view) APIs that are not below the TEXTURE_BASE_LEVEL or above
645bd8deadSopenharmony_ci    the TEXTURE_MAX_LEVEL parameters.  For textures defined with TexImage*,
655bd8deadSopenharmony_ci    the set of resident levels is somewhat implementation-dependent.  For
665bd8deadSopenharmony_ci    fully defined results, applications should use TexStorage*/TextureView
675bd8deadSopenharmony_ci    unless the texture has a full mipmap chain and is used with a mipmapped
685bd8deadSopenharmony_ci    minification filter.
695bd8deadSopenharmony_ci
705bd8deadSopenharmony_ci    These functions means that shaders are not required to manually recompute,
715bd8deadSopenharmony_ci    approximate, or maintain a uniform holding a pre-computed level count,
725bd8deadSopenharmony_ci    since the true level count is already available to the
735bd8deadSopenharmony_ci    implementation. This value can be used to avoid black or leaking pixel
745bd8deadSopenharmony_ci    artifacts for rendering methods which are using texture images as memory
755bd8deadSopenharmony_ci    pages (eg: virtual textures); methods that can't only rely on the fixed
765bd8deadSopenharmony_ci    pipeline texture functions which take advantage of TEXTURE_MAX_LEVEL for
775bd8deadSopenharmony_ci    their sampling.
785bd8deadSopenharmony_ci
795bd8deadSopenharmony_ciNew Procedures and Functions
805bd8deadSopenharmony_ci
815bd8deadSopenharmony_ci    None.
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ciNew Tokens
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ci    None.
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 4.2 (Core Profile) Specification
885bd8deadSopenharmony_ci(OpenGL Operation)
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ci    Modify Section 2.11.12, Shader Execution, p. 106
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ci    (retitle "Texture Size Query" sub-section, p. 109 to "Texture Queries")
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci    (modify the first paragraph of "Texture Queries", p. 109, renaming
955bd8deadSopenharmony_ci    "texture size" to "textureSize()") The OpenGL Shading Language
965bd8deadSopenharmony_ci    textureSize() functions provide...
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ci    (add a new paragraph at the end of the now-renamed "Texture Queries"
995bd8deadSopenharmony_ci    section, p. 109)
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ci    The OpenGL Shading Language textureQueryLevels() functions provide the
1025bd8deadSopenharmony_ci    ability to query the number of accessible mipmap levels in a texture
1035bd8deadSopenharmony_ci    object associated with a sampler uniform.  If the sampler is associated
1045bd8deadSopenharmony_ci    with an immutable-format texture object (section 3.9.16), the value
1055bd8deadSopenharmony_ci    returned will be:
1065bd8deadSopenharmony_ci
1075bd8deadSopenharmony_ci      min(TEXTURE_IMMUTABLE_LEVELS - 1, TEXTURE_MAX_LEVEL) - 
1085bd8deadSopenharmony_ci        TEXTURE_BASE_LEVEL + 1
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ci    where TEXTURE_IMMUTABLE_LEVELS gives the number of levels present in the
1115bd8deadSopenharmony_ci    immutable-format texture and TEXTURE_BASE_LEVEL and TEXTURE_MAX_LEVEL are
1125bd8deadSopenharmony_ci    the values of these texture parameters (section 3.9.8).  Otherwise, the
1135bd8deadSopenharmony_ci    value returned will be an implementation-dependent value between zero and
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci      q - TEXTURE_BASE_LEVEL + 1
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ci    where <q> is the maximum mipmap level specified in the "Mipmapping"
1185bd8deadSopenharmony_ci    section of section 3.9.11.  The value returned in this case must satisfy
1195bd8deadSopenharmony_ci    the following constraints:
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ci      - If all levels of the texture have zero size, zero must be returned.
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ci      - If the texture is complete, a non-zero value must be returned.
1245bd8deadSopenharmony_ci
1255bd8deadSopenharmony_ci      - If the texture object is complete and is accessed with a minification
1265bd8deadSopenharmony_ci        filter requiring mipmaps, q - TEXTURE_BASE_LEVEL + 1 must be returned.
1275bd8deadSopenharmony_ci
1285bd8deadSopenharmony_ci
1295bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 4.2 (Core Profile) Specification
1305bd8deadSopenharmony_ci(Rasterization)
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci    None.
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 4.2 (Core Profile) Specification
1355bd8deadSopenharmony_ci(Per-Fragment Operations and the Frame Buffer)
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ci    None.
1385bd8deadSopenharmony_ci
1395bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 4.2 (Core Profile) Specification
1405bd8deadSopenharmony_ci(Special Functions)
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci    None.
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 4.2 (Core Profile) Specification
1455bd8deadSopenharmony_ci(State and State Requests)
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ci    None.
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ciErrors
1505bd8deadSopenharmony_ci
1515bd8deadSopenharmony_ci    None.
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ciNew State
1545bd8deadSopenharmony_ci
1555bd8deadSopenharmony_ci    None.
1565bd8deadSopenharmony_ci
1575bd8deadSopenharmony_ciNew Implementation Dependent State
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ci    None.
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ciModifications to The OpenGL Shading Language Specification, Version 4.20.8
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ci    Including the following line in a shader can be used to control the
1645bd8deadSopenharmony_ci    language features described in this extension:
1655bd8deadSopenharmony_ci
1665bd8deadSopenharmony_ci      #extension GL_ARB_texture_query_levels
1675bd8deadSopenharmony_ci
1685bd8deadSopenharmony_ci    A new preprocessor #define is added to the OpenGL Shading Language:
1695bd8deadSopenharmony_ci
1705bd8deadSopenharmony_ci      #define GL_ARB_texture_query_levels 1
1715bd8deadSopenharmony_ci
1725bd8deadSopenharmony_ci    Add to section 8.9.1 "Texture Query Functions"
1735bd8deadSopenharmony_ci        
1745bd8deadSopenharmony_ci    Syntax:
1755bd8deadSopenharmony_ci
1765bd8deadSopenharmony_ci      int textureQueryLevels(gsampler1D sampler);
1775bd8deadSopenharmony_ci      int textureQueryLevels(gsampler2D sampler);
1785bd8deadSopenharmony_ci      int textureQueryLevels(gsampler3D sampler);
1795bd8deadSopenharmony_ci      int textureQueryLevels(gsamplerCube sampler);
1805bd8deadSopenharmony_ci      int textureQueryLevels(gsampler1DArray sampler);
1815bd8deadSopenharmony_ci      int textureQueryLevels(gsampler2DArray sampler);
1825bd8deadSopenharmony_ci      int textureQueryLevels(gsamplerCubeArray sampler);
1835bd8deadSopenharmony_ci      int textureQueryLevels(gsampler1DShadow sampler);
1845bd8deadSopenharmony_ci      int textureQueryLevels(gsampler2DShadow sampler);
1855bd8deadSopenharmony_ci      int textureQueryLevels(gsamplerCubeShadow sampler);
1865bd8deadSopenharmony_ci      int textureQueryLevels(gsampler1DArrayShadow sampler);
1875bd8deadSopenharmony_ci      int textureQueryLevels(gsampler2DArrayShadow sampler);
1885bd8deadSopenharmony_ci      int textureQueryLevels(gsamplerCubeArrayShadow sampler);
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ci    Description:
1915bd8deadSopenharmony_ci
1925bd8deadSopenharmony_ci      The textureQueryLevels functions return the number of mipmap levels
1935bd8deadSopenharmony_ci      accessible in the texture associated with <sampler>, as defined in the
1945bd8deadSopenharmony_ci      OpenGL Specification.  The value zero will be returned if no texture or
1955bd8deadSopenharmony_ci      an incomplete texture is associated with <sampler>.
1965bd8deadSopenharmony_ci      textureQueryLevels() is available in all shader stages.
1975bd8deadSopenharmony_ci
1985bd8deadSopenharmony_ciConformance Tests
1995bd8deadSopenharmony_ci
2005bd8deadSopenharmony_ci    <TBD>
2015bd8deadSopenharmony_ci
2025bd8deadSopenharmony_ciIssues
2035bd8deadSopenharmony_ci
2045bd8deadSopenharmony_ci    (1) Is the value returned by textureQueryLevels clamped by the number of 
2055bd8deadSopenharmony_ci        levels present in a texture? (bug 7941)
2065bd8deadSopenharmony_ci
2075bd8deadSopenharmony_ci      RESOLVED:  Yes, the set of accessible levels needs to be computed by
2085bd8deadSopenharmony_ci      intersecting the set of levels present in the texture, with the range of
2095bd8deadSopenharmony_ci      levels between TEXTURE_BASE_LEVEL and TEXTURE_MAX_LEVEL.
2105bd8deadSopenharmony_ci
2115bd8deadSopenharmony_ci      The number of accessible texture levels will be the value
2125bd8deadSopenharmony_ci
2135bd8deadSopenharmony_ci         TEXTURE_MAX_LEVEL - TEXTURE_BASE_LEVEL + 1
2145bd8deadSopenharmony_ci
2155bd8deadSopenharmony_ci      if both parameters are set to accurately reflect the set of resident
2165bd8deadSopenharmony_ci      levels.  However, it isn't necessary to set either texture parameter,
2175bd8deadSopenharmony_ci      and the default value for TEXTURE_MAX_LEVEL (1000) doesn't accurately
2185bd8deadSopenharmony_ci      reflect the total number of levels.  As a result, the value returned
2195bd8deadSopenharmony_ci      needs to intersect the range between the base and maximum levels with
2205bd8deadSopenharmony_ci      the actual set of levels present in a texture.
2215bd8deadSopenharmony_ci
2225bd8deadSopenharmony_ci      For immutable format textures (from OpenGL 4.2 and ARB_texture_storage),
2235bd8deadSopenharmony_ci      the set of present levels is well-defined, taken from the parameter
2245bd8deadSopenharmony_ci      <levels> of TextureStorage*D.  If a texture is created immutable then we
2255bd8deadSopenharmony_ci      could clamp the value returned by textureQueryLevels to the number of
2265bd8deadSopenharmony_ci      levels.  For other textures, the set of levels present and resident in
2275bd8deadSopenharmony_ci      the texture is less well-defined since levels can be added or removed at
2285bd8deadSopenharmony_ci      random.
2295bd8deadSopenharmony_ci       
2305bd8deadSopenharmony_ci    (2) What value is returned for textures that have an incomplete set of  
2315bd8deadSopenharmony_ci        mipmaps?  
2325bd8deadSopenharmony_ci
2335bd8deadSopenharmony_ci      RESOLVED:  The values returned in this case are largely
2345bd8deadSopenharmony_ci      implementation-dependent.  Textures have two different notions of
2355bd8deadSopenharmony_ci      completeness:
2365bd8deadSopenharmony_ci
2375bd8deadSopenharmony_ci      - A texture is "mipmap complete" if it has a full set of mipmaps, from
2385bd8deadSopenharmony_ci        the base level down to the smallest (1x1) level appropriate for the
2395bd8deadSopenharmony_ci        base level.  If a texture sets TEXTURE_MAX_LEVEL, any levels smaller
2405bd8deadSopenharmony_ci        than the size of the maximum level need not be present for a texture
2415bd8deadSopenharmony_ci        to be mipmap complete.  Note that immutable format textures will
2425bd8deadSopenharmony_ci        always be considered mipmap complete.
2435bd8deadSopenharmony_ci
2445bd8deadSopenharmony_ci      - A texture that is not "complete" typically can not be used for texture
2455bd8deadSopenharmony_ci        mapping.  A texture that is not mipmap complete can still be
2465bd8deadSopenharmony_ci        considered complete, as long as it isn't used with a mipmapped
2475bd8deadSopenharmony_ci        minification filter.
2485bd8deadSopenharmony_ci      
2495bd8deadSopenharmony_ci      Immutable-format TexStorage* textures always specify a full set of
2505bd8deadSopenharmony_ci      mipmap levels and are always considered mipmap complete; however,
2515bd8deadSopenharmony_ci      applications can add (or delete) mipmap levels to TexImage* textures at
2525bd8deadSopenharmony_ci      arbitrary times.  
2535bd8deadSopenharmony_ci
2545bd8deadSopenharmony_ci      If the texture has some (but not all) of the mipmaps necessary to be
2555bd8deadSopenharmony_ci      mipmap complete, an implementation might choose to manage the texture in
2565bd8deadSopenharmony_ci      a number of different ways:
2575bd8deadSopenharmony_ci
2585bd8deadSopenharmony_ci        - don't allocate any texture memory (if the texture is incomplete)
2595bd8deadSopenharmony_ci
2605bd8deadSopenharmony_ci        - allocate memory for only the base level (which is the only one that
2615bd8deadSopenharmony_ci          can be accessed with a non-mipmapped minification filter)
2625bd8deadSopenharmony_ci
2635bd8deadSopenharmony_ci        - allocate memory for the subset of the full mipmap chain that is
2645bd8deadSopenharmony_ci          defined, even if some of these levels are inaccessible
2655bd8deadSopenharmony_ci
2665bd8deadSopenharmony_ci        - speculatively allocate memory for the entire mipmap chain
2675bd8deadSopenharmony_ci
2685bd8deadSopenharmony_ci      We specify the result to be implementation-dependent to (a) allow for
2695bd8deadSopenharmony_ci      implementations of this function that return the number of levels
2705bd8deadSopenharmony_ci      resident in the underlying texture memory allocation and (b) to not
2715bd8deadSopenharmony_ci      force implementation to change their memory management of TexImage*
2725bd8deadSopenharmony_ci      textures for this case.
2735bd8deadSopenharmony_ci
2745bd8deadSopenharmony_ci      We do require implementations to return a non-zero value for textures
2755bd8deadSopenharmony_ci      that are complete, even if they aren't mipmap complete.  For example, a
2765bd8deadSopenharmony_ci      TexImage* texture with only the base level is usable when used with a
2775bd8deadSopenharmony_ci      LINEAR minification filter and should have an allocation with at least
2785bd8deadSopenharmony_ci      one level present.
2795bd8deadSopenharmony_ci        
2805bd8deadSopenharmony_ci    (3) What values are returned by the built-in for textures that aren't
2815bd8deadSopenharmony_ci        complete or aren't defined at all?
2825bd8deadSopenharmony_ci        
2835bd8deadSopenharmony_ci      RESOLVED:  As with the mipmap-incomplete case, the value returned is
2845bd8deadSopenharmony_ci      largely implementation-dependent, even though the incomplete texture
2855bd8deadSopenharmony_ci      can't be used for texture mapping.
2865bd8deadSopenharmony_ci
2875bd8deadSopenharmony_ci      With separate sampler objects, it's worth noting that the same texture
2885bd8deadSopenharmony_ci      object may be considered complete when used in conjunction with one
2895bd8deadSopenharmony_ci      sampler object but might be incomplete when used with a different
2905bd8deadSopenharmony_ci      sampler object.  For example, a texture with only a single level defined
2915bd8deadSopenharmony_ci      will be complete when used with a minification filter of LINEAR, but not
2925bd8deadSopenharmony_ci      with LINEAR_MIPMAP_LINEAR.  We allow implementations to return zero in
2935bd8deadSopenharmony_ci      this case, but would also allow them to return non-zero values (possibly
2945bd8deadSopenharmony_ci      obtained because the texture object is actually usable in another
2955bd8deadSopenharmony_ci      texture image unit).
2965bd8deadSopenharmony_ci
2975bd8deadSopenharmony_ci      We do require implementations to return zero if the texture has no
2985bd8deadSopenharmony_ci      defined levels (the default state for a new texture object).
2995bd8deadSopenharmony_ci
3005bd8deadSopenharmony_ci      Note that in both the core and compatibility profiles of OpenGL 4.2, it
3015bd8deadSopenharmony_ci      doesn't appear to be possible to have a texture image unit with no
3025bd8deadSopenharmony_ci      texture bound.  glBindTexture(target,0) binds the "default texture" for
3035bd8deadSopenharmony_ci      <target>, not "no texture".  The default texture may have images defined
3045bd8deadSopenharmony_ci      if TexImage* is called when it is bound.  If these default textures were
3055bd8deadSopenharmony_ci      removed in a future version of OpenGL, textureQueryLevels() should
3065bd8deadSopenharmony_ci      return zero if the associated texture image unit has no texture bound.
3075bd8deadSopenharmony_ci
3085bd8deadSopenharmony_ci    (4) For non-immutable format textures, what happens if
3095bd8deadSopenharmony_ci        textureQueryLevels() is called for a texture that *is* mipmap complete
3105bd8deadSopenharmony_ci        but is not accessed with a mipmapped minification filter?
3115bd8deadSopenharmony_ci
3125bd8deadSopenharmony_ci      RESOLVED:  The value returned is implementation-dependent.
3135bd8deadSopenharmony_ci
3145bd8deadSopenharmony_ci      To get fully defined results with TexImage* textures, the texture should
3155bd8deadSopenharmony_ci      be mipmap complete and accessed with a mipmapped minification filter.
3165bd8deadSopenharmony_ci      In that case, the value returned is well-defined and must be consistent
3175bd8deadSopenharmony_ci      with an allocation holding the full mipmap chain.
3185bd8deadSopenharmony_ci
3195bd8deadSopenharmony_ci      The undefined behavior here permit implementations to defer the download
3205bd8deadSopenharmony_ci      of "extra" mipmap levels until they are actually required.  For textures
3215bd8deadSopenharmony_ci      without immutable formats, mipmap levels can be added or removed at any
3225bd8deadSopenharmony_ci      time and implementations may choose to modify the set of levels resident
3235bd8deadSopenharmony_ci      for a texture based on the minification filter.  Consider the following
3245bd8deadSopenharmony_ci      code sequence:
3255bd8deadSopenharmony_ci
3265bd8deadSopenharmony_ci        create level 0 of a 2D texture (256x256)
3275bd8deadSopenharmony_ci        set the texture's min filter to LINEAR
3285bd8deadSopenharmony_ci        (A) render using the texture
3295bd8deadSopenharmony_ci        create level 1 of a 2D texture (128x128) 
3305bd8deadSopenharmony_ci        (B) render using the texture
3315bd8deadSopenharmony_ci        create levels 2..8 of a 2D texture (64x64 down to 1x1)
3325bd8deadSopenharmony_ci        (C) render using the texture
3335bd8deadSopenharmony_ci        set the texture's min filter to LINEAR_MIPMAP_LINEAR
3345bd8deadSopenharmony_ci        (D) render using the texture
3355bd8deadSopenharmony_ci        set the texture's min filter to LINEAR
3365bd8deadSopenharmony_ci        (E) render using the texture
3375bd8deadSopenharmony_ci
3385bd8deadSopenharmony_ci      This texture will be complete each time rendering will be performed, but
3395bd8deadSopenharmony_ci      will be mipmap complete only for primitives (C), (D), and (E).  For
3405bd8deadSopenharmony_ci      primitives (A) and (B), only the 256x256 texture will be accessible.  An
3415bd8deadSopenharmony_ci      implementation might make the 128x128 level resident for (B), but it
3425bd8deadSopenharmony_ci      might defer this operation since the 128x128 level isn't actually needed
3435bd8deadSopenharmony_ci      and further mipmap level changes might occur.  For primitive (C), the
3445bd8deadSopenharmony_ci      texture is mipmap complete, but the non-zero mipmap levels still aren't
3455bd8deadSopenharmony_ci      needed.  For primitive (D), all nine levels need to be resident, and
3465bd8deadSopenharmony_ci      that's what textureQueryLevels() should return.  For primitive (E), it
3475bd8deadSopenharmony_ci      seems likely that implementations will keep all levels resident, even
3485bd8deadSopenharmony_ci      though only the base level is needed.  However, they could theoretically
3495bd8deadSopenharmony_ci      evict the non-base levels if required to free up texture memory.
3505bd8deadSopenharmony_ci
3515bd8deadSopenharmony_ciRevision History
3525bd8deadSopenharmony_ci
3535bd8deadSopenharmony_ci    Revision 10, 2012/06/06 (pbrown)
3545bd8deadSopenharmony_ci      - Mark issues (2) through (4) as resolved.
3555bd8deadSopenharmony_ci      - Add warnings in overview and issues about undefined values for
3565bd8deadSopenharmony_ci        TexImage* textures and recommending the use of a mipmapped
3575bd8deadSopenharmony_ci        minification filter for fully defined results.
3585bd8deadSopenharmony_ci
3595bd8deadSopenharmony_ci    Revision 9, 2012/06/01 (pbrown)
3605bd8deadSopenharmony_ci      - Update issues (1) through (4) to reflect edits from previous revisions
3615bd8deadSopenharmony_ci        of this spec.  Leaving issues (2) through (4) unresolved pending final
3625bd8deadSopenharmony_ci        approval of previous edits.
3635bd8deadSopenharmony_ci
3645bd8deadSopenharmony_ci    Revision 8, 2012/05/31 (pbrown)
3655bd8deadSopenharmony_ci      - (bug 7941) Update the language describing the values returned for
3665bd8deadSopenharmony_ci        TexImage* textures.  The value is implementation-dependent, but must
3675bd8deadSopenharmony_ci        be in the range 0..q-BASE_LEVEL+1, and must satisfy the following
3685bd8deadSopenharmony_ci        constraints:
3695bd8deadSopenharmony_ci          - fully undefined textures must return zero 
3705bd8deadSopenharmony_ci          - complete textures must return at least one
3715bd8deadSopenharmony_ci          - complete textures with a mipmapped min filter must return
3725bd8deadSopenharmony_ci            q-BASE_LEVEL+1 
3735bd8deadSopenharmony_ci
3745bd8deadSopenharmony_ci    Revision 7, 2012/05/17 (criccio)
3755bd8deadSopenharmony_ci      - Fix textureQueryLevels calculation for immutable texture. 
3765bd8deadSopenharmony_ci        min(TEXTURE_IMMUTABLE_LEVELS - 1, TEXTURE_MAX_LEVEL) instead of 
3775bd8deadSopenharmony_ci        min(TEXTURE_IMMUTABLE_LEVELS, TEXTURE_MAX_LEVEL)
3785bd8deadSopenharmony_ci
3795bd8deadSopenharmony_ci    Revision 6, 2012/05/16 (pbrown)
3805bd8deadSopenharmony_ci      - Add explicit language describing the set of values that will be
3815bd8deadSopenharmony_ci        returned for all the various cases (immutable format textures, mutable
3825bd8deadSopenharmony_ci        textures that are mipmap complete or not, incomplete or unbound
3835bd8deadSopenharmony_ci        textures).
3845bd8deadSopenharmony_ci      - Specify the level count to include only those levels between the base
3855bd8deadSopenharmony_ci        level and the maximum level.
3865bd8deadSopenharmony_ci      - Update the introduction.
3875bd8deadSopenharmony_ci      - Update the discussion for issues 1, 2, and 3.  
3885bd8deadSopenharmony_ci      - Add issue 4, describing what happens for mipmap complete textures that
3895bd8deadSopenharmony_ci        don't need to be (because they're used with non-mipmapped filters).
3905bd8deadSopenharmony_ci        Implementations are allowed but not required to treat the entire
3915bd8deadSopenharmony_ci        mipmap chain as resident.
3925bd8deadSopenharmony_ci
3935bd8deadSopenharmony_ci    Revision 5, 2012/04/30 (criccio)
3945bd8deadSopenharmony_ci      - Resolved issue 2 and 3
3955bd8deadSopenharmony_ci
3965bd8deadSopenharmony_ci    Revision 4, 2012/04/26 (criccio)
3975bd8deadSopenharmony_ci      - Resolved issue 1 for mutable texture
3985bd8deadSopenharmony_ci      - Added issue 2, 3 from Pat's comments
3995bd8deadSopenharmony_ci      
4005bd8deadSopenharmony_ci    Revision 3, 2012/03/15 (criccio)
4015bd8deadSopenharmony_ci      - Added issue
4025bd8deadSopenharmony_ci      
4035bd8deadSopenharmony_ci    Revision 2, 2011/11/01 (criccio)
4045bd8deadSopenharmony_ci      - Updated overview
4055bd8deadSopenharmony_ci          
4065bd8deadSopenharmony_ci    Revision 1, 2011/10/24 (criccio)
4075bd8deadSopenharmony_ci      - First draft
408