Module: Mesa
Branch: master
Commit: 52b65dfda84e4d433a332dd84596eef054eb5cbb
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=52b65dfda84e4d433a332dd84596eef054eb5cbb

Author: Kenneth Graunke <kenn...@whitecape.org>
Date:   Thu Aug 31 23:54:20 2017 -0700

i965: Fix crash in fallback GTT mapping.

We can't perf_debug without a context.

Cc: mesa-sta...@lists.freedesktop.org
Reviewed-by: Anuj Phogat <anuj.pho...@gmail.com>

---

 src/mesa/drivers/dri/i965/brw_bufmgr.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c 
b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index 6a7422fff9..801721991f 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -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.
     */
    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);
    }
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to