diff options
author | Kenneth Graunke <[email protected]> | 2014-08-21 10:50:31 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-10-13 06:53:54 -0700 |
commit | 4c766c7959192b455ae752a7759ffc159e0524a6 (patch) | |
tree | b10c8973110ed875e4f8578748a87f0b20d063fa /src/mesa | |
parent | a4fe727a5d77c6a20a4e6cceaad34c81cd49f0ec (diff) |
i965: Issue performance warnings when copying the program cache BO.
We don't really want unnecessary buffer copying, so it'd be nice to know
when it's happening.
v2: Drop stall warnings when doing a read-only CPU mapping of the cache
BO. The GPU also uses it in a read-only fashion, so there won't be
any stalls, even though the buffer is busy. (Thanks to Chris Wilson
for catching this mistake.)
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]> [v1]
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_cache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c index 62e03b12984..f4cae8f560b 100644 --- a/src/mesa/drivers/dri/i965/brw_state_cache.c +++ b/src/mesa/drivers/dri/i965/brw_state_cache.c @@ -241,6 +241,8 @@ brw_upload_item_data(struct brw_cache *cache, struct brw_cache_item *item, const void *data) { + struct brw_context *brw = cache->brw; + /* Allocate space in the cache BO for our new program. */ if (cache->next_offset + item->size > cache->bo->size) { uint32_t new_size = cache->bo->size * 2; @@ -255,6 +257,7 @@ brw_upload_item_data(struct brw_cache *cache, * recreate it. */ if (cache->bo_used_by_gpu) { + perf_debug("Copying busy program cache buffer.\n"); brw_cache_new_bo(cache, cache->bo->size); } |