15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    EXT_texture_compression_s3tc_srgb
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_EXT_texture_compression_s3tc_srgb
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContributors
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Christophe Riccio, Unity
125bd8deadSopenharmony_ci    Kai Ninomiya, Google
135bd8deadSopenharmony_ci    Kenneth Russell, Google
145bd8deadSopenharmony_ci    Contributors to EXT_texture_compression_s3tc
155bd8deadSopenharmony_ci
165bd8deadSopenharmony_ciContact
175bd8deadSopenharmony_ci
185bd8deadSopenharmony_ci    Christophe Riccio, (christophe 'dot' riccio 'at' unity3d 'dot' com)
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ciStatus
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ci    FINAL, implemented by ANGLE
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ciVersion
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ci    1 October 2016
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ciNumber
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    OpenGL ES Extension #289
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ciDependencies
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci    OpenGL ES 2.0 is required.
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ci    OpenGL ES 3.0 or EXT_sRGB are required.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    EXT_texture_compression_s3tc is required.
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci    This extension is written against the OpenGL ES 3.0.4
415bd8deadSopenharmony_ci    specification with EXT_texture_compression_s3tc extension.
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ci    This extension is written against the OpenGL ES 2.0.25
445bd8deadSopenharmony_ci    specification with EXT_texture_compression_s3tc extension.
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci    EXT_texture_storage affects the definition of this
475bd8deadSopenharmony_ci    extension.
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ciOverview
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    This extension adds new compressed color texture formats using S3TC with
525bd8deadSopenharmony_ci    nonlinear sRGB color components.
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ciIP Status
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci    Contact S3 Incorporated (http://www.s3.com) regarding any intellectual
575bd8deadSopenharmony_ci    property issues associated with implementing this extension.
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci    WARNING:  Vendors able to support S3TC texture compression in Direct3D
605bd8deadSopenharmony_ci    drivers do not necessarily have the right to use the same functionality in
615bd8deadSopenharmony_ci    OpenGL.
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ciNew Procedures and Functions
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ci    None
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ciNew Tokens
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci    This extension introduces new tokens:
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci        COMPRESSED_SRGB_S3TC_DXT1_EXT                  0x8C4C
725bd8deadSopenharmony_ci        COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT            0x8C4D
735bd8deadSopenharmony_ci        COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT            0x8C4E
745bd8deadSopenharmony_ci        COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT            0x8C4F
755bd8deadSopenharmony_ci
765bd8deadSopenharmony_ci    In extended OpenGL ES 2.0.25 these new tokens are accepted by the
775bd8deadSopenharmony_ci    <internalformat> parameter of TexImage2D, CompressedTexImage2D, TexStorage2DEXT,
785bd8deadSopenharmony_ci    TextureStorage2DEXT and the <format> parameter of CompressedTexSubImage2D.
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci    In extended OpenGL ES 3.0.4 these new tokens are also accepted by the
815bd8deadSopenharmony_ci    <internalformat> parameter of TexImage2D, TexImage3D, CompressedTexImage3D,
825bd8deadSopenharmony_ci    TexStorage2D, TexStorage3D, TexStorage3DEXT, TextureStorage3DEXT and the <format>
835bd8deadSopenharmony_ci    parameter of CompressedTexSubImage3D.
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL ES 2.0.25 Specification
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ci    Modify Section 3.7.1, Texture Image Specification:
885bd8deadSopenharmony_ci
895bd8deadSopenharmony_ci    Change last paragraph on Page 67 as follows
905bd8deadSopenharmony_ci    (modified by EXT_texture_compression_s3tc):
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ci    Components are then selected from the resulting R, G, B, or A values
935bd8deadSopenharmony_ci    to obtain a texture with the base internal format specified by
945bd8deadSopenharmony_ci    <internalformat>, which must match <format> except when <target> is
955bd8deadSopenharmony_ci    TEXTURE_2D and <internalformat> is one of the following compressed
965bd8deadSopenharmony_ci    formats: COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT,
975bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT3_EXT, COMPRESSED_RGBA_S3TC_DXT5_EXT,
985bd8deadSopenharmony_ci    COMPRESSED_SRGB_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,
995bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, or COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT.
1005bd8deadSopenharmony_ci    In this case, conversion from only RGB and RGBA formats are supported
1015bd8deadSopenharmony_ci    during texture image processing. <format> values other than RGB or RGBA
1025bd8deadSopenharmony_ci    will result in the INVALID_OPERATION error. In all other cases where
1035bd8deadSopenharmony_ci    <internalformat> does not match <format>, the error INVALID_OPERATION is
1045bd8deadSopenharmony_ci    generated. Table 3.8 summarizes the mapping of R, G, B, and A values to
1055bd8deadSopenharmony_ci    texture components, as a function of the base internal format of the
1065bd8deadSopenharmony_ci    texture image. <internalformat> may be one of the five internal format
1075bd8deadSopenharmony_ci    symbolic constants listed in table 3.8 or the four compressed
1085bd8deadSopenharmony_ci    formats: COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT,
1095bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT3_EXT, COMPRESSED_RGBA_S3TC_DXT5_EXT,
1105bd8deadSopenharmony_ci    COMPRESSED_SRGB_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,
1115bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, or COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT.
1125bd8deadSopenharmony_ci    Specifying a value for <internalformat> that is not one of the above values
1135bd8deadSopenharmony_ci    generates the error INVALID_VALUE. When a compressed <internalformat> is
1145bd8deadSopenharmony_ci    specified, a compressed texture is created and all the associated
1155bd8deadSopenharmony_ci    restrictions mentioned in Section 3.7.3 are imposed.
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ci    Note that when encoding an RGBA image into a format using 1-bit
1185bd8deadSopenharmony_ci    alpha, any texels with an alpha component less than 0.5 end up
1195bd8deadSopenharmony_ci    with an alpha of 0.0 and any texels with an alpha component
1205bd8deadSopenharmony_ci    greater than or equal to 0.5 end up with an alpha of 1.0. When
1215bd8deadSopenharmony_ci    encoding an RGBA image into the COMPRESSED_RGBA_S3TC_DXT1_EXT or
1225bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT format, the resulting red,
1235bd8deadSopenharmony_ci    green, and blue components of any texels with a final alpha of 0.0
1245bd8deadSopenharmony_ci    will automatically be zero (black). If this behavior is not desired
1255bd8deadSopenharmony_ci    by an application, it should not use COMPRESSED_RGBA_S3TC_DXT1_EXT or
1265bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT.
1275bd8deadSopenharmony_ci
1285bd8deadSopenharmony_ci    Modify Section 3.7.2, Alternate Texture Image Specification Commands
1295bd8deadSopenharmony_ci    (modified by EXT_texture_compression_s3tc):
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ci    Modify last paragraph with:
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci    When the internal format of the texture object is
1345bd8deadSopenharmony_ci    COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT,
1355bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT3_EXT, COMPRESSED_RGBA_S3TC_DXT5_EXT,
1365bd8deadSopenharmony_ci    COMPRESSED_SRGB_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,
1375bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, or COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,
1385bd8deadSopenharmony_ci    the update region specified in TexSubImage2D must be aligned to 4x4
1395bd8deadSopenharmony_ci    pixel blocks. If <xoffset> or <yoffset> are not multiples of 4 an
1405bd8deadSopenharmony_ci    INVALID_OPERATION error is generated. If <width> is not a multiple
1415bd8deadSopenharmony_ci    of 4 and <xoffset> + <width> is not equal to the width of the LOD
1425bd8deadSopenharmony_ci    then an INVALID_OPERATION error is generated.  If <height> is not
1435bd8deadSopenharmony_ci    a multiple of 4 and <yoffset> + <height> is not equal to the
1445bd8deadSopenharmony_ci    height of the LOD then an INVALID_OPERATION error is generated.
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci    Modify Section 3.7.3, "Compressed Texture Images"
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ci    Add 4 new rows to "Specific compressed texture formats" Table 3.X:
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ci        Compressed Internal Format           Base Internal Format
1515bd8deadSopenharmony_ci        -----------------------------------  --------------------
1525bd8deadSopenharmony_ci        COMPRESSED_SRGB_S3TC_DXT1_EXT        RGB
1535bd8deadSopenharmony_ci        COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT  RGBA
1545bd8deadSopenharmony_ci        COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT  RGBA
1555bd8deadSopenharmony_ci        COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT  RGBA
1565bd8deadSopenharmony_ci
1575bd8deadSopenharmony_ci    Replace last paragraph with:
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ci    If the internal format is one of COMPRESSED_RGB_S3TC_DXT1_EXT,
1605bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT3_EXT,
1615bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT5_EXT, COMPRESSED_SRGB_S3TC_DXT1_EXT,
1625bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,
1635bd8deadSopenharmony_ci    or COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT the compressed texture is stored
1645bd8deadSopenharmony_ci    using one of several S3TC compressed texture image formats and is
1655bd8deadSopenharmony_ci    easily edited along 4x4 texel boundaries. In this case,
1665bd8deadSopenharmony_ci    CompressedTexSubImage2D will result in an INVALID_OPERATION error
1675bd8deadSopenharmony_ci    if one of the following conditions occurs:
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ci        * <width> is not a multiple of four, and <width> plus
1705bd8deadSopenharmony_ci          <xoffset> is not equal to texture width;
1715bd8deadSopenharmony_ci
1725bd8deadSopenharmony_ci        * <height> is not a multiple of four, and <height> plus
1735bd8deadSopenharmony_ci          <yoffset> is not equal to texture height; or
1745bd8deadSopenharmony_ci
1755bd8deadSopenharmony_ci        * <xoffset> or <yoffset> is not a multiple of four.
1765bd8deadSopenharmony_ci
1775bd8deadSopenharmony_ci    For any other formats, calling CompressedTexSubImage2D will result
1785bd8deadSopenharmony_ci    in an INVALID_OPERATION error if <xoffset> or <yoffset> is not
1795bd8deadSopenharmony_ci    equal to zero, or if <width> and <height> do not match the width
1805bd8deadSopenharmony_ci    and height of the texture, respectively. The contents of any texel
1815bd8deadSopenharmony_ci    outside the region modified by the call are undefined. These
1825bd8deadSopenharmony_ci    restrictions may be relaxed for other specific compressed internal
1835bd8deadSopenharmony_ci    formats whose images are easily modified.
1845bd8deadSopenharmony_ci
1855bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL ES 3.0.4 Specification
1865bd8deadSopenharmony_ci(Rasterization)
1875bd8deadSopenharmony_ci
1885bd8deadSopenharmony_ci    Modify Section 3.8.3, "Texture Image Specification":
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ci    Modify paragraph starting with "For internalformat different than "
1915bd8deadSopenharmony_ci    (modified by EXT_texture_compression_s3tc):
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ci    For internalformat different than COMPRESSED_RGB_S3TC_DXT1_EXT,
1945bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT3_EXT, 
1955bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT5_EXT, COMPRESSED_SRGB_S3TC_DXT1_EXT,
1965bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,
1975bd8deadSopenharmony_ci    or COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT specifying a combination of values
1985bd8deadSopenharmony_ci    for format, type, and internalformat that is not listed as a valid
1995bd8deadSopenharmony_ci    combination in tables 3.2 or 3.3 generates the error INVALID_OPERATION.
2005bd8deadSopenharmony_ci
2015bd8deadSopenharmony_ci    For internalformat equal to COMPRESSED_RGB_S3TC_DXT1_EXT,
2025bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT3_EXT,
2035bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT5_EXT, COMPRESSED_SRGB_S3TC_DXT1_EXT, 
2045bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, or
2055bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT only RGB and RGBA formats are supported
2065bd8deadSopenharmony_ci    during texture image processing and for these internalformat values
2075bd8deadSopenharmony_ci    <format> values other than RBA or RGBA will result in the INVALID_OPERATION
2085bd8deadSopenharmony_ci    error.
2095bd8deadSopenharmony_ci
2105bd8deadSopenharmony_ci    Modify Section 3.8.6. "Compressed Texture Images":
2115bd8deadSopenharmony_ci
2125bd8deadSopenharmony_ci    Add 4 new rows to "Compressed internal formats" Table 3.19:
2135bd8deadSopenharmony_ci
2145bd8deadSopenharmony_ci        Compressed Internal Format           Base Internal Format
2155bd8deadSopenharmony_ci        -----------------------------------  --------------------
2165bd8deadSopenharmony_ci        COMPRESSED_SRGB_S3TC_DXT1_EXT        RGB
2175bd8deadSopenharmony_ci        COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT  RGBA
2185bd8deadSopenharmony_ci        COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT  RGBA
2195bd8deadSopenharmony_ci        COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT  RGBA
2205bd8deadSopenharmony_ci
2215bd8deadSopenharmony_ci    Modify paragraph starting with "If the internal format is one of "
2225bd8deadSopenharmony_ci    (added by EXT_texture_compression_s3tc):
2235bd8deadSopenharmony_ci
2245bd8deadSopenharmony_ci    If the internal format is one of COMPRESSED_RGB_S3TC_DXT1_EXT,
2255bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT3_EXT,
2265bd8deadSopenharmony_ci    COMPRESSED_RGBA_S3TC_DXT5_EXT, COMPRESSED_SRGB_S3TC_DXT1_EXT,
2275bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,
2285bd8deadSopenharmony_ci    or COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT the compressed texture is stored
2295bd8deadSopenharmony_ci    using one of several S3TC compressed texture image formats and is easily
2305bd8deadSopenharmony_ci    edited along 4x4 texel boundaries. In this case,
2315bd8deadSopenharmony_ci    CompressedTexSubImage2D/CompressedTexSubImage3D will result in an
2325bd8deadSopenharmony_ci    INVALID_OPERATION error if one of the following conditions occurs:
2335bd8deadSopenharmony_ci
2345bd8deadSopenharmony_ci        * <width> is not a multiple of four, and <width> plus
2355bd8deadSopenharmony_ci          <xoffset> is not equal to texture width;
2365bd8deadSopenharmony_ci
2375bd8deadSopenharmony_ci        * <height> is not a multiple of four, and <height> plus
2385bd8deadSopenharmony_ci          <yoffset> is not equal to texture height; or
2395bd8deadSopenharmony_ci
2405bd8deadSopenharmony_ci        * <xoffset> or <yoffset> is not a multiple of four.
2415bd8deadSopenharmony_ci
2425bd8deadSopenharmony_ci    For any other formats, calling CompressedTexSubImage2D/CompressedTexSubImage3D
2435bd8deadSopenharmony_ci    will result in an INVALID_OPERATION error if <xoffset> or <yoffset> is not
2445bd8deadSopenharmony_ci    equal to zero, or if <width> and <height> do not match the width and height
2455bd8deadSopenharmony_ci    of the texture, respectively. The contents of any texel outside the region
2465bd8deadSopenharmony_ci    modified by the call are undefined. These restrictions may be relaxed for
2475bd8deadSopenharmony_ci    other specific compressed internal formats whose images are easily
2485bd8deadSopenharmony_ci    modified.
2495bd8deadSopenharmony_ci
2505bd8deadSopenharmony_ci    Modify Section 3.8.16, "sRGB Texture Color Conversion":
2515bd8deadSopenharmony_ci
2525bd8deadSopenharmony_ci    Change the first sentence to:
2535bd8deadSopenharmony_ci
2545bd8deadSopenharmony_ci    If the currently bound texture's internal format is one of SRGB8,
2555bd8deadSopenharmony_ci    SRGB8_ALPHA8, COMPRESSED_SRGB8_ETC2, COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
2565bd8deadSopenharmony_ci    COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, COMPRESSED_SRGB_S3TC_DXT1_EXT,
2575bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,
2585bd8deadSopenharmony_ci    or COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, the red, green, and blue components
2595bd8deadSopenharmony_ci    are converted from an sRGB color space to a linear color space as part of
2605bd8deadSopenharmony_ci    filtering described in sections 3.8.10 and 3.8.11.
2615bd8deadSopenharmony_ci
2625bd8deadSopenharmony_ciDependencies on EXT_texture_storage
2635bd8deadSopenharmony_ci
2645bd8deadSopenharmony_ci    If EXT_texture_storage is not supported, ignore all references to
2655bd8deadSopenharmony_ci    TexStorage2DEXT and TexStorage3DEXT functions.
2665bd8deadSopenharmony_ci
2675bd8deadSopenharmony_ciErrors for OpenGL ES 2.0.25 Specification
2685bd8deadSopenharmony_ci
2695bd8deadSopenharmony_ci    INVALID_OPERATION is generated by CopyTexSubImage2D if the texture
2705bd8deadSopenharmony_ci    image <level> bound to <target> has internal format
2715bd8deadSopenharmony_ci    COMPRESSED_SRGB_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,
2725bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, or COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT.
2735bd8deadSopenharmony_ci
2745bd8deadSopenharmony_ci    INVALID_OPERATION is generated by CompressedTexSubImage2D if
2755bd8deadSopenharmony_ci    <format> is COMPRESSED_SRGB_S3TC_DXT1_EXT,
2765bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, or
2775bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT and any of the following apply:
2785bd8deadSopenharmony_ci
2795bd8deadSopenharmony_ci        * <width> is not a multiple of four, and <width> plus
2805bd8deadSopenharmony_ci          <xoffset> is not equal to the texture width;
2815bd8deadSopenharmony_ci
2825bd8deadSopenharmony_ci        * <height> is not a multiple of four, and <height> plus
2835bd8deadSopenharmony_ci          <yoffset> is not equal to the texture height; or
2845bd8deadSopenharmony_ci
2855bd8deadSopenharmony_ci        * <xoffset> or <yoffset> is not a multiple of four.
2865bd8deadSopenharmony_ci
2875bd8deadSopenharmony_ci    INVALID_OPERATION is generated by TexImage2D and TexSubImage2D if
2885bd8deadSopenharmony_ci    texture has internal format COMPRESSED_SRGB_S3TC_DXT1_EXT,
2895bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, or
2905bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT and any of the following apply:
2915bd8deadSopenharmony_ci
2925bd8deadSopenharmony_ci        * <xoffset> or <yoffset> are not multiples of 4
2935bd8deadSopenharmony_ci
2945bd8deadSopenharmony_ci        * <width> is not a multiple of 4 and <xoffset> + <width> is not equal
2955bd8deadSopenharmony_ci          to the width of the LOD
2965bd8deadSopenharmony_ci
2975bd8deadSopenharmony_ci        * if <height> is not a multiple of 4 and <yoffset> + <height> is not
2985bd8deadSopenharmony_ci          equal to the height of the LOD
2995bd8deadSopenharmony_ci
3005bd8deadSopenharmony_ciErrors for OpenGL ES 3.0.4 Specification
3015bd8deadSopenharmony_ci
3025bd8deadSopenharmony_ci    INVALID_OPERATION is generated by CopyTexSubImage2D / CopyTexSubImage3D if
3035bd8deadSopenharmony_ci    the texture image <level> bound to <target> has internal format
3045bd8deadSopenharmony_ci    COMPRESSED_SRGB_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,
3055bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, or COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT.
3065bd8deadSopenharmony_ci
3075bd8deadSopenharmony_ci    INVALID_OPERATION is generated by CompressedTexSubImage2D /
3085bd8deadSopenharmony_ci    CompressedTexSubImage3D if <format> is COMPRESSED_SRGB_S3TC_DXT1_EXT,
3095bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, or
3105bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT and any of the following apply:
3115bd8deadSopenharmony_ci
3125bd8deadSopenharmony_ci        * <width> is not a multiple of four, and <width> plus
3135bd8deadSopenharmony_ci          <xoffset> is not equal to the texture width;
3145bd8deadSopenharmony_ci
3155bd8deadSopenharmony_ci        * <height> is not a multiple of four, and <height> plus
3165bd8deadSopenharmony_ci          <yoffset> is not equal to the texture height; or
3175bd8deadSopenharmony_ci
3185bd8deadSopenharmony_ci        * <xoffset> or <yoffset> is not a multiple of four.
3195bd8deadSopenharmony_ci
3205bd8deadSopenharmony_ci    INVALID_OPERATION is generated by TexSubImage2D/TexSubImage3D if texture
3215bd8deadSopenharmony_ci    has internal format COMPRESSED_SRGB_S3TC_DXT1_EXT, 
3225bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,
3235bd8deadSopenharmony_ci    or COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT and <format> is not RGB or RGBA, or
3245bd8deadSopenharmony_ci    any of the following apply:
3255bd8deadSopenharmony_ci
3265bd8deadSopenharmony_ci        * <xoffset> or <yoffset> are not multiples of 4
3275bd8deadSopenharmony_ci
3285bd8deadSopenharmony_ci        * <width> is not a multiple of 4 and <xoffset> + <width> is not equal
3295bd8deadSopenharmony_ci          to the width of the LOD
3305bd8deadSopenharmony_ci
3315bd8deadSopenharmony_ci        * if <height> is not a multiple of 4 and <yoffset> + <height> is not
3325bd8deadSopenharmony_ci          equal to the height of the LOD
3335bd8deadSopenharmony_ci
3345bd8deadSopenharmony_ciNew State for OpenGL ES 2.0.25 and 3.0.2 Specifications
3355bd8deadSopenharmony_ci
3365bd8deadSopenharmony_ci    The queries for NUM_COMPRESSED_TEXTURE_FORMATS and
3375bd8deadSopenharmony_ci    COMPRESSED_TEXTURE_FORMATS include COMPRESSED_SRGB_S3TC_DXT1_EXT,
3385bd8deadSopenharmony_ci    COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,
3395bd8deadSopenharmony_ci    and COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT.
3405bd8deadSopenharmony_ci
3415bd8deadSopenharmony_ciNew Implementation Dependent State
3425bd8deadSopenharmony_ci
3435bd8deadSopenharmony_ci    None
3445bd8deadSopenharmony_ci
3455bd8deadSopenharmony_ciIssues
3465bd8deadSopenharmony_ci
3475bd8deadSopenharmony_ci    (1) Should this be an extension for OpenGL too?
3485bd8deadSopenharmony_ci
3495bd8deadSopenharmony_ci        sRGB DXT formats are already exposed through OpenGL EXT_texture_sRGB
3505bd8deadSopenharmony_ci        extension.
3515bd8deadSopenharmony_ci
3525bd8deadSopenharmony_ci        RESOLVED: No
3535bd8deadSopenharmony_ci
3545bd8deadSopenharmony_ci    (2) Can we use the new compression formats with TexImage2D/TexImage3D?
3555bd8deadSopenharmony_ci
3565bd8deadSopenharmony_ci        EXT_texture_compression_s3tc supports DXT formats as internalformat of 
3575bd8deadSopenharmony_ci        TexImage2D and TexImage3D hence this extension should follow this
3585bd8deadSopenharmony_ci        precedent.
3595bd8deadSopenharmony_ci
3605bd8deadSopenharmony_ci        RESOLVED: Yes
3615bd8deadSopenharmony_ci
3625bd8deadSopenharmony_ciRevision History
3635bd8deadSopenharmony_ci
3645bd8deadSopenharmony_ci    2016-10-01 - criccio
3655bd8deadSopenharmony_ci       + Fixed missing formats in Section 3.8.3
3665bd8deadSopenharmony_ci
3675bd8deadSopenharmony_ci    2016-09-30 - criccio
3685bd8deadSopenharmony_ci       + Added issue 2
3695bd8deadSopenharmony_ci
3705bd8deadSopenharmony_ci    2016-09-10 - criccio
3715bd8deadSopenharmony_ci       + Initial draft
372