On Sat, Nov 5, 2011 at 1:15 PM, Brian Paul <bri...@vmware.com> wrote: > Most drivers have been creating fake/wrapper renderbuffers when a > texture image is attached to an FBO. But that's not a requirement > of core Mesa. > > So an FBO attachment that points into a texture may not have a > (fake) renderbuffer. This caused the new glReadPixels code to fail > when reading from a buffer that's actually a texture. > > Now, we check the attachment point to see if it's a real renderbuffer > or a texture image and call the corresponding MapRenderbuffer() or > MapTextureImage() function. > > This fixes a bunch of piglit fbo failures when using the non-DRI > swrast driver.
Rereading this, the description leaves out another important detail. Unlike the DRI drivers and gallium drivers, the swrast driver doesn't have a common underlying memory object that stores both textures and renderbuffers. That makes the texture renderbuffer wrapper approach messy. Explicitly calling MapRenderbuffer or MapTextureImage here avoids that. -Brian _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev