[Mesa-dev] [PATCH 1/2] mesa: invalidate framebuffer if internal format of renderbuffer is changed
Marek Olšák
maraeo at gmail.com
Mon Mar 7 14:20:18 PST 2011
On Mon, Mar 7, 2011 at 11:16 PM, Brian Paul <brianp at vmware.com> wrote:
> On 03/07/2011 02:46 PM, Ian Romanick wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 03/07/2011 07:16 AM, Brian Paul wrote:
>>
>>> On 03/05/2011 09:26 PM, Marek Olšák wrote:
>>>
>>>> RenderTexture doesn't have to be called in invalidate_rb, I guess.
>>>> ---
>>>>
>>>
>>> The patch looks good but there's one simple optimization that could be
>>> made. If glRenderBufferStorage() is called with a new width/height but
>>> the internalFormat stays the same, we wouldn't have to invalidate the
>>> parent FBO(s).
>>>
>>> I think changing the size of a renderbuffer would be more common than
>>> channging its format.
>>>
>>
>> That's only true if the driver supports ARB_fbo. With EXT_fbo a
>> framebuffer is incomplete if the attachments have mismatched sizes.
>> This is one of the error conditions that was removed in the ARB version.
>>
>
> Grrr, right. Even for GL_ARB_fbo we'll need to revalidate FBOs when
> renderbuffers are resized because we compute the FBO's width/height as the
> min of the attached renderbuffers.
>
> I'm a little concerned about the efficiency of walking over all FBOs
> whenever we change a renderbuffer like this. If it turns out to be a
> problem when there's many FBOs we may need to keep a list of parent FBOs for
> each renderbuffer.
>
> Marek, your first patch is probably what we should commit.
>
Alright.
Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110307/45840538/attachment.html>
More information about the mesa-dev
mailing list