[Mesa-dev] [PATCH] st/mesa: fix crash when DrawBuffer->_ColorDrawBuffers[0] is NULL

Brian Paul brianp at vmware.com
Tue Feb 22 06:23:05 PST 2011


On 02/22/2011 03:52 AM, Marek Olšák wrote:
> Brian,
>
> I realized that this clear color translation is wrong because it won't
> work for multiple render targets. It's possible to have mixed format
> attachments like one with GL_LUMINANCE8_ALPHA8 and another one with
> GL_RGBA8 in slots 0 and 1 respectively, the ARB_fbo spec allows it. I
> think we should let drivers swizzle the clear color for each active
> render target separately if they need it.

I thought of that too and was going to look at that again when I had 
more time.  I should have noted such in the commit message or code.

For now, I don't know of any apps that mix color buffers like that so 
I think we're safe for the short term.


> For example, we setup r300 to only read the R and A components for
> LUMINANCE8_ALPHA8, so it doesn't need any help from the state tracker,
> and the other render targets are unaffected. r500 and later GPUs *can*
> do mixed attachments.

OK.

-Brian


More information about the mesa-dev mailing list