diff options
author | Brian Paul <[email protected]> | 2014-01-15 18:09:56 -0800 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-01-17 08:52:11 -0800 |
commit | d6fa71fbb0d365cefdabfea9de62cfece71f7486 (patch) | |
tree | a92afaaefdd8163c05a1fdbb17d529a635faef5a /src/gallium/drivers/llvmpipe/lp_rast_priv.h | |
parent | 7b4ceec0b7591fa7a2dd66c45727341f52bf5258 (diff) |
llvmpipe: handle NULL color buffer pointers
Fixes regression from 9baa45f78b8ca7d66280e36009b6a685055d7cd6
v2: incorporate a few small changes suggested by Roland.
Reviewed-by: José Fonseca <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast_priv.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast_priv.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h index bc361b6f1b9..063a70e9a34 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h +++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h @@ -293,8 +293,15 @@ lp_rast_shade_quads_all( struct lp_rasterizer_task *task, /* color buffer */ for (i = 0; i < scene->fb.nr_cbufs; i++) { - stride[i] = scene->cbufs[i].stride; - color[i] = lp_rast_get_unswizzled_color_block_pointer(task, i, x, y, inputs->layer); + if (scene->fb.cbufs[i]) { + stride[i] = scene->cbufs[i].stride; + color[i] = lp_rast_get_unswizzled_color_block_pointer(task, i, x, y, + inputs->layer); + } + else { + stride[i] = 0; + color[i] = NULL; + } } if (scene->zsbuf.map) { |