{
struct softpipe_tile_cache *tc;
uint pos;
- int maxLevels, maxTexSize;
+ MAYBE_UNUSED int maxTexSize;
+ int maxLevels;
/* sanity checking: max sure MAX_WIDTH/HEIGHT >= largest texture image */
maxLevels = pipe->screen->get_param(pipe->screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS);
tc = CALLOC_STRUCT( softpipe_tile_cache );
if (tc) {
tc->pipe = pipe;
- for (pos = 0; pos < Elements(tc->tile_addrs); pos++) {
+ for (pos = 0; pos < ARRAY_SIZE(tc->tile_addrs); pos++) {
tc->tile_addrs[pos].bits.invalid = 1;
}
tc->last_tile_addr.bits.invalid = 1;
if (tc) {
uint pos;
- for (pos = 0; pos < Elements(tc->entries); pos++) {
+ for (pos = 0; pos < ARRAY_SIZE(tc->entries); pos++) {
/*assert(tc->entries[pos].x < 0);*/
FREE( tc->entries[pos] );
}
int i;
if (tc->num_maps) {
/* caching a drawing transfer */
- for (pos = 0; pos < Elements(tc->entries); pos++) {
+ for (pos = 0; pos < ARRAY_SIZE(tc->entries); pos++) {
struct softpipe_cached_tile *tile = tc->entries[pos];
if (!tile)
{
if (!tc->tile)
{
unsigned pos;
- for (pos = 0; pos < Elements(tc->entries); ++pos) {
+ for (pos = 0; pos < ARRAY_SIZE(tc->entries); ++pos) {
if (!tc->entries[pos])
continue;
/* set flags to indicate all the tiles are cleared */
memset(tc->clear_flags, 255, tc->clear_flags_size);
- for (pos = 0; pos < Elements(tc->tile_addrs); pos++) {
+ for (pos = 0; pos < ARRAY_SIZE(tc->tile_addrs); pos++) {
tc->tile_addrs[pos].bits.invalid = 1;
}
tc->last_tile_addr.bits.invalid = 1;