[Mesa-dev] [PATCH] meta: Avoid FBO resizing/reallocating in decompress_texture_image

Anuj Phogat anuj.phogat at gmail.com
Tue Feb 14 12:40:53 PST 2012


On Mon, Feb 13, 2012 at 4:33 PM, Brian Paul <brianp at vmware.com> wrote:

> On 02/13/2012 12:34 PM, Anuj Phogat wrote:
>
>> Reallocate/resize decompress FBO only if texture image width/height is
>> greater than existing decompress FBO width/height.
>>
>> Signed-off-by: Anuj Phogat<anuj.phogat at gmail.com>
>> ---
>>  src/mesa/drivers/common/meta.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/src/mesa/drivers/common/**meta.c b/src/mesa/drivers/common/*
>> *meta.c
>> index f3f5d85..c3b2367 100644
>> --- a/src/mesa/drivers/common/**meta.c
>> +++ b/src/mesa/drivers/common/**meta.c
>> @@ -3292,7 +3292,7 @@ decompress_texture_image(**struct gl_context *ctx,
>>     }
>>
>>     /* alloc dest surface */
>> -   if (width != decompress->Width || height != decompress->Height) {
>> +   if (width>  decompress->Width || height>  decompress->Height) {
>>        _mesa_RenderbufferStorageEXT(**GL_RENDERBUFFER_EXT, GL_RGBA,
>>                                     width, height);
>>        decompress->Width = width;
>>
>
>
> Assuming you've tested this and there's no regressions,
>
yes, I've tested with piglit quick.tests. No regressions.

>
> Reviewed-by: Brian Paul <brianp at vmware.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120214/461fbbd5/attachment.html>


More information about the mesa-dev mailing list