main: Add entry point for NamedFramebufferDrawBuffers.
authorLaura Ekstrand <laura@jlekstrand.net>
Mon, 9 Feb 2015 22:08:00 +0000 (14:08 -0800)
committerFredrik Höglund <fredrik@kde.org>
Thu, 14 May 2015 13:48:16 +0000 (15:48 +0200)
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
src/mapi/glapi/gen/ARB_direct_state_access.xml
src/mesa/main/buffers.c
src/mesa/main/buffers.h
src/mesa/main/tests/dispatch_sanity.cpp

index 6e5c4d30462eb15cc888d385c9754076dbf5ba5b..bb9baf5a3d014fa845f258af57d6a37ef8926a7d 100644 (file)
       <param name="buf" type="GLenum" />
    </function>
 
+   <function name="NamedFramebufferDrawBuffers" offset="assign">
+      <param name="framebuffer" type="GLuint" />
+      <param name="n" type="GLsizei" />
+      <param name="bufs" type="const GLenum *" />
+   </function>
+
    <function name="NamedFramebufferReadBuffer" offset="assign">
       <param name="framebuffer" type="GLuint" />
       <param name="buf" type="GLenum" />
index 0c6d379309fe9cb873ce20f9aae8d8b897cf80a5..0536266d7564ce9222a4dc5bef7e33a97b49dbcf 100644 (file)
@@ -506,6 +506,26 @@ _mesa_DrawBuffers(GLsizei n, const GLenum *buffers)
 }
 
 
+void GLAPIENTRY
+_mesa_NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n,
+                                  const GLenum *bufs)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   struct gl_framebuffer *fb;
+
+   if (framebuffer) {
+      fb = _mesa_lookup_framebuffer_err(ctx, framebuffer,
+                                        "glNamedFramebufferDrawBuffers");
+      if (!fb)
+         return;
+   }
+   else
+      fb = ctx->WinSysDrawBuffer;
+
+   _mesa_draw_buffers(ctx, fb, n, bufs, "glNamedFramebufferDrawBuffers");
+}
+
+
 /**
  * Performs necessary state updates when _mesa_drawbuffers makes an
  * actual change.
index 66871d70a093578241e6d863a0ca391f58bae26d..5aa79fda54bda4106e1835ba4177b31e0ef659fc 100644 (file)
@@ -55,6 +55,10 @@ _mesa_draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb,
 extern void GLAPIENTRY
 _mesa_DrawBuffers(GLsizei n, const GLenum *buffers);
 
+extern void GLAPIENTRY
+_mesa_NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n,
+                                  const GLenum *bufs);
+
 extern void
 _mesa_drawbuffers(struct gl_context *ctx, struct gl_framebuffer *fb,
                   GLuint n, const GLenum *buffers,
index dcbb0c69e4c16e3c1bf0caba32465bfb36969b7b..77dc1401d195620d8c1197a7e9e6f34990a59592 100644 (file)
@@ -986,6 +986,7 @@ const struct function gl_core_functions_possible[] = {
    { "glNamedFramebufferTexture", 45, -1 },
    { "glNamedFramebufferTextureLayer", 45, -1 },
    { "glNamedFramebufferDrawBuffer", 45, -1 },
+   { "glNamedFramebufferDrawBuffers", 45, -1 },
    { "glNamedFramebufferReadBuffer", 45, -1 },
    { "glInvalidateNamedFramebufferSubData", 45, -1 },
    { "glInvalidateNamedFramebufferData", 45, -1 },