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>
(cherry picked from commit 52b65dfda8)
This commit is contained in:
Kenneth Graunke 2017-08-31 23:54:20 -07:00 committed by Emil Velikov
parent 458f52618a
commit 8f77409e2b

View file

@ -953,8 +953,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.
*/
if (!map && !(flags & MAP_RAW)) {
perf_debug("Fallback GTT mapping for %s with access flags %x\n",
bo->name, flags);
if (brw) {
perf_debug("Fallback GTT mapping for %s with access flags %x\n",
bo->name, flags);
}
map = brw_bo_map_gtt(brw, bo, flags);
}