[Mesa-dev] [PATCH 20/24] swrast: Drop the remaining GetRow-based glReadPixels() fast-path.

Eric Anholt eric at anholt.net
Tue Nov 1 12:31:03 PDT 2011


On Sat, 29 Oct 2011 11:43:37 -0600, Brian Paul <brian.e.paul at gmail.com> wrote:
> On Fri, Oct 28, 2011 at 1:50 PM, Eric Anholt <eric at anholt.net> wrote:
> > In all of piglit, only two tests hit it (reading to RGBA float, where
> > GetRow would drop floats into place from R, RG, or RGB).
> 
> So if an app does glReadPixels(format=GL_RGBA, type=GL_UNSIGNED_BYTE)
> is it a slow path now?
> 
> In the past, quite a few apps that used glReadPixels used that
> format/type combo, or GL_RGB/GLubyte.  I think it would be good to
> keep those off a slow path that involves a lot of ubyte/float
> conversion.

That fast path (or the memcpy one) basically hasn't been hit since
_ClampReadColor came along and made transferOps always be set.  I want
to optimize out that clamping again, but these "fast" paths are totally
overwhelmed by the cost of going through non-movntdqa or cached
blit-based mappings on hardware drivers anyway.

If I can get this landed and finish off my GL3 tasks (some of which are
pending on this), I'm hoping to add Mesa code for movntdqa to get ~10x
readpixels performance improvements on hardware drivers that can't do
cached blits.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111101/62bb6e34/attachment-0001.pgp>


More information about the mesa-dev mailing list