diff options
Diffstat (limited to 'src/mesa/swrast/s_blit.c')
-rw-r--r-- | src/mesa/swrast/s_blit.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c index 0e12dfa1da..bc4b2ac625 100644 --- a/src/mesa/swrast/s_blit.c +++ b/src/mesa/swrast/s_blit.c @@ -135,7 +135,7 @@ blit_nearest(GLcontext *ctx, switch (buffer) { case GL_COLOR_BUFFER_BIT: readRb = ctx->ReadBuffer->_ColorReadBuffer; - drawRb = ctx->DrawBuffer->_ColorDrawBuffers[0][0]; + drawRb = ctx->DrawBuffer->_ColorDrawBuffers[0]; comps = 4; break; case GL_DEPTH_BUFFER_BIT: @@ -319,7 +319,7 @@ blit_linear(GLcontext *ctx, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1) { struct gl_renderbuffer *readRb = ctx->ReadBuffer->_ColorReadBuffer; - struct gl_renderbuffer *drawRb = ctx->DrawBuffer->_ColorDrawBuffers[0][0]; + struct gl_renderbuffer *drawRb = ctx->DrawBuffer->_ColorDrawBuffers[0]; const GLint srcWidth = ABS(srcX1 - srcX0); const GLint dstWidth = ABS(dstX1 - dstX0); @@ -493,7 +493,7 @@ simple_blit(GLcontext *ctx, switch (buffer) { case GL_COLOR_BUFFER_BIT: readRb = ctx->ReadBuffer->_ColorReadBuffer; - drawRb = ctx->DrawBuffer->_ColorDrawBuffers[0][0]; + drawRb = ctx->DrawBuffer->_ColorDrawBuffers[0]; comps = 4; break; case GL_DEPTH_BUFFER_BIT: @@ -745,6 +745,9 @@ _swrast_BlitFramebuffer(GLcontext *ctx, }; GLint i; + if (!ctx->DrawBuffer->_NumColorDrawBuffers) + return; + if (!clip_blit(ctx, &srcX0, &srcY0, &srcX1, &srcY1, &dstX0, &dstY0, &dstX1, &dstY1)) { return; |