15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    NV_texture_compression_s3tc_update
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_NV_texture_compression_s3tc_update
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Ian Stewart, NVIDIA Corporation (istewart 'at' nvidia.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciContributors
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Nicholas Haemel, NVIDIA Corporation
165bd8deadSopenharmony_ci    Acorn Pooley, NVIDIA Corporation
175bd8deadSopenharmony_ci    Antti Rasmus, NVIDIA Corporation
185bd8deadSopenharmony_ci    Musawir Shah, NVIDIA Corporation
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ciStatus
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ci    Complete.
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ciVersion
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ci    Last Modified Date: Sep 27, 2012
275bd8deadSopenharmony_ci    NVIDIA Revision: 2
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ciNumber
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ci    OpenGL ES Extension #95
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ciDependencies
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ci    This specification is written against the OpenGL ES 2.0.25
365bd8deadSopenharmony_ci    specification.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    Depends on the GL_NV_texture_compression_s3tc extension.
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ciOverview
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ci    This extension allows for full or partial image updates to a
435bd8deadSopenharmony_ci    compressed 2D texture from an uncompressed texel data buffer using
445bd8deadSopenharmony_ci    TexImage2D and TexSubImage2D. Consquently, if a compressed internal
455bd8deadSopenharmony_ci    format is used, all the restrictions associated with compressed
465bd8deadSopenharmony_ci    textures will apply. These include sub-image updates aligned to 4x4
475bd8deadSopenharmony_ci    pixel blocks and the restriction on usage as render targets.
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ciIP Status
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    NVIDIA Proprietary
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ciNew Procedures and Functions
545bd8deadSopenharmony_ci
555bd8deadSopenharmony_ci    None
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ciNew Tokens
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci    None
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL ES 2.0.25 Specification (Rasterization)
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci    Modify Section 3.7.1, Texture Image Specification
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ci    (change last paragraph on Page 67 as follows)
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci    Components are then selected from the resulting R, G, B, or A values
685bd8deadSopenharmony_ci    to obtain a texture with the base internal format specified by
695bd8deadSopenharmony_ci    <internalformat>, which must match <format> except when <target> is
705bd8deadSopenharmony_ci    TEXTURE_2D and <internalformat> is one of the following compressed
715bd8deadSopenharmony_ci    formats: COMPRESSED_RGB_S3TC_DXT1_NV,
725bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT1_NV, COMPRESSED_RGBA_S3TC_DXT3_NV, or
735bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT5_NV. In this case, conversion from only
745bd8deadSopenharmony_ci    RGB and RGBA formats are supported during texture image processing.
755bd8deadSopenharmony_ci    <format> values other than RBA or RGBA will result in the
765bd8deadSopenharmony_ci    INVALID_OPERATION error. In all other cases where <internalformat>
775bd8deadSopenharmony_ci    does not match <format>, the error INVALID_OPERATION is generated.
785bd8deadSopenharmony_ci    Table 3.8 summarizes the mapping of R, G, B, and A values to texture
795bd8deadSopenharmony_ci    components, as a function of the base internal format of the texture
805bd8deadSopenharmony_ci    image. <internalformat> may be one of the five internal format
815bd8deadSopenharmony_ci    symbolic constants listed in table 3.8 or the four compressed
825bd8deadSopenharmony_ci    formats: COMPRESSED_RGB_S3TC_DXT1_NV,
835bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT1_NV, COMPRESSED_RGBA_S3TC_DXT3_NV, or
845bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT5_NV. Specifying a value for
855bd8deadSopenharmony_ci    <internalformat> that is not one of the above values generates the
865bd8deadSopenharmony_ci    error INVALID_VALUE. When a compressed <internalformat> is
875bd8deadSopenharmony_ci    specified, a compressed texture is created and all the associated
885bd8deadSopenharmony_ci    restrictions mentioned in Section 3.7.3 are imposed.
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ci    Note that when encoding an RGBA image into a format using 1-bit
915bd8deadSopenharmony_ci    alpha, any texels with an alpha component less than 0.5 end up
925bd8deadSopenharmony_ci    with an alpha of 0.0 and any texels with an alpha component
935bd8deadSopenharmony_ci    greater than or equal to 0.5 end up with an alpha of 1.0. When
945bd8deadSopenharmony_ci    encoding an RGBA image into the COMPRESSED_RGBA_S3TC_DXT1_NV
955bd8deadSopenharmony_ci    format, the resulting red, green, and blue components of any
965bd8deadSopenharmony_ci    texels with a final alpha of 0.0 will automatically be zero
975bd8deadSopenharmony_ci    (black).  If this behavior is not desired by an application, it
985bd8deadSopenharmony_ci    should not use COMPRESSED_RGBA_S3TC_DXT1_NV.
995bd8deadSopenharmony_ci
1005bd8deadSopenharmony_ci    Modify Section 3.7.2, Alternate Texture Image Specification Commands
1015bd8deadSopenharmony_ci
1025bd8deadSopenharmony_ci    (add to the end of section)
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci    When the internal format of the texture object is
1055bd8deadSopenharmony_ci    COMPRESSED_RGB_S3TC_DXT1_NV, COMPRESSED_RGBA_S3TC_DXT1_NV,
1065bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT3_NV, or COMPRESSED_RGBA_S3TC_DXT5_NV, the
1075bd8deadSopenharmony_ci    update region specified in TexSubImage2D must be aligned to 4x4
1085bd8deadSopenharmony_ci    pixel blocks. If <xoffset> or <yoffset> are not multiples of 4 an
1095bd8deadSopenharmony_ci    INVALID_OPERATION error is generated. If <width> is not a multiple
1105bd8deadSopenharmony_ci    of 4 and <xoffset> + <width> is not equal to the width of the LOD
1115bd8deadSopenharmony_ci    then an INVALID_OPERATION error is generated.  If <height> is not
1125bd8deadSopenharmony_ci    a multiple of 4 and <yoffset> + <height> is not equal to the
1135bd8deadSopenharmony_ci    height of the LOD then an INVALID_OPERATION error is generated.
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL ES 2.0.25 Specification (Per-Fragment
1165bd8deadSopenharmony_ciOperations and the Framebuffer)
1175bd8deadSopenharmony_ci
1185bd8deadSopenharmony_ci    Modify Section 4.4.3, Attaching Texture Images to a Framebuffer
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ci    (add after last paragraph on Page 113)
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci    If <texture> is not zero and the internal format of the
1235bd8deadSopenharmony_ci    corresponding texture object is a compressed format, an
1245bd8deadSopenharmony_ci    INVALID_OPERATION error is generated.
1255bd8deadSopenharmony_ci
1265bd8deadSopenharmony_ciErrors
1275bd8deadSopenharmony_ci
1285bd8deadSopenharmony_ci    INVALID_OPERATION is generated by TexImage2D and TexSubImage2D if
1295bd8deadSopenharmony_ci    TEXTURE_INTERNAL_FORMAT is COMPRESSED_RGB_S3TC_DXT1_NV,
1305bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT1_NV, COMPRESSED_RGBA_S3TC_DXT3_NV, or
1315bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT5_NV and <format> is not RGB or RGBA.
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci    If <xoffset> or <yoffset> are not multiples of 4 an
1345bd8deadSopenharmony_ci    INVALID_OPERATION error is generated.
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_ci    If <width> is not a multiple of 4 and <xoffset> + <width> is not
1375bd8deadSopenharmony_ci    equal to the width of the LOD then an INVALID_OPERATION error is
1385bd8deadSopenharmony_ci    generated.
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ci    If <height> is not a multiple of 4 and <yoffset> + <height> is not
1415bd8deadSopenharmony_ci    equal to the height of the LOD then an INVALID_OPERATION error is
1425bd8deadSopenharmony_ci    generated.
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ciIssues
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci    1) Should sub-image updates be aligned to 4x4 pixel blocks?
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ci    RESOLUTION: Yes. Relaxing this restriction would otherwise require
1495bd8deadSopenharmony_ci    CPU read-back of pixels at the 4x4 compression block boundary.
1505bd8deadSopenharmony_ci
1515bd8deadSopenharmony_ci    2) Should we support binding of compressed textures as render targets?
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ci    RESOLUTION: No. Writing to directly to compressed formats not
1545bd8deadSopenharmony_ci    possible using hardware.  Supporting this feature would involve
1555bd8deadSopenharmony_ci    read-back of the texture and re-compression on the CPU, which would
1565bd8deadSopenharmony_ci    be prohibitively slow.
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ci    3) Should we support mip map generation?
1595bd8deadSopenharmony_ci
1605bd8deadSopenharmony_ci    RESOLUTION: No. Mip map generation is not supported for compressed
1615bd8deadSopenharmony_ci    textures. However, uploading to specific mip level is supported.
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ciRevision History
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ci    Rev.    Date      Author       Changes
1665bd8deadSopenharmony_ci    ----   --------   ---------    -------------------------------------
1675bd8deadSopenharmony_ci     2     09/27/12   istewart     Changed all EXT references to NV.
1685bd8deadSopenharmony_ci                                   Added note about DXT1 alpha encoding.
1695bd8deadSopenharmony_ci                                   Fixed TexSubImage2D error conditions.
1705bd8deadSopenharmony_ci     1     04/06/11   mshah        First revision.
171