summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/intel_buffer_objects.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2017-04-09 23:14:56 -0700
committerKenneth Graunke <kenneth@whitecape.org>2017-04-10 14:33:18 -0700
commitbd84252be62608c0b8e46173a774ec372c9708cc (patch)
treeebd223579d669c49540c640d6146e41d1f26c681 /src/mesa/drivers/dri/i965/intel_buffer_objects.c
parentf053ee78ed2415a91d2960da50ea7c2ff9eddaa5 (diff)
i965/drm: Add stall warnings when mapping or waiting on BOs.
This restores the performance warnings removed in: i965: Drop brw_bo_map[_gtt] wrappers which issue perf warnings. but adds them for nearly all BO mapping, and also for wait_rendering. Because we add this to the core bufmgr, we automatically get stall warnings in all callers, unlike before where only a few callsites used the wrappers that gave stall warnings. We also do it a bit differently: we simply measure how long set_domain takes (the part that stalls), and complain if it's more than 0.01 ms. We don't bother calling brw_bo_busy(), and we don't measure the mmap time (which doesn't stall). This should be more accurate. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_buffer_objects.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_buffer_objects.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
index e0cef91dbab..9f1f7932ea7 100644
--- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
@@ -217,7 +217,7 @@ brw_buffer_subdata(struct gl_context *ctx,
if (offset + size <= intel_obj->gpu_active_start ||
intel_obj->gpu_active_end <= offset) {
if (brw->has_llc) {
- brw_bo_map_unsynchronized(intel_obj->buffer);
+ brw_bo_map_unsynchronized(brw, intel_obj->buffer);
memcpy(intel_obj->buffer->virtual + offset, data, size);
brw_bo_unmap(intel_obj->buffer);
@@ -389,10 +389,10 @@ brw_map_buffer_range(struct gl_context *ctx,
intel_obj->map_extra[index],
alignment);
if (brw->has_llc) {
- brw_bo_map(intel_obj->range_map_bo[index],
- (access & GL_MAP_WRITE_BIT) != 0);
+ brw_bo_map(brw, intel_obj->range_map_bo[index],
+ (access & GL_MAP_WRITE_BIT) != 0);
} else {
- brw_bo_map_gtt(intel_obj->range_map_bo[index]);
+ brw_bo_map_gtt(brw, intel_obj->range_map_bo[index]);
}
obj->Mappings[index].Pointer =
intel_obj->range_map_bo[index]->virtual + intel_obj->map_extra[index];
@@ -404,13 +404,13 @@ brw_map_buffer_range(struct gl_context *ctx,
brw_bo_busy(intel_obj->buffer)) {
perf_debug("MapBufferRange with GL_MAP_UNSYNCHRONIZED_BIT stalling (it's actually synchronized on non-LLC platforms)\n");
}
- brw_bo_map_unsynchronized(intel_obj->buffer);
+ brw_bo_map_unsynchronized(brw, intel_obj->buffer);
} else if (!brw->has_llc && (!(access & GL_MAP_READ_BIT) ||
(access & GL_MAP_PERSISTENT_BIT))) {
- brw_bo_map_gtt(intel_obj->buffer);
+ brw_bo_map_gtt(brw, intel_obj->buffer);
mark_buffer_inactive(intel_obj);
} else {
- brw_bo_map(intel_obj->buffer, (access & GL_MAP_WRITE_BIT) != 0);
+ brw_bo_map(brw, intel_obj->buffer, (access & GL_MAP_WRITE_BIT) != 0);
mark_buffer_inactive(intel_obj);
}