mesa/es: Add more exnteions to APIspec.
authorChia-I Wu <olvaffe@gmail.com>
Mon, 23 Nov 2009 09:07:08 +0000 (17:07 +0800)
committerBrian Paul <brianp@vmware.com>
Mon, 4 Jan 2010 21:15:15 +0000 (14:15 -0700)
This commit adds definitions of

  GL_EXT_texture_compression_dxt1
  GL_EXT_texture_lod_bias
  GL_EXT_blend_minmax
  GL_EXT_multi_draw_arrays

to APIspec.xml and get_gen.py.  Some of the enums are not avaiable in
the header files and the defining extensions are disabled.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
src/mesa/es/main/APIspec.xml
src/mesa/es/main/get_gen.py

index d8d85e66456034faaa3ee1ada40aef9cc0e455de..8926007f8de7f1ec60e67cce6d24d96b8ca1b40b 100644 (file)
                </desc>
        </desc>
 
+       <desc name="target" category="EXT_texture_lod_bias">
+               <value name="GL_TEXTURE_FILTER_CONTROL_EXT"/>
+
+               <desc name="pname">
+                       <value name="GL_TEXTURE_LOD_BIAS_EXT"/>
+               </desc>
+       </desc>
+
+       <desc name="pname" category="EXT_texture_lod_bias">
+               <value name="GL_TEXTURE_LOD_BIAS_EXT"/>
+               <desc name="params" vector_size="1"/>
+       </desc>
+
        <desc name="target">
                <value name="GL_TEXTURE_ENV"/>
 
                <desc name="params" vector_size="1" convert="false"/>
        </desc>
 
+       <desc name="target" category="EXT_texture_lod_bias">
+               <value name="GL_TEXTURE_FILTER_CONTROL_EXT"/>
+
+               <desc name="pname">
+                       <value name="GL_TEXTURE_LOD_BIAS_EXT"/>
+               </desc>
+       </desc>
+
+       <desc name="pname" category="EXT_texture_lod_bias">
+               <value name="GL_TEXTURE_LOD_BIAS_EXT"/>
+               <desc name="params" vector_size="1"/>
+       </desc>
+
        <desc name="target">
                <value name="GL_TEXTURE_ENV"/>
 
        <desc name="type">
                <value name="GL_UNSIGNED_BYTE"/>
                <value name="GL_UNSIGNED_SHORT"/>
-               <value name="GL_UNSIGNED_INT" category="GLES2.0"/>
+               <!-- GL_UNSIGNED_INT is not defined in GLES1.1 headers -->
+               <value name="(0x1405 /* GL_UNSIGNED_INT */)" category="OES_element_index_uint"/>
        </desc>
 </template>
 
                <value name="GL_FUNC_ADD_OES" category="OES_blend_subtract"/>
                <value name="GL_FUNC_SUBTRACT_OES" category="OES_blend_subtract"/>
                <value name="GL_FUNC_REVERSE_SUBTRACT_OES" category="OES_blend_subtract"/>
+
+               <value name="GL_MIN_EXT" category="EXT_blend_minmax"/>
+               <value name="GL_MAX_EXT" category="EXT_blend_minmax"/>
        </desc>
 </template>
 
                <value name="GL_FUNC_ADD_OES" category="OES_blend_subtract"/>
                <value name="GL_FUNC_SUBTRACT_OES" category="OES_blend_subtract"/>
                <value name="GL_FUNC_REVERSE_SUBTRACT_OES" category="OES_blend_subtract"/>
+
+               <value name="GL_MIN_EXT" category="EXT_blend_minmax"/>
+               <value name="GL_MAX_EXT" category="EXT_blend_minmax"/>
        </desc>
 
        <desc name="modeAlpha">
                <value name="GL_FUNC_ADD_OES" category="OES_blend_subtract"/>
                <value name="GL_FUNC_SUBTRACT_OES" category="OES_blend_subtract"/>
                <value name="GL_FUNC_REVERSE_SUBTRACT_OES" category="OES_blend_subtract"/>
+
+               <value name="GL_MIN_EXT" category="EXT_blend_minmax"/>
+               <value name="GL_MAX_EXT" category="EXT_blend_minmax"/>
        </desc>
 </template>
 
        </desc>
 
        <desc name="internalFormat">
