[Mesa-stable] [Mesa-dev] [PATCH 2/3] mesa: Make detach_renderbuffer available outside fbobject.c

Ian Romanick idr at freedesktop.org
Mon Aug 12 14:21:57 PDT 2013


On 08/12/2013 02:15 PM, Chad Versace wrote:
> On 08/08/2013 04:23 PM, Ian Romanick wrote:
>> From: Ian Romanick <ian.d.romanick at intel.com>
>>
>> Also add a return value indicating whether any work was done.
>>
>> This will be used by the next patch.
>>
>> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>> Cc: "9.2" mesa-stable at lists.freedesktop.org
>> ---
>>   src/mesa/main/fbobject.c | 42
>> +++++++++++++++++++++++++++++++++---------
>>   src/mesa/main/fbobject.h |  6 ++++++
>>   2 files changed, 39 insertions(+), 9 deletions(-)
>>
>> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
>> index 74f294c..d121167 100644
>> --- a/src/mesa/main/fbobject.c
>> +++ b/src/mesa/main/fbobject.c
>> @@ -1227,19 +1227,43 @@ _mesa_BindRenderbufferEXT(GLenum target,
>> GLuint renderbuffer)
>>    * the renderbuffer.
>>    * This is used when a renderbuffer object is deleted.
>>    * The spec calls for unbinding.
>> + *
>> + * \returns
>> + * \c true if the renderbuffer was detached from an attachment
>> point.  \c
>> + * false otherwise.
>>    */
>> -static void
>> -detach_renderbuffer(struct gl_context *ctx,
>> -                    struct gl_framebuffer *fb,
>> -                    struct gl_renderbuffer *rb)
>> +bool
>> +_mesa_detach_renderbuffer(struct gl_context *ctx,
>> +                          struct gl_framebuffer *fb,
>> +                          const void *att)
>>   {
>> -   GLuint i;
>> +   unsigned i;
>> +   bool progress = false;
>> +
>>      for (i = 0; i < BUFFER_COUNT; i++) {
>> -      if (fb->Attachment[i].Renderbuffer == rb) {
>> +      if (fb->Attachment[i].Texture == att
>> +          || fb->Attachment[i].Renderbuffer == att) {
>>            _mesa_remove_attachment(ctx, &fb->Attachment[i]);
>> +         progress = true;
>>         }
>
> This patch has an easter egg. It does more than make detach_renderbuffer
> public. I think
> this hunk regarding textures should be folded into patch 3. It
> definitely doesn't
> belong in this patch.

Yes, you are correct.  Patch-split fail. :(



More information about the mesa-stable mailing list