mesa/es: Validate glCompressedTexSubImage internalFormat in Mesa code rather than...
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 27 Jul 2012 14:13:03 +0000 (07:13 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 23 Aug 2012 17:15:31 +0000 (10:15 -0700)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/main/APIspec.xml
src/mesa/main/teximage.c

index 1ae7212502add88a1802fbd86cc58bcb9fcd1951..8b5ad0330ef7cbe0fcfa75c29501e90e33ac59c1 100644 (file)
                <param name="imageSize" type="GLsizei"/>
                <param name="data" type="const GLvoid *"/>
        </proto>
-
-       <desc name="format">
-               <value name="GL_COMPRESSED_RGB_S3TC_DXT1_EXT" category="EXT_texture_compression_dxt1"/>
-               <value name="GL_COMPRESSED_RGBA_S3TC_DXT1_EXT" category="EXT_texture_compression_dxt1"/>
-       </desc>
 </template>
 
 <template name="BlendFuncSeparate">
index 5cf91183a204a1ceb4c96ee6725a97e835ee5310..2380efe8f3b88dc0504c54913a8b4afb2ffe642e 100644 (file)
@@ -1381,6 +1381,16 @@ compressedteximage_only_format(const struct gl_context *ctx, GLenum format)
 {
    switch (format) {
    case GL_ETC1_RGB8_OES:
+   case GL_PALETTE4_RGB8_OES:
+   case GL_PALETTE4_RGBA8_OES:
+   case GL_PALETTE4_R5_G6_B5_OES:
+   case GL_PALETTE4_RGBA4_OES:
+   case GL_PALETTE4_RGB5_A1_OES:
+   case GL_PALETTE8_RGB8_OES:
+   case GL_PALETTE8_RGBA8_OES:
+   case GL_PALETTE8_R5_G6_B5_OES:
+   case GL_PALETTE8_RGBA4_OES:
+   case GL_PALETTE8_RGB5_A1_OES:
       return GL_TRUE;
    default:
       return GL_FALSE;