intel: Add support for ARB_draw_elements_base_vertex.
authorEric Anholt <eric@anholt.net>
Thu, 27 Aug 2009 21:59:19 +0000 (14:59 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 8 Sep 2009 22:12:22 +0000 (15:12 -0700)
On the 965, we just drop the value into the primitive packet.  On non-945,
we rely on the sw tnl code handling it.

src/mesa/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/intel/intel_extensions.c

index 4411b24..42961dd 100644 (file)
@@ -142,7 +142,7 @@ static void brw_emit_prim(struct brw_context *brw,
       prim_packet.start_vert_location += brw->ib.start_vertex_offset;
    prim_packet.instance_count = 1;
    prim_packet.start_instance_location = 0;
-   prim_packet.base_vert_location = 0;
+   prim_packet.base_vert_location = prim->basevertex;
 
    /* Can't wrap here, since we rely on the validated state. */
    brw->no_batch_wrap = GL_TRUE;
index 125ca93..5431cf9 100644 (file)
@@ -31,6 +31,7 @@
 
 
 #define need_GL_ARB_copy_buffer
+#define need_GL_ARB_draw_elements_base_vertex
 #define need_GL_ARB_framebuffer_object
 #define need_GL_ARB_map_buffer_range
 #define need_GL_ARB_occlusion_query
@@ -73,6 +74,7 @@
  */
 static const struct dri_extension card_extensions[] = {
    { "GL_ARB_copy_buffer",                GL_ARB_copy_buffer_functions },
+   { "GL_ARB_draw_elements_base_vertex",  GL_ARB_draw_elements_base_vertex_functions },
    { "GL_ARB_half_float_pixel",           NULL },
    { "GL_ARB_map_buffer_range",           GL_ARB_map_buffer_range_functions },
    { "GL_ARB_multitexture",               NULL },