summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/buffers.c19
-rw-r--r--src/mesa/main/buffers.h3
-rw-r--r--src/mesa/main/tests/dispatch_sanity.cpp1
3 files changed, 23 insertions, 0 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 8b52a5392a8..9b66e38b1e1 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -297,6 +297,25 @@ _mesa_DrawBuffer(GLenum buffer)
}
+void GLAPIENTRY
+_mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_framebuffer *fb;
+
+ if (framebuffer) {
+ fb = _mesa_lookup_framebuffer_err(ctx, framebuffer,
+ "glNamedFramebufferDrawBuffer");
+ if (!fb)
+ return;
+ }
+ else
+ fb = ctx->WinSysDrawBuffer;
+
+ _mesa_draw_buffer(ctx, fb, buf, "glNamedFramebufferDrawBuffer");
+}
+
+
/**
* Called by glDrawBuffersARB; specifies the destination color renderbuffers
* for N fragment program color outputs.
diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h
index 4192afd3f13..12d57430a39 100644
--- a/src/mesa/main/buffers.h
+++ b/src/mesa/main/buffers.h
@@ -46,6 +46,9 @@ extern void GLAPIENTRY
_mesa_DrawBuffer( GLenum mode );
extern void GLAPIENTRY
+_mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf);
+
+extern void GLAPIENTRY
_mesa_DrawBuffers(GLsizei n, const GLenum *buffers);
extern void
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 23ddabd169d..931eeceb212 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -985,6 +985,7 @@ const struct function gl_core_functions_possible[] = {
{ "glNamedFramebufferParameteri", 45, -1 },
{ "glNamedFramebufferTexture", 45, -1 },
{ "glNamedFramebufferTextureLayer", 45, -1 },
+ { "glNamedFramebufferDrawBuffer", 45, -1 },
{ "glInvalidateNamedFramebufferSubData", 45, -1 },
{ "glInvalidateNamedFramebufferData", 45, -1 },
{ "glClearNamedFramebufferiv", 45, -1 },