if (query->bo == NULL)
return;
+ if (unlikely(INTEL_DEBUG & DEBUG_PERF)) {
+ if (drm_intel_bo_busy(query->bo)) {
+ perf_debug("Stalling on the GPU waiting for a query object.\n");
+ }
+ }
+
drm_intel_bo_map(query->bo, false);
results = query->bo->virtual;
switch (query->Base.Target) {
intel_bufferobj_alloc_buffer(intel, intel_obj);
drm_intel_bo_subdata(intel_obj->buffer, 0, size, data);
} else {
- /* Use the blitter to upload the new data. */
+ perf_debug("Using a blit copy to avoid stalling on glBufferSubData() "
+ "to a busy buffer object.\n");
drm_intel_bo *temp_bo =
drm_intel_bo_alloc(intel->bufmgr, "subdata temp", size, 64);
drm_intel_bo_unreference(temp_bo);
}
} else {
+ if (unlikely(INTEL_DEBUG & DEBUG_PERF)) {
+ if (drm_intel_bo_busy(intel_obj->buffer)) {
+ perf_debug("Stalling on the GPU in glBufferSubData().\n");
+ }
+ }
drm_intel_bo_subdata(intel_obj->buffer, offset, size, data);
}
}
* flush is only needed on first map of the buffer.
*/
+ if (unlikely(INTEL_DEBUG & DEBUG_PERF)) {
+ if (drm_intel_bo_busy(region->bo)) {
+ perf_debug("Mapping a busy BO, causing a stall on the GPU.\n");
+ }
+ }
+
_DBG("%s %p\n", __FUNCTION__, region);
if (!region->map_refcount) {
intel_flush(&intel->ctx);