OSDN Git Service

i965: more fixes for Google Play crashing android-x86-7.1-r2 android-x86-7.1-r3
authorChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 23 Apr 2018 02:01:12 +0000 (10:01 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 23 Apr 2018 02:01:12 +0000 (10:01 +0800)
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index a6b6af2..feed67a 100644 (file)
@@ -196,7 +196,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
    struct gl_context *ctx = &brw->ctx;
    struct intel_renderbuffer *irb = intel_renderbuffer(rb);
    struct intel_mipmap_tree *mt = irb->mt;
-   if (!irb || !mt) return 0;
+   if (!mt) return 0;
 
    if (brw->gen < 9) {
       assert(!(flags & INTEL_AUX_BUFFER_DISABLED));
index e06ee59..e52a75e 100644 (file)
@@ -3041,6 +3041,7 @@ intel_miptree_map(struct brw_context *brw,
 {
    struct intel_miptree_map *map;
 
+   if (!mt) return;
    assert(mt->num_samples <= 1);
 
    map = intel_miptree_attach_map(mt, level, slice, x, y, w, h, mode);
@@ -3087,6 +3088,7 @@ intel_miptree_unmap(struct brw_context *brw,
                     unsigned int level,
                     unsigned int slice)
 {
+   if (!mt) return;
    struct intel_miptree_map *map = mt->level[level].slice[slice].map;
 
    assert(mt->num_samples <= 1);