diff options
Diffstat (limited to 'src/gallium/drivers/i915/i915_state.c')
-rw-r--r-- | src/gallium/drivers/i915/i915_state.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index 8af26fa9dc5..fdbff8b4a4e 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -310,7 +310,7 @@ i915_bind_vertex_sampler_states(struct pipe_context *pipe, struct i915_context *i915 = i915_context(pipe); unsigned i; - assert(num_samplers <= PIPE_MAX_VERTEX_SAMPLERS); + assert(num_samplers <= Elements(i915->vertex_samplers)); /* Check for no-op */ if (num_samplers == i915->num_vertex_samplers && @@ -319,7 +319,7 @@ i915_bind_vertex_sampler_states(struct pipe_context *pipe, for (i = 0; i < num_samplers; ++i) i915->vertex_samplers[i] = samplers[i]; - for (i = num_samplers; i < PIPE_MAX_VERTEX_SAMPLERS; ++i) + for (i = num_samplers; i < Elements(i915->vertex_samplers); ++i) i915->vertex_samplers[i] = NULL; i915->num_vertex_samplers = num_samplers; @@ -374,11 +374,11 @@ i915_prepare_vertex_sampling(struct i915_context *i915) unsigned num = i915->num_vertex_sampler_views; struct pipe_sampler_view **views = i915->vertex_sampler_views; - assert(num <= PIPE_MAX_VERTEX_SAMPLERS); + assert(num <= PIPE_MAX_SAMPLERS); if (!num) return; - for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) { + for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { struct pipe_sampler_view *view = i < num ? views[i] : NULL; if (view) { @@ -777,7 +777,7 @@ i915_set_vertex_sampler_views(struct pipe_context *pipe, struct i915_context *i915 = i915_context(pipe); uint i; - assert(num <= PIPE_MAX_VERTEX_SAMPLERS); + assert(num <= Elements(i915->vertex_sampler_views)); /* Check for no-op */ if (num == i915->num_vertex_sampler_views && @@ -785,7 +785,7 @@ i915_set_vertex_sampler_views(struct pipe_context *pipe, return; } - for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) { + for (i = 0; i < Elements(i915->vertex_sampler_views); i++) { struct pipe_sampler_view *view = i < num ? views[i] : NULL; pipe_sampler_view_reference(&i915->vertex_sampler_views[i], view); |