From 775780ea274e6602c2d64de33a98ee35979cc330 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 20 Jan 2014 17:37:27 +0100 Subject: ligXext mesa git update 20 Jan 2014 libXext commit d5447c0156f556114dbf97d6064c0c7b0fcd5f70 mesa commit 799abb271a248f646faa5cc859968f8c71e1ef16 --- mesalib/src/mesa/swrast/s_renderbuffer.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'mesalib/src/mesa/swrast') diff --git a/mesalib/src/mesa/swrast/s_renderbuffer.c b/mesalib/src/mesa/swrast/s_renderbuffer.c index e3f33de7d..a19d02ac0 100644 --- a/mesalib/src/mesa/swrast/s_renderbuffer.c +++ b/mesalib/src/mesa/swrast/s_renderbuffer.c @@ -659,8 +659,10 @@ _swrast_map_renderbuffers(struct gl_context *ctx) } for (buf = 0; buf < fb->_NumColorDrawBuffers; buf++) { - map_attachment(ctx, fb, fb->_ColorDrawBufferIndexes[buf]); - find_renderbuffer_colortype(fb->_ColorDrawBuffers[buf]); + if (fb->_ColorDrawBufferIndexes[buf] >= 0) { + map_attachment(ctx, fb, fb->_ColorDrawBufferIndexes[buf]); + find_renderbuffer_colortype(fb->_ColorDrawBuffers[buf]); + } } } @@ -688,6 +690,8 @@ _swrast_unmap_renderbuffers(struct gl_context *ctx) } for (buf = 0; buf < fb->_NumColorDrawBuffers; buf++) { - unmap_attachment(ctx, fb, fb->_ColorDrawBufferIndexes[buf]); + if (fb->_ColorDrawBufferIndexes[buf] >= 0) { + unmap_attachment(ctx, fb, fb->_ColorDrawBufferIndexes[buf]); + } } } -- cgit v1.2.3