[Mesa-dev] [PATCH 17/24] swrast: Skip _swrast_validate_derived in _swrast_ReadPixels().

Eric Anholt eric at anholt.net
Fri Oct 28 12:50:07 PDT 2011


None of the callgraph below this uses derived state (almost nothing
even dereferences the swrast context).
---
 src/mesa/swrast/s_readpix.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index bf2fe9d..21dc5ea 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -643,7 +643,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)
@@ -655,9 +654,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)) {
 
-- 
1.7.7



More information about the mesa-dev mailing list