Home | History | Annotate | Download | only in client

Lines Matching full:cache

27 qboolean        r_cache_thrash;         // set if surface cache is thrashing

86 // Con_Printf ("%ik surface cache\n", size/1024);
135 Sys_Error ("D_SCAlloc: bad cache width %d\n", width);
138 Sys_Error ("D_SCAlloc: bad cache size %d\n", size);
147 Sys_Error ("D_SCAlloc: %i > cache size",size);
269 surfcache_t *cache;
272 // if the surface is animating or flashing, flush the cache
281 // see if the cache holds apropriate data
283 cache = surface->cachespots[miplevel];
285 if (cache && !cache->dlight && surface->dlightframe != r_framecount
286 && cache->texture == r_drawsurf.texture
287 && cache->lightadj[0] == r_drawsurf.lightadj[0]
288 && cache->lightadj[1] == r_drawsurf.lightadj[1]
289 && cache->lightadj[2] == r_drawsurf.lightadj[2]
290 && cache->lightadj[3] == r_drawsurf.lightadj[3] )
291 return cache;
305 if (!cache) // if a texture just animated, don't reallocate it
307 cache = D_SCAlloc (r_drawsurf.surfwidth,
309 surface->cachespots[miplevel] = cache;
310 cache->owner = &surface->cachespots[miplevel];
311 cache->mipscale = surfscale;
315 cache->dlight = 1;
317 cache->dlight = 0;
319 r_drawsurf.surfdat = (pixel_t *)cache->data;
321 cache->texture = r_drawsurf.texture;
322 cache->lightadj[0] = r_drawsurf.lightadj[0];
323 cache->lightadj[1] = r_drawsurf.lightadj[1];
324 cache->lightadj[2] = r_drawsurf.lightadj[2];
325 cache->lightadj[3] = r_drawsurf.lightadj[3];