summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_state.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-04-28 11:37:50 -0600
committerBrian Paul <[email protected]>2016-05-03 15:40:48 -0600
commit951bf8b4a64c9793d10e963889e74fc1659ddb4b (patch)
tree8f14d66b2e29250f9c06d7f341682b257cd29160 /src/gallium/drivers/i915/i915_state.c
parent5658ddc7fe828813f8e10de06a830d8a4cdb576d (diff)
i915g: s/Elements/ARRAY_SIZE/
Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/i915/i915_state.c')
-rw-r--r--src/gallium/drivers/i915/i915_state.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index b54a9fbf4f9..8fa2f42e7c6 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -301,7 +301,7 @@ i915_bind_vertex_sampler_states(struct pipe_context *pipe,
struct i915_context *i915 = i915_context(pipe);
unsigned i;
- assert(start + num <= Elements(i915->vertex_samplers));
+ assert(start + num <= ARRAY_SIZE(i915->vertex_samplers));
/* Check for no-op */
if (num == i915->num_vertex_samplers &&
@@ -443,7 +443,7 @@ i915_cleanup_vertex_sampling(struct i915_context *i915)
{
struct i915_winsys *iws = i915->iws;
unsigned i;
- for (i = 0; i < Elements(i915->mapped_vs_tex); i++) {
+ for (i = 0; i < ARRAY_SIZE(i915->mapped_vs_tex); i++) {
if (i915->mapped_vs_tex_buffer[i]) {
iws->buffer_unmap(iws, i915->mapped_vs_tex_buffer[i]);
pipe_resource_reference(&i915->mapped_vs_tex[i], NULL);
@@ -769,7 +769,7 @@ i915_set_vertex_sampler_views(struct pipe_context *pipe,
struct i915_context *i915 = i915_context(pipe);
uint i;
- assert(num <= Elements(i915->vertex_sampler_views));
+ assert(num <= ARRAY_SIZE(i915->vertex_sampler_views));
/* Check for no-op */
if (num == i915->num_vertex_sampler_views &&
@@ -777,7 +777,7 @@ i915_set_vertex_sampler_views(struct pipe_context *pipe,
return;
}
- for (i = 0; i < Elements(i915->vertex_sampler_views); i++) {
+ for (i = 0; i < ARRAY_SIZE(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);