mesa: implement ARB_map_buffer_alignment
authorMarek Olšák <maraeo@gmail.com>
Sun, 28 Oct 2012 16:51:47 +0000 (17:51 +0100)
committerMarek Olšák <maraeo@gmail.com>
Wed, 31 Oct 2012 00:48:40 +0000 (01:48 +0100)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/extensions.c
src/mesa/main/get.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h

index a46d6131c1432bc4c54b72548a165add37001e42..c38aa3a59c5c183b972fa0a7f0d2991ca5ae3414 100644 (file)
   </function>
 </category>
 
-<!-- ARB extensions #110...#116 -->
+<!-- ARB extensions #110...#112 -->
+
+<category name="GL_ARB_map_buffer_alignment" number="113">
+  <enum name="MIN_MAP_BUFFER_ALIGNMENT" value="0x90BC" />
+</category>
+
+<!-- ARB extensions #114...#116 -->
 
 <xi:include href="ARB_base_instance.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
index edee5967d92c695e5921e0c39910c40e4bd825d7..d1a7cc9445bd87bddb19a3ec25c770fc7b783d4d 100644 (file)
@@ -104,6 +104,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_half_float_vertex",                   o(ARB_half_float_vertex),                   GL,             2008 },
    { "GL_ARB_instanced_arrays",                    o(ARB_instanced_arrays),                    GL,             2008 },
    { "GL_ARB_invalidate_subdata",                  o(dummy_true),                              GL,             2012 },
+   { "GL_ARB_map_buffer_alignment",                o(ARB_map_buffer_alignment),                GL,             2011 },
    { "GL_ARB_map_buffer_range",                    o(ARB_map_buffer_range),                    GL,             2008 },
    { "GL_ARB_multisample",                         o(dummy_true),                              GLL,            1994 },
    { "GL_ARB_multitexture",                        o(dummy_true),                              GLL,            1998 },
index 805f0f978a7899ea23281959049a344ebfe81e09..b510c32d5d3a295cfdf388c53cd9a716ca9d8b0e 100644 (file)
@@ -338,6 +338,7 @@ EXTRA_EXT(OES_EGL_image_external);
 EXTRA_EXT(ARB_blend_func_extended);
 EXTRA_EXT(ARB_uniform_buffer_object);
 EXTRA_EXT(ARB_timer_query);
+EXTRA_EXT(ARB_map_buffer_alignment);
 
 static const int
 extra_NV_primitive_restart[] = {
index 7a25cb10c1149cadd8591ca1cf719b96e914c688..1ff05b304586a8d1a8a7f18127cc07bb54ac931d 100644 (file)
@@ -685,6 +685,9 @@ descriptor=[
 
 # GL_ARB_timer_query
   [ "TIMESTAMP", "LOC_CUSTOM, TYPE_INT64, 0, extra_ARB_timer_query" ],
+
+# GL_ARB_map_buffer_alignment
+  [ "MIN_MAP_BUFFER_ALIGNMENT", "CONTEXT_INT(Const.MinMapBufferAlignment), extra_ARB_map_buffer_alignment" ],
 ]}
 
 ]
index 7f2adc773b642918725e75e38c7c0c8353b65687..ed8bd5ee336d57b0bcc21610570c6574a8172fdc 100644 (file)
@@ -2919,6 +2919,9 @@ struct gl_constants
     * Force software support for primitive restart in the VBO module.
     */
    GLboolean PrimitiveRestartInSoftware;
+
+   /** GL_ARB_map_buffer_alignment */
+   GLuint MinMapBufferAlignment;
 };
 
 
@@ -2954,6 +2957,7 @@ struct gl_extensions
    GLboolean ARB_half_float_pixel;
    GLboolean ARB_half_float_vertex;
    GLboolean ARB_instanced_arrays;
+   GLboolean ARB_map_buffer_alignment;
    GLboolean ARB_map_buffer_range;
    GLboolean ARB_occlusion_query;
    GLboolean ARB_occlusion_query2;