mesa: add drawbuffer argument to ClearNamedFramebufferfi
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 10 Jun 2016 03:45:22 +0000 (23:45 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 11 Jun 2016 00:32:03 +0000 (20:32 -0400)
This was fixed in revision 47 of the ARB_dsa spec in Oct 22, 2015. Since
it's horrible to have differing APIs across library versions, we should
attempt to minimize the impact by backporting it as far as possible and
hope no one notices.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
src/mapi/glapi/gen/ARB_direct_state_access.xml
src/mesa/main/clear.c
src/mesa/main/clear.h

index 155b6f8d52845d43feff4b250b5b5148def795b1..43841bb6c060d21303d288f91820d0c9051813fb 100644 (file)
    <function name="ClearNamedFramebufferfi">
       <param name="framebuffer" type="GLuint" />
       <param name="buffer" type="GLenum" />
+      <param name="drawbuffer" type="GLint" />
       <param name="depth" type="GLfloat" />
       <param name="stencil" type="GLint" />
    </function>
index 92f69ab9b5981dc63451da4ec84516426ecd771c..35b912cbf10714851a642ad92d1b83b491c30213 100644 (file)
@@ -646,12 +646,12 @@ _mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer,
  */
 void GLAPIENTRY
 _mesa_ClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer,
-                              GLfloat depth, GLint stencil)
+                              GLint drawbuffer, GLfloat depth, GLint stencil)
 {
    GLint oldfb;
 
    _mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb);
    _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer);
-   _mesa_ClearBufferfi(buffer, 0, depth, stencil);
+   _mesa_ClearBufferfi(buffer, drawbuffer, depth, stencil);
    _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, (GLuint) oldfb);
 }
index c29850676ca0b3b2427350cd45a5ff63669dc6af..fb3bcdeefbf39c97c0505ba81a96c07056b4f224 100644 (file)
@@ -75,6 +75,6 @@ _mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer,
 
 extern void GLAPIENTRY
 _mesa_ClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer,
-                              GLfloat depth, GLint stencil);
+                              GLint drawbuffer, GLfloat depth, GLint stencil);
 
 #endif