-               <value name="GL_PALETTE4_RGB8_OES"/>
-               <value name="GL_PALETTE4_RGBA8_OES"/>
-               <value name="GL_PALETTE4_R5_G6_B5_OES"/>
-               <value name="GL_PALETTE4_RGBA4_OES"/>
-               <value name="GL_PALETTE4_RGB5_A1_OES"/>
-               <value name="GL_PALETTE8_RGB8_OES"/>
-               <value name="GL_PALETTE8_RGBA8_OES"/>
-               <value name="GL_PALETTE8_R5_G6_B5_OES"/>
-               <value name="GL_PALETTE8_RGBA4_OES"/>
-               <value name="GL_PALETTE8_RGB5_A1_OES"/>
                <value name="GL_ETC1_RGB8_OES" category="OES_compressed_ETC1_RGB8_texture"/>
+
+               <value name="GL_PALETTE4_RGB8_OES" category="OES_compressed_paletted_texture"/>
+               <value name="GL_PALETTE4_RGBA8_OES" category="OES_compressed_paletted_texture"/>
+               <value name="GL_PALETTE4_R5_G6_B5_OES" category="OES_compressed_paletted_texture"/>
+               <value name="GL_PALETTE4_RGBA4_OES" category="OES_compressed_paletted_texture"/>
+               <value name="GL_PALETTE4_RGB5_A1_OES" category="OES_compressed_paletted_texture"/>
+               <value name="GL_PALETTE8_RGB8_OES" category="OES_compressed_paletted_texture"/>
+               <value name="GL_PALETTE8_RGBA8_OES" category="OES_compressed_paletted_texture"/>
+               <value name="GL_PALETTE8_R5_G6_B5_OES" category="OES_compressed_paletted_texture"/>
+               <value name="GL_PALETTE8_RGBA4_OES" category="OES_compressed_paletted_texture"/>
+               <value name="GL_PALETTE8_RGB5_A1_OES" category="OES_compressed_paletted_texture"/>
+
                <value name="GL_3DC_X_AMD" category="AMD_compressed_3DC_texture"/>
                <value name="GL_3DC_XY_AMD" category="AMD_compressed_3DC_texture"/>
+
                <value name="GL_ATC_RGB_AMD" category="AMD_compressed_ATC_texture"/>
                <value name="GL_ATC_RGBA_EXPLICIT_ALPHA_AMD" category="AMD_compressed_ATC_texture"/>
                <value name="GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD" category="AMD_compressed_ATC_texture"/>
+
+               <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>
 
        <desc name="border" error="GL_INVALID_VALUE">
        </desc>
 
        <desc name="format">
-               <value name="GL_PALETTE4_RGB8_OES"/>
-               <value name="GL_PALETTE4_RGBA8_OES"/>
-               <value name="GL_PALETTE4_R5_G6_B5_OES"/>
-               <value name="GL_PALETTE4_RGBA4_OES"/>
-               <value name="GL_PALETTE4_RGB5_A1_OES"/>
-               <value name="GL_PALETTE8_RGB8_OES"/>
-               <value name="GL_PALETTE8_RGBA8_OES"/>
-               <value name="GL_PALETTE8_R5_G6_B5_OES"/>
-               <value name="GL_PALETTE8_RGBA4_OES"/>
-               <value name="GL_PALETTE8_RGB5_A1_OES"/>
+               <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>
 
        </proto>
 </template>
 
