OSDN Git Service

mesa: move declaration before code
authorBrian Paul <brianp@vmware.com>
Mon, 21 Apr 2014 19:24:25 +0000 (13:24 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 21 Apr 2014 19:24:26 +0000 (13:24 -0600)
To fix MSVC build.

src/mesa/main/fbobject.c

index cd04fbe..ca16ae1 100644 (file)
@@ -2770,6 +2770,7 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
    }
 
    if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
+      const struct gl_renderbuffer_attachment *depthAtt, *stencilAtt;
       if (pname == GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) {
          /* This behavior is first specified in OpenGL 4.4 specification.
           *
@@ -2784,7 +2785,6 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
          return;
       }
       /* the depth and stencil attachments must point to the same buffer */
-      const struct gl_renderbuffer_attachment *depthAtt, *stencilAtt;
       depthAtt = get_attachment(ctx, buffer, GL_DEPTH_ATTACHMENT);
       stencilAtt = get_attachment(ctx, buffer, GL_STENCIL_ATTACHMENT);
       if (depthAtt->Renderbuffer != stencilAtt->Renderbuffer) {