[Mesa-stable] [Mesa-dev] [PATCH] mesa: add drawbuffer argument to ClearNamedFramebufferfi
Ilia Mirkin
imirkin at alum.mit.edu
Sat Jun 11 00:02:11 UTC 2016
On Fri, Jun 10, 2016 at 5:59 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> On 10.06.2016 05:48, Ilia Mirkin wrote:
>>
>> 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.
>
>
> Ouch. But there isn't really anything else that can be done, so...
>
> Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Thanks! I'm going to push this, along with updates to glext.h and glcorearb.h.
>
>
>>
>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>> Cc: "11.2 12.0" <mesa-stable at lists.freedesktop.org>
>> ---
>>
>> If people are good with this, I'll also nominate the glext.h header update
>> for stable.
>>
>> src/mapi/glapi/gen/ARB_direct_state_access.xml | 1 +
>> src/mesa/main/clear.c | 4 ++--
>> src/mesa/main/clear.h | 2 +-
>> 3 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> b/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> index 155b6f8..43841bb 100644
>> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
>> @@ -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>
>> diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
>> index 92f69ab..35b912c 100644
>> --- a/src/mesa/main/clear.c
>> +++ b/src/mesa/main/clear.c
>> @@ -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);
>> }
>> diff --git a/src/mesa/main/clear.h b/src/mesa/main/clear.h
>> index c298506..fb3bcde 100644
>> --- a/src/mesa/main/clear.h
>> +++ b/src/mesa/main/clear.h
>> @@ -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
>>
>
More information about the mesa-stable
mailing list