summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_state.c
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_state.c
parent7fdab3b201bd2a011e8e0b0b15aca7b7fb5a7aa5 (diff)
ilo: handle NULL renderbuffers correctly
Renderbuffers may be NULL since 9baa45f78b8ca7d66280e36009b6a685055d7cd6.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_state.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_state.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state.c b/src/gallium/drivers/ilo/ilo_state.c
index f9aa76d5382..43dc34756e9 100644
--- a/src/gallium/drivers/ilo/ilo_state.c
+++ b/src/gallium/drivers/ilo/ilo_state.c
@@ -644,7 +644,7 @@ ilo_set_framebuffer_state(struct pipe_context *pipe,
{
struct ilo_context *ilo = ilo_context(pipe);
- ilo_gpe_init_fb(ilo->dev, state, &ilo->fb);
+ ilo_gpe_set_fb(ilo->dev, state, &ilo->fb);
ilo->dirty |= ILO_DIRTY_FB;
}
@@ -1310,7 +1310,8 @@ ilo_mark_states_with_resource_dirty(struct ilo_context *ilo,
/* for now? */
if (res->target != PIPE_BUFFER) {
for (i = 0; i < ilo->fb.state.nr_cbufs; i++) {
- if (ilo->fb.state.cbufs[i]->texture == res) {
+ const struct pipe_surface *surf = ilo->fb.state.cbufs[i];
+ if (surf && surf->texture == res) {
states |= ILO_DIRTY_FB;
break;
}