diff options
author | Brian Paul <[email protected]> | 2011-12-10 11:44:43 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-12-13 06:45:36 -0700 |
commit | d1240928641f5073865cc2f3ef87bd3b0cd64b04 (patch) | |
tree | 85b01e6aef14858fa7386a7db9eaee0ebf9d04b7 /src/mesa/main/fbobject.c | |
parent | 02d12719e356ee9e3348db67ae55ae790dad058f (diff) |
mesa: stop using _Depth, _StencilBuffer fields in _mesa_BlitFramebufferEXT()
We're just looking at the depth/stencil renderbuffers to do error
checking. We don't need to look at the depth/stencil wrappers to do
that. Also, remove pointless readRb = depthRb = NULL assignments.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 9111caa1b56..611a6d0b042 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2669,8 +2669,10 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, } if (mask & GL_STENCIL_BUFFER_BIT) { - struct gl_renderbuffer *readRb = readFb->_StencilBuffer; - struct gl_renderbuffer *drawRb = drawFb->_StencilBuffer; + struct gl_renderbuffer *readRb = + readFb->Attachment[BUFFER_STENCIL].Renderbuffer; + struct gl_renderbuffer *drawRb = + drawFb->Attachment[BUFFER_STENCIL].Renderbuffer; /* From the EXT_framebuffer_object spec: * @@ -2679,7 +2681,6 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, * ignored." */ if ((readRb == NULL) || (drawRb == NULL)) { - readRb = drawRb = NULL; mask &= ~GL_STENCIL_BUFFER_BIT; } else if (_mesa_get_format_bits(readRb->Format, GL_STENCIL_BITS) != @@ -2691,8 +2692,10 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, } if (mask & GL_DEPTH_BUFFER_BIT) { - struct gl_renderbuffer *readRb = readFb->_DepthBuffer; - struct gl_renderbuffer *drawRb = drawFb->_DepthBuffer; + struct gl_renderbuffer *readRb = + readFb->Attachment[BUFFER_DEPTH].Renderbuffer; + struct gl_renderbuffer *drawRb = + drawFb->Attachment[BUFFER_DEPTH].Renderbuffer; /* From the EXT_framebuffer_object spec: * @@ -2701,7 +2704,6 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, * ignored." */ if ((readRb == NULL) || (drawRb == NULL)) { - readRb = drawRb = NULL; mask &= ~GL_DEPTH_BUFFER_BIT; } else if (_mesa_get_format_bits(readRb->Format, GL_DEPTH_BITS) != |