diff options
author | Kenneth Graunke <[email protected]> | 2019-03-23 09:32:38 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-03-28 23:37:32 -0700 |
commit | 3fee3d1319768e6304edbe71296d68eeba973685 (patch) | |
tree | f6227f6159807a88837aabd392c57dd0628f3313 /src/gallium | |
parent | 4ee057eaef4c8b6e794d03f7b0543aa824a338b8 (diff) |
iris: Print the memzone name when allocating BOs with INTEL_DEBUG=buf
This gives me an idea of what kinds of buffers are being allocated on
the fly which could help inform our cache decisions.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/iris/iris_bufmgr.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index e0d167913d2..56261d4a947 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -117,6 +117,21 @@ atomic_add_unless(int *v, int add, int unless) return c == unless; } +static const char * +memzone_name(enum iris_memory_zone memzone) +{ + const char *names[] = { + [IRIS_MEMZONE_SHADER] = "shader", + [IRIS_MEMZONE_BINDER] = "binder", + [IRIS_MEMZONE_SURFACE] = "surface", + [IRIS_MEMZONE_DYNAMIC] = "dynamic", + [IRIS_MEMZONE_OTHER] = "other", + [IRIS_MEMZONE_BORDER_COLOR_POOL] = "bordercolor", + }; + assert(memzone < ARRAY_SIZE(names)); + return names[memzone]; +} + /** * Iris fixed-size bucketing VMA allocator. * @@ -662,8 +677,8 @@ skip_cache: } } - DBG("bo_create: buf %d (%s) %llub\n", bo->gem_handle, bo->name, - (unsigned long long) size); + DBG("bo_create: buf %d (%s) (%s memzone) %llub\n", bo->gem_handle, + bo->name, memzone_name(memzone), (unsigned long long) size); return bo; |