OSDN Git Service

swrast: Skip _swrast_validate_derived in _swrast_ReadPixels().
authorEric Anholt <eric@anholt.net>
Wed, 12 Oct 2011 23:55:23 +0000 (16:55 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 4 Nov 2011 06:29:52 +0000 (23:29 -0700)
None of the callgraph below this uses derived state (almost nothing
even dereferences the swrast context).

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/swrast/s_readpix.c

index aabb1f3..b258599 100644 (file)
@@ -608,7 +608,6 @@ _swrast_ReadPixels( struct gl_context *ctx,
                    const struct gl_pixelstore_attrib *packing,
                    GLvoid *pixels )
 {
-   SWcontext *swrast = SWRAST_CONTEXT(ctx);
    struct gl_pixelstore_attrib clippedPacking = *packing;
 
    if (ctx->NewState)
@@ -620,9 +619,6 @@ _swrast_ReadPixels( struct gl_context *ctx,
     */
    swrast_render_start(ctx);
 
-   if (swrast->NewState)
-      _swrast_validate_derived( ctx );
-
    /* Do all needed clipping here, so that we can forget about it later */
    if (_mesa_clip_readpixels(ctx, &x, &y, &width, &height, &clippedPacking)) {