Added debug-log in case of bo-allocation with 0 size. Potentially we may not need to allocate such buffers and each case could be analyzed to improve behaviour.
Signed-off-by: Sergii Romantsov <sergii.romant...@globallogic.com> --- src/mesa/drivers/dri/i965/brw_bufmgr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c index 09d45e3..726b266 100644 --- a/src/mesa/drivers/dri/i965/brw_bufmgr.c +++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c @@ -514,6 +514,9 @@ bo_alloc_internal(struct brw_bufmgr *bufmgr, * be idle before we can memset. Just disallow that combination. */ assert(!(busy && zeroed)); + if (!size && unlikely(INTEL_DEBUG & DEBUG_PERF)) + dbg_printf("performance: allocation of 0-sized BO: %s\n", name); + /* Round the allocated size up to a power of two number of pages. */ bucket = bucket_for_size(bufmgr, size); -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev