Requested by Marek.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
*/
struct pb_manager *
pb_cache_manager_create(struct pb_manager *provider,
- unsigned usecs,
- unsigned size_factor,
+ unsigned usecs,
+ float size_factor,
unsigned bypass_usage);
struct list_head delayed;
pb_size numDelayed;
- unsigned size_factor;
+ float size_factor;
unsigned bypass_usage;
};
return 0;
/* be lenient with size */
- if(buf->base.size > buf->mgr->size_factor*size)
+ if(buf->base.size > (unsigned) (buf->mgr->size_factor * size))
return 0;
if(!pb_check_alignment(desc->alignment, buf->base.alignment))
*/
struct pb_manager *
pb_cache_manager_create(struct pb_manager *provider,
- unsigned usecs,
- unsigned size_factor,
+ unsigned usecs,
+ float size_factor,
unsigned bypass_usage)
{
struct pb_cache_manager *mgr;
ws->kman = radeon_bomgr_create(ws);
if (!ws->kman)
goto fail;
- ws->cman = pb_cache_manager_create(ws->kman, 1000000, 2, 0);
+ ws->cman = pb_cache_manager_create(ws->kman, 1000000, 2.0f, 0);
if (!ws->cman)
goto fail;
struct pb_desc desc;
vws->pools.mob_cache =
- pb_cache_manager_create(vws->pools.gmr, 100000, 2,
+ pb_cache_manager_create(vws->pools.gmr, 100000, 2.0f,
VMW_BUFFER_USAGE_SHARED);
if (!vws->pools.mob_cache)
return FALSE;