summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-04-19 13:03:21 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:06 -0800
commit5a101e6434d733d066fccc5feae74e1e1b0f2259 (patch)
treebb76cfcbbd21911fd8155d9d9b11f858111e4b44
parent21acc004901629fe376206afd979259a1f220248 (diff)
iris: bo reuse
-rw-r--r--src/gallium/drivers/iris/iris_bufmgr.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c
index 0ca4c97a73e..68f09236960 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/gallium/drivers/iris/iris_bufmgr.c
@@ -48,6 +48,7 @@
#include "common/gen_debug.h"
#include "dev/gen_device_info.h"
#include "main/macros.h"
+#include "util/debug.h"
#include "util/macros.h"
#include "util/hash_table.h"
#include "util/list.h"
@@ -1391,19 +1392,6 @@ iris_bo_flink(struct iris_bo *bo, uint32_t *name)
return 0;
}
-/**
- * Enables unlimited caching of buffer objects for reuse.
- *
- * This is potentially very memory expensive, as the cache at each bucket
- * size is only bounded by how many buffers of that size we've managed to have
- * in flight at once.
- */
-void
-iris_bufmgr_enable_reuse(struct iris_bufmgr *bufmgr)
-{
- bufmgr->bo_reuse = true;
-}
-
static void
add_bucket(struct iris_bufmgr *bufmgr, int size)
{
@@ -1545,6 +1533,9 @@ iris_bufmgr_init(struct gen_device_info *devinfo, int fd)
util_vma_heap_init(&bufmgr->vma_allocator[IRIS_MEMZONE_OTHER],
3 * _4GB, (1ull << 48) - 3 * _4GB);
+ // XXX: driconf
+ bufmgr->bo_reuse = env_var_as_boolean("bo_reuse", true);
+
init_cache_buckets(bufmgr);
bufmgr->name_table =