diff options
author | Brian Paul <[email protected]> | 2014-02-14 07:45:23 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-02-14 09:56:55 -0700 |
commit | e4a5a9fd2fdd5b5ae8b85ac743a228f409a21a70 (patch) | |
tree | 673d2bd16d7fb5baedda1ee911a3459ce7bbb42a /src/gallium/auxiliary/pipebuffer | |
parent | 141e39a8936a7b19fd857a35ea2d200daf1777c7 (diff) |
gallium/pipebuffer: change pb_cache_manager_create() size_factor to float
Requested by Marek.
Reviewed-by: Marek Olšák <[email protected]>
Cc: "10.1" <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer')
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_bufmgr.h | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h b/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h index 3044ec881fd..d5b0ee2ac96 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h @@ -161,8 +161,8 @@ pb_slab_range_manager_create(struct pb_manager *provider, */ struct pb_manager * pb_cache_manager_create(struct pb_manager *provider, - unsigned usecs, - unsigned size_factor, + unsigned usecs, + float size_factor, unsigned bypass_usage); diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c index 0469146d15b..32a88754042 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c @@ -82,7 +82,7 @@ struct pb_cache_manager struct list_head delayed; pb_size numDelayed; - unsigned size_factor; + float size_factor; unsigned bypass_usage; }; @@ -236,7 +236,7 @@ pb_cache_is_buffer_compat(struct pb_cache_buffer *buf, 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)) @@ -403,8 +403,8 @@ pb_cache_manager_destroy(struct pb_manager *mgr) */ 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; |