struct kgem_bo *old;
int i;
- DBG(("sna_render_finish_solid(force=%d, domain=%d, busy=%d, dirty=%d)\n",
- force, cache->cache_bo->domain, cache->cache_bo->rq != NULL, cache->dirty));
+ DBG(("sna_render_finish_solid(force=%d, domain=%d, busy=%d, dirty=%d, size=%d)\n",
+ force, cache->cache_bo->domain, cache->cache_bo->rq != NULL, cache->dirty, cache->size));
if (!force && cache->cache_bo->domain != DOMAIN_GPU)
return;
}
}
- sna_render_finish_solid(sna, i == 1024);
+ sna_render_finish_solid(sna, i == ARRAY_SIZE(cache->color));
i = cache->size++;
+ assert(i < ARRAY_SIZE(cache->color));
cache->color[i] = color;
cache->dirty = 1;
DBG(("sna_render_get_solid(%d) = %x (new)\n", i, color));
if (!cache->cache_bo)
return false;
- cache->last = 1024;
+ cache->last = 0;
cache->color[cache->last] = 0;
cache->dirty = 0;
cache->size = 0;