gallium/i915: need to recompute vertex info if vertex shader changes
authorBrian <brian@i915.localnet.net>
Mon, 25 Feb 2008 23:20:04 +0000 (16:20 -0700)
committerBrian <brian@i915.localnet.net>
Mon, 25 Feb 2008 23:20:04 +0000 (16:20 -0700)
src/gallium/drivers/i915simple/i915_context.h
src/gallium/drivers/i915simple/i915_state.c
src/gallium/drivers/i915simple/i915_state_derived.c

index 5cc38cdc8517561fcd4f1ffac8493f961dfd8ed0..d32dded6bdc276d4c0909b098fca69074a2494b3 100644 (file)
@@ -263,6 +263,7 @@ struct i915_context
 #define I915_NEW_TEXTURE       0x800
 #define I915_NEW_CONSTANTS     0x1000
 #define I915_NEW_VBO           0x2000
+#define I915_NEW_VS            0x4000
 
 
 /* Driver's internally generated state flags:
index e4288d4e319c4b671e6b04f6698e12aa96faa3eb..a35bdf941fc00d3f905042145ba98f6d0be71aa2 100644 (file)
@@ -474,6 +474,8 @@ static void i915_bind_vs_state(struct pipe_context *pipe, void *shader)
 
    /* just pass-through to draw module */
    draw_bind_vertex_shader(i915->draw, (struct draw_vertex_shader *) shader);
+
+   i915->dirty |= I915_NEW_VS;
 }
 
 static void i915_delete_vs_state(struct pipe_context *pipe, void *shader)
index fe52fe6e6bd86a8a355b289825c50d3f9117f9e8..5cf70acdf3b031b68b35698bb437e2500fc60cbe 100644 (file)
@@ -155,7 +155,7 @@ static void calculate_vertex_layout( struct i915_context *i915 )
  */
 void i915_update_derived( struct i915_context *i915 )
 {
-   if (i915->dirty & (I915_NEW_RASTERIZER | I915_NEW_FS))
+   if (i915->dirty & (I915_NEW_RASTERIZER | I915_NEW_FS | I915_NEW_VS))
       calculate_vertex_layout( i915 );
 
    if (i915->dirty & (I915_NEW_SAMPLER | I915_NEW_TEXTURE))