summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-07-19 11:19:16 +0200
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-07-31 13:53:39 +0200
commit8bf786d13d4e6b985aa0a2ef017ba6f5fc82c366 (patch)
treefc69173be9a8a23dd9af491a8a294559de1aade2
parent0238976665e15f083dd01a5adada80a45df18c5f (diff)
mesa: add KHR_no_error support to glNamedFramebufferDrawBuffer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
-rw-r--r--src/mapi/glapi/gen/ARB_direct_state_access.xml2
-rw-r--r--src/mesa/main/buffers.c16
-rw-r--r--src/mesa/main/buffers.h3
3 files changed, 20 insertions, 1 deletions
diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml
index 54276ea59d..d859021f0c 100644
--- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
+++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
@@ -186,7 +186,7 @@
<param name="layer" type="GLint" />
</function>
- <function name="NamedFramebufferDrawBuffer">
+ <function name="NamedFramebufferDrawBuffer" no_error="true">
<param name="framebuffer" type="GLuint" />
<param name="buf" type="GLenum" />
</function>
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 02596b7f68..9a049e94c7 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -344,6 +344,22 @@ _mesa_DrawBuffer(GLenum buffer)
void GLAPIENTRY
+_mesa_NamedFramebufferDrawBuffer_no_error(GLuint framebuffer, GLenum buf)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_framebuffer *fb;
+
+ if (framebuffer) {
+ fb = _mesa_lookup_framebuffer(ctx, framebuffer);
+ } else {
+ fb = ctx->WinSysDrawBuffer;
+ }
+
+ draw_buffer_no_error(ctx, fb, buf, "glNamedFramebufferDrawBuffer");
+}
+
+
+void GLAPIENTRY
_mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf)
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h
index 630b0dce54..e86da341d6 100644
--- a/src/mesa/main/buffers.h
+++ b/src/mesa/main/buffers.h
@@ -46,6 +46,9 @@ _mesa_DrawBuffer_no_error(GLenum mode);
extern void GLAPIENTRY
_mesa_DrawBuffer( GLenum mode );
+void GLAPIENTRY
+_mesa_NamedFramebufferDrawBuffer_no_error(GLuint framebuffer, GLenum buf);
+
extern void GLAPIENTRY
_mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf);