mesa: add drawbuffer argument to ClearNamedFramebufferfi

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>
This commit is contained in:
Ilia Mirkin 2016-06-09 23:45:22 -04:00
parent 92351a71a8
commit 7d7e015381
3 changed files with 4 additions and 3 deletions

View file

@ -242,6 +242,7 @@
<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>

View 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);
}

View 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