Module: Mesa Branch: master Commit: eb765394c2fd8232158fe02c8644309657dc1fe3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb765394c2fd8232158fe02c8644309657dc1fe3
Author: Eric Anholt <e...@anholt.net> Date: Sat Jan 20 10:19:20 2018 -0800 broadcom/vc5: Skip over missing color buffers for a couple of checks. Fixes crashes in piglit alpha-to-coverage-no-draw-buffer-zero 2 --- src/gallium/drivers/vc5/vc5_program.c | 3 +++ src/gallium/drivers/vc5/vc5_state.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/gallium/drivers/vc5/vc5_program.c b/src/gallium/drivers/vc5/vc5_program.c index ddb51b7f02..881bd4501d 100644 --- a/src/gallium/drivers/vc5/vc5_program.c +++ b/src/gallium/drivers/vc5/vc5_program.c @@ -378,6 +378,9 @@ vc5_update_compiled_fs(struct vc5_context *vc5, uint8_t prim_mode) for (int i = 0; i < key->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); diff --git a/src/gallium/drivers/vc5/vc5_state.c b/src/gallium/drivers/vc5/vc5_state.c index 81ae33d717..ea867279a0 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); _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit