pipe_surface_reference(&ctx->framebuffer.zsbuf, NULL);
- for (unsigned i = 0; i < Elements(ctx->sampler_views[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(ctx->sampler_views[0]); i++) {
pipe_sampler_view_reference(&ctx->sampler_views[PIPE_SHADER_FRAGMENT][i], NULL);
}
- for (unsigned i = 0; i < Elements(ctx->sampler_views[0]); i++) {
+ for (unsigned i = 0; i < ARRAY_SIZE(ctx->sampler_views[0]); i++) {
pipe_sampler_view_reference(&ctx->sampler_views[PIPE_SHADER_VERTEX][i], NULL);
}
unsigned i;
assert(shader < PIPE_SHADER_TYPES);
- assert(start + num <= Elements(ctx->samplers[shader]));
+ assert(start + num <= ARRAY_SIZE(ctx->samplers[shader]));
/* set the new samplers */
ctx->num_samplers[shader] = num;
assert(num <= PIPE_MAX_SHADER_SAMPLER_VIEWS);
assert(shader < PIPE_SHADER_TYPES);
- assert(start + num <= Elements(ctx->sampler_views[shader]));
+ assert(start + num <= ARRAY_SIZE(ctx->sampler_views[shader]));
/* set the new sampler views */
ctx->num_sampler_views[shader] = num;
struct pipe_resource *constants = cb ? cb->buffer : NULL;
assert(shader < PIPE_SHADER_TYPES);
- assert(index < Elements(ctx->constants[shader]));
+ assert(index < ARRAY_SIZE(ctx->constants[shader]));
/* note: reference counting */
util_copy_constant_buffer(&ctx->constants[shader][index], cb);
/* context[0].textures[unit].member */
indices[3] = lp_build_const_int32(gallivm, member_index);
- ptr = LLVMBuildGEP(builder, context_ptr, indices, Elements(indices), "");
+ ptr = LLVMBuildGEP(builder, context_ptr, indices, ARRAY_SIZE(indices), "");
if (emit_load)
res = LLVMBuildLoad(builder, ptr, "");
/* context[0].samplers[unit].member */
indices[3] = lp_build_const_int32(gallivm, member_index);
- ptr = LLVMBuildGEP(builder, context_ptr, indices, Elements(indices), "");
+ ptr = LLVMBuildGEP(builder, context_ptr, indices, ARRAY_SIZE(indices), "");
if (emit_load)
res = LLVMBuildLoad(builder, ptr, "");