+<template name="MultiDrawArrays">
+       <proto>
+               <return type="void"/>
+               <param name="mode" type="GLenum"/>
+               <param name="first" type="GLint *"/>
+               <param name="count" type="GLsizei *"/>
+               <param name="primcount" type="GLsizei"/>
+       </proto>
+
+       <desc name="mode">
+               <value name="GL_POINTS"/>
+               <value name="GL_LINES"/>
+               <value name="GL_LINE_LOOP"/>
+               <value name="GL_LINE_STRIP"/>
+               <value name="GL_TRIANGLES"/>
+               <value name="GL_TRIANGLE_STRIP"/>
+               <value name="GL_TRIANGLE_FAN"/>
+       </desc>
+</template>
+
+<template name="MultiDrawElements">
+       <proto>
+               <return type="void"/>
+               <param name="mode" type="GLenum"/>
+               <param name="count" type="const GLsizei *"/>
+               <param name="type" type="GLenum"/>
+               <param name="indices" type="const GLvoid **"/>
+               <param name="primcount" type="GLsizei"/>
+       </proto>
+
+       <desc name="mode">
+               <value name="GL_POINTS"/>
+               <value name="GL_LINES"/>
+               <value name="GL_LINE_LOOP"/>
+               <value name="GL_LINE_STRIP"/>
+               <value name="GL_TRIANGLES"/>
+               <value name="GL_TRIANGLE_STRIP"/>
+               <value name="GL_TRIANGLE_FAN"/>
+       </desc>
+
+       <desc name="type">
+               <value name="GL_UNSIGNED_BYTE"/>
+               <value name="GL_UNSIGNED_SHORT"/>
+               <!-- GL_UNSIGNED_INT is not defined in GLES1.1 headers -->
+               <value name="(0x1405 /* GL_UNSIGNED_INT */)" category="OES_element_index_uint"/>
+       </desc>
+</template>
+
 <api name="mesa" implementation="true">
        <category name="MESA"/>
 
        <function name="DrawTexiv" template="DrawTex" gltype="GLint"/>
        <function name="DrawTexs" template="DrawTex" gltype="GLshort" expand_vector="true"/>
        <function name="DrawTexsv" template="DrawTex" gltype="GLshort"/>
+
+        <!-- EXT_multi_draw_arrays -->
+        <function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
+        <function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
 </api>
 
 <api name="GLES1.1">
        <category name="OES_element_index_uint"/>
        <category name="OES_mapbuffer"/>
        <category name="EXT_texture_filter_anisotropic"/>
+
        <category name="ARB_texture_non_power_of_two"/>
+       <!-- disabled due to missing enums
+       <category name="EXT_texture_compression_dxt1"/>
+       <category name="EXT_texture_lod_bias"/>
+       <category name="EXT_blend_minmax"/>
+       -->
        <category name="EXT_multi_draw_arrays"/>
 
        <category name="OES_matrix_palette"/>
        <function name="DrawTexivOES" template="DrawTex" gltype="GLint"/>
        <function name="DrawTexsvOES" template="DrawTex" gltype="GLshort"/>
        <function name="DrawTexxvOES" template="DrawTex" gltype="GLfixed"/>
+
+        <!-- EXT_multi_draw_arrays -->
+        <function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
+        <function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
 </api>
 
 <api name="GLES2.0">
        <category name="OES_depth_texture"/>
        <category name="OES_packed_depth_stencil"/>
        <category name="OES_standard_derivatives"/>
+
+       <!-- disabled due to missing enums
+       <category name="EXT_texture_compression_dxt1"/>
+       <category name="EXT_blend_minmax"/>
+       -->
        <category name="EXT_multi_draw_arrays"/>
 
        <function name="CullFace" template="CullFace"/>
        <function name="GetShaderPrecisionFormat" template="GetShaderPrecisionFormat"/>
        <function name="GetUniformfv" template="GetUniform" gltype="GLfloat"/>
        <function name="GetUniformiv" template="GetUniform" gltype="GLint"/>
+
+        <!-- EXT_multi_draw_arrays -->
+        <function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
+        <function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
 </api>
 
 </apispec>
index 3303c4cb5bd4cab3a798019b7f25a36e461fd31a..9da0b6b7421e06bbaea4d325645a0293bc09562d 100644 (file)
@@ -468,6 +468,10 @@ StateVars_es1 = [
        ("GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES", GLint,
         ["ctx->Array.ArrayObj->PointSize.BufferObj->Name"], "", None),
 
+       # GL_EXT_texture_lod_bias
+       ( "GL_MAX_TEXTURE_LOD_BIAS_EXT", GLfloat,
+         ["ctx->Const.MaxTextureLodBias"], "", ["EXT_texture_lod_bias"]),
+
        # GL_EXT_texture_filter_anisotropic
        ( "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT", GLfloat,
          ["ctx->Const.MaxTextureMaxAnisotropy"], "", ["EXT_texture_filter_anisotropic"]),