main: Add entry point for NamedFramebufferReadBuffer.
authorLaura Ekstrand <laura@jlekstrand.net>
Fri, 6 Feb 2015 23:36:52 +0000 (15:36 -0800)
committerFredrik Höglund <fredrik@kde.org>
Thu, 14 May 2015 13:48:15 +0000 (15:48 +0200)
[Fredrik: Fix the name of the buf parameter in the XML file]

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 32e3c0afbeb8d342fd9f36822958fc9dc377a2fe..6e5c4d30462eb15cc888d385c9754076dbf5ba5b 100644 (file)
       <param name="buf" type="GLenum" />
    </function>
 
+   <function name="NamedFramebufferReadBuffer" offset="assign">
+      <param name="framebuffer" type="GLuint" />
+      <param name="buf" type="GLenum" />
+   </function>
+
    <function name="InvalidateNamedFramebufferData" offset="assign">
       <param name="framebuffer" type="GLuint" />
       <param name="numAttachments" type="GLsizei" />
index e1d1bafc367c188d85e9340a8b47db50969aea2d..d9979ad9ed516b7174a9d964a7b83136c8f12fb8 100644 (file)
@@ -697,3 +697,22 @@ _mesa_ReadBuffer(GLenum buffer)
    GET_CURRENT_CONTEXT(ctx);
    _mesa_read_buffer(ctx, ctx->ReadBuffer, buffer, "glReadBuffer");
 }
+
+
+void GLAPIENTRY
+_mesa_NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   struct gl_framebuffer *fb;
+
+   if (framebuffer) {
+      fb = _mesa_lookup_framebuffer_err(ctx, framebuffer,
+                                        "glNamedFramebufferReadBuffer");
+      if (!fb)
+         return;
+   }
+   else
+      fb = ctx->WinSysReadBuffer;
+
+   _mesa_read_buffer(ctx, fb, src, "glNamedFramebufferReadBuffer");
+}
index ca7ad19235b017e7185cd81464b2d5b11cbbe123..52a23188194a94936867892d4bfeeddf025bbcb1 100644 (file)
@@ -71,5 +71,8 @@ _mesa_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
 extern void GLAPIENTRY
 _mesa_ReadBuffer( GLenum mode );
 
+extern void GLAPIENTRY
+_mesa_NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src);
+
 
 #endif
index 931eeceb212b5edbbb5df7e148525706579e6563..dcbb0c69e4c16e3c1bf0caba32465bfb36969b7b 100644 (file)
@@ -986,6 +986,7 @@ const struct function gl_core_functions_possible[] = {
    { "glNamedFramebufferTexture", 45, -1 },
    { "glNamedFramebufferTextureLayer", 45, -1 },
    { "glNamedFramebufferDrawBuffer", 45, -1 },
+   { "glNamedFramebufferReadBuffer", 45, -1 },
    { "glInvalidateNamedFramebufferSubData", 45, -1 },
    { "glInvalidateNamedFramebufferData", 45, -1 },
    { "glClearNamedFramebufferiv", 45, -1 },