i965: Fix crash in fallback GTT mapping.

We can't perf_debug without a context.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
Kenneth Graunke 2017-08-31 23:54:20 -07:00
parent e5654fc450
commit 52b65dfda8

View file

@ -944,8 +944,10 @@ brw_bo_map(struct brw_context *brw, struct brw_bo *bo, unsigned flags)
* We skip MAP_RAW because we want to avoid map_gtt's fence detiling. * We skip MAP_RAW because we want to avoid map_gtt's fence detiling.
*/ */
if (!map && !(flags & MAP_RAW)) { if (!map && !(flags & MAP_RAW)) {
perf_debug("Fallback GTT mapping for %s with access flags %x\n", if (brw) {
bo->name, flags); perf_debug("Fallback GTT mapping for %s with access flags %x\n",
bo->name, flags);
}
map = brw_bo_map_gtt(brw, bo, flags); map = brw_bo_map_gtt(brw, bo, flags);
} }