summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian@i915.localnet.net>2008-02-25 16:20:04 -0700
committerBrian <brian@i915.localnet.net>2008-02-25 16:20:04 -0700
commitf41e95755757cb1452697fafa1dd5288390ed57e (patch)
treef6fa144948f0d8db9b9a63c6e15a6d4d406e030f
parentb53110c78941e7fcaa41921cce07ca00ec117a97 (diff)
gallium/i915: need to recompute vertex info if vertex shader changes
-rw-r--r--src/gallium/drivers/i915simple/i915_context.h1
-rw-r--r--src/gallium/drivers/i915simple/i915_state.c2
-rw-r--r--src/gallium/drivers/i915simple/i915_state_derived.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915simple/i915_context.h b/src/gallium/drivers/i915simple/i915_context.h
index 5cc38cdc85..d32dded6bd 100644
--- a/src/gallium/drivers/i915simple/i915_context.h
+++ b/src/gallium/drivers/i915simple/i915_context.h
@@ -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:
diff --git a/src/gallium/drivers/i915simple/i915_state.c b/src/gallium/drivers/i915simple/i915_state.c
index e4288d4e31..a35bdf941f 100644
--- a/src/gallium/drivers/i915simple/i915_state.c
+++ b/src/gallium/drivers/i915simple/i915_state.c
@@ -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)
diff --git a/src/gallium/drivers/i915simple/i915_state_derived.c b/src/gallium/drivers/i915simple/i915_state_derived.c
index fe52fe6e6b..5cf70acdf3 100644
--- a/src/gallium/drivers/i915simple/i915_state_derived.c
+++ b/src/gallium/drivers/i915simple/i915_state_derived.c
@@ -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))