summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc5/vc5_state.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-01-20 10:19:20 -0800
committerEric Anholt <[email protected]>2018-02-01 11:02:29 -0800
commiteb765394c2fd8232158fe02c8644309657dc1fe3 (patch)
treee88d1797072c9f7815f3800bdc9eb9249b7e8421 /src/gallium/drivers/vc5/vc5_state.c
parentaec066c7aa35084ccf6391bdf96028ef6056af1e (diff)
broadcom/vc5: Skip over missing color buffers for a couple of checks.
Fixes crashes in piglit alpha-to-coverage-no-draw-buffer-zero 2
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_state.c')
-rw-r--r--src/gallium/drivers/vc5/vc5_state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc5/vc5_state.c b/src/gallium/drivers/vc5/vc5_state.c
index 81ae33d7178..ea867279a06 100644
--- a/src/gallium/drivers/vc5/vc5_state.c
+++ b/src/gallium/drivers/vc5/vc5_state.c
@@ -443,6 +443,9 @@ vc5_set_framebuffer_state(struct pipe_context *pctx,
vc5->blend_dst_alpha_one = 0;
for (int i = 0; i < vc5->framebuffer.nr_cbufs; i++) {
struct pipe_surface *cbuf = vc5->framebuffer.cbufs[i];
+ if (!cbuf)
+ continue;
+
const struct util_format_description *desc =
util_format_description(cbuf->format);