[Mesa-dev] [PATCH 03/13] mesa: make _mesa_get_framebuffer_attachment_parameter() static

Timothy Arceri tarceri at itsqueeze.com
Mon May 8 06:35:27 UTC 2017


---
 src/mesa/main/fbobject.c | 18 +++++++++---------
 src/mesa/main/fbobject.h |  7 -------
 2 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index df7cc17..ef4fecf 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3668,25 +3668,25 @@ _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment,
    else {
       /* remove renderbuffer attachment */
       rb = NULL;
    }
 
    framebuffer_renderbuffer(ctx, fb, attachment, rb,
                             "glNamedFramebufferRenderbuffer");
 }
 
 
-void
-_mesa_get_framebuffer_attachment_parameter(struct gl_context *ctx,
-                                           struct gl_framebuffer *buffer,
-                                           GLenum attachment, GLenum pname,
-                                           GLint *params, const char *caller)
+static void
+get_framebuffer_attachment_parameter(struct gl_context *ctx,
+                                     struct gl_framebuffer *buffer,
+                                     GLenum attachment, GLenum pname,
+                                     GLint *params, const char *caller)
 {
    const struct gl_renderbuffer_attachment *att;
    bool is_color_attachment = false;
    GLenum err;
 
    /* The error code for an attachment type of GL_NONE differs between APIs.
     *
     * From the ES 2.0.25 specification, page 127:
     * "If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is NONE, then
     *  querying any other pname will generate INVALID_ENUM."
@@ -4023,22 +4023,22 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
    struct gl_framebuffer *buffer;
 
    buffer = get_framebuffer_target(ctx, target);
    if (!buffer) {
       _mesa_error(ctx, GL_INVALID_ENUM,
                   "glGetFramebufferAttachmentParameteriv(invalid target %s)",
                   _mesa_enum_to_string(target));
       return;
    }
 
-   _mesa_get_framebuffer_attachment_parameter(ctx, buffer, attachment, pname,
-                                              params,
+   get_framebuffer_attachment_parameter(ctx, buffer, attachment, pname,
+                                        params,
                                     "glGetFramebufferAttachmentParameteriv");
 }
 
 
 void GLAPIENTRY
 _mesa_GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer,
                                                GLenum attachment,
                                                GLenum pname, GLint *params)
 {
    GET_CURRENT_CONTEXT(ctx);
@@ -4053,22 +4053,22 @@ _mesa_GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer,
    else {
       /*
        * Section 9.2 Binding and Managing Framebuffer Objects of the OpenGL
        * 4.5 core spec (30.10.2014, PDF page 314):
        *    "If framebuffer is zero, then the default draw framebuffer is
        *    queried."
        */
       buffer = ctx->WinSysDrawBuffer;
    }
 
-   _mesa_get_framebuffer_attachment_parameter(ctx, buffer, attachment, pname,
-                                              params,
+   get_framebuffer_attachment_parameter(ctx, buffer, attachment, pname,
+                                        params,
                               "glGetNamedFramebufferAttachmentParameteriv");
 }
 
 
 void GLAPIENTRY
 _mesa_NamedFramebufferParameteri(GLuint framebuffer, GLenum pname,
                                  GLint param)
 {
    GET_CURRENT_CONTEXT(ctx);
    struct gl_framebuffer *fb = NULL;
diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
index 540bd9d..a9e9beb 100644
--- a/src/mesa/main/fbobject.h
+++ b/src/mesa/main/fbobject.h
@@ -124,27 +124,20 @@ _mesa_framebuffer_texture(struct gl_context *ctx, struct gl_framebuffer *fb,
                           GLenum attachment,
                           struct gl_texture_object *texObj, GLenum textarget,
                           GLint level, GLuint layer, GLboolean layered,
                           const char *caller);
 
 extern GLenum
 _mesa_check_framebuffer_status(struct gl_context *ctx,
                                struct gl_framebuffer *fb);
 
 extern void
-_mesa_get_framebuffer_attachment_parameter(struct gl_context *ctx,
-                                           struct gl_framebuffer *buffer,
-                                           GLenum attachment, GLenum pname,
-                                           GLint *params, const char *caller);
-
-
-extern void
 _mesa_bind_framebuffers(struct gl_context *ctx,
                         struct gl_framebuffer *newDrawFb,
                         struct gl_framebuffer *newReadFb);
 
 extern GLboolean GLAPIENTRY
 _mesa_IsRenderbuffer(GLuint renderbuffer);
 
 extern void GLAPIENTRY
 _mesa_BindRenderbuffer(GLenum target, GLuint renderbuffer);
 
-- 
2.9.3



More information about the mesa-dev mailing list