summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_blit.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-01-14 16:02:34 +0800
committerChia-I Wu <[email protected]>2014-01-14 16:27:57 +0800
commitfa772aa92baf659855f69829fa3f0d0f4fcbc2a6 (patch)
tree7ae72065ae0d5711fa92fb5382ab721bd0a01115 /src/gallium/drivers/ilo/ilo_blit.h
parent7fdab3b201bd2a011e8e0b0b15aca7b7fb5a7aa5 (diff)
ilo: handle NULL renderbuffers correctly
Renderbuffers may be NULL since 9baa45f78b8ca7d66280e36009b6a685055d7cd6.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_blit.h')
-rw-r--r--src/gallium/drivers/ilo/ilo_blit.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/ilo/ilo_blit.h b/src/gallium/drivers/ilo/ilo_blit.h
index 61fa322c9f5..1e33824d4d7 100644
--- a/src/gallium/drivers/ilo/ilo_blit.h
+++ b/src/gallium/drivers/ilo/ilo_blit.h
@@ -179,8 +179,11 @@ ilo_blit_resolve_framebuffer(struct ilo_context *ilo)
}
}
- for (i = 0; i < fb->nr_cbufs; i++)
- ilo_blit_resolve_surface(ilo, fb->cbufs[i], ILO_TEXTURE_RENDER_WRITE);
+ for (i = 0; i < fb->nr_cbufs; i++) {
+ struct pipe_surface *surf = fb->cbufs[i];
+ if (surf)
+ ilo_blit_resolve_surface(ilo, surf, ILO_TEXTURE_RENDER_WRITE);
+ }
if (fb->zsbuf)
ilo_blit_resolve_surface(ilo, fb->zsbuf, ILO_TEXTURE_RENDER_WRITE);