diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/teximage.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 76b6584..6b0744b 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -3434,8 +3434,9 @@ get_copy_tex_image_source(struct gl_context *ctx, mesa_format texFormat) if (_mesa_get_format_bits(texFormat, GL_DEPTH_BITS) > 0) { /* reading from depth/stencil buffer */ return ctx->ReadBuffer->Attachment[BUFFER_DEPTH].Renderbuffer; - } - else { + } else if (_mesa_get_format_bits(texFormat, GL_STENCIL_BITS) > 0) { + return ctx->ReadBuffer->Attachment[BUFFER_STENCIL].Renderbuffer; + } else { /* copying from color buffer */ return ctx->ReadBuffer->_ColorReadBuffer; } |