diff options
author | Christian König <[email protected]> | 2011-06-09 09:35:09 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-06-09 09:35:09 +0200 |
commit | 003401f95c9b59471c22368b7da16fe7a951e490 (patch) | |
tree | d21fa0197ff27b8a38bd8b1d795b74d816db8b26 /src/mesa/swrast/s_clear.c | |
parent | 00b4e48560f4d576b7b1924257322f5167e58c8d (diff) | |
parent | d302804debeed13ced27fce222110c629e55d6f9 (diff) |
Merge remote-tracking branch 'origin/master' into pipe-video
Conflicts:
src/gallium/tests/unit/u_format_test.c
src/gallium/winsys/r600/drm/r600_hw_context.c
Diffstat (limited to 'src/mesa/swrast/s_clear.c')
-rw-r--r-- | src/mesa/swrast/s_clear.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_clear.c b/src/mesa/swrast/s_clear.c index 75805f9605d..9e9b5311684 100644 --- a/src/mesa/swrast/s_clear.c +++ b/src/mesa/swrast/s_clear.c @@ -165,6 +165,14 @@ clear_color_buffers(struct gl_context *ctx) for (buf = 0; buf < ctx->DrawBuffer->_NumColorDrawBuffers; buf++) { struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[buf]; + + /* If this is an ES2 context or GL_ARB_ES2_compatibility is supported, + * the framebuffer can be complete with some attachments be missing. In + * this case the _ColorDrawBuffers pointer will be NULL. + */ + if (rb == NULL) + continue; + if (ctx->Color.ColorMask[buf][0] == 0 || ctx->Color.ColorMask[buf][1] == 0 || ctx->Color.ColorMask[buf][2] == 0 || |