i915g: Fix assert
authorStephane Marchesin <stephane.marchesin@gmail.com>
Sat, 12 Oct 2013 18:38:14 +0000 (11:38 -0700)
committerStephane Marchesin <stephane.marchesin@gmail.com>
Sat, 12 Oct 2013 18:40:54 +0000 (11:40 -0700)
Now that we support start, assert on start + num < max samplers

Reported by xexaxo

src/gallium/drivers/i915/i915_state.c

index a858a2589b8efe48d963f8415cd557709ff796a0..f722e2dcfeb8c6ac2e537c6c4be87ad01c9f6c65 100644 (file)
@@ -300,7 +300,7 @@ i915_bind_vertex_sampler_states(struct pipe_context *pipe,
    struct i915_context *i915 = i915_context(pipe);
    unsigned i;
 
-   assert(num <= Elements(i915->vertex_samplers));
+   assert(start + num <= Elements(i915->vertex_samplers));
 
    /* Check for no-op */
    if (num == i915->num_vertex_samplers &&