OSDN Git Service

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 5cc38cd..d32dded 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 e4288d4..a35bdf9 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 fe52fe6..5cf70ac 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))