gallium/i915: make sure state is up to date in i915_vbuf_render_get_vertex_info(...
authorBrian <brian@i915.localnet.net>
Mon, 25 Feb 2008 23:22:58 +0000 (16:22 -0700)
committerBrian <brian@i915.localnet.net>
Mon, 25 Feb 2008 23:22:58 +0000 (16:22 -0700)
src/gallium/drivers/i915simple/i915_prim_vbuf.c

index c5bf6174f681024eafbae78edc7f651a61dd1deb..9d5f609220aa383dfcc465c5cc07991cef2f43a3 100644 (file)
@@ -83,6 +83,12 @@ i915_vbuf_render_get_vertex_info( struct vbuf_render *render )
 {
    struct i915_vbuf_render *i915_render = i915_vbuf_render(render);
    struct i915_context *i915 = i915_render->i915;
+
+   if (i915->dirty) {
+      /* make sure we have up to date vertex layout */
+      i915_update_derived( i915 );
+   }
+
    return &i915->current.vertex_info;
 }
 
@@ -143,7 +149,8 @@ i915_vbuf_render_draw( struct vbuf_render *render,
 
    assert(nr_indices);
 
-   assert((i915->dirty & ~I915_NEW_VBO) == 0);
+   /* this seems to be bogus, since we validate state right after this */
+   /*assert((i915->dirty & ~I915_NEW_VBO) == 0);*/
    
    if (i915->dirty)
       i915_update_derived( i915 );