[Mesa-dev] [PATCH 5/7] i965: Remove redundant update_state from intelReadPixels()

Chris Wilson chris at chris-wilson.co.uk
Wed Sep 9 06:38:59 PDT 2015


The very first operation performed by _mesa_readpixels() is to call
_mesa_update_state() - we do not need to do so ourselves.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Jordan Justen <jordan.l.justen at intel.com>
Cc: Jason Ekstrand <jason.ekstrand at intel.com>
Cc: Kenneth Graunke <kenneth at whitecape.org>
Cc: Francisco Jerez <currojerez at riseup.net>
---
 src/mesa/drivers/dri/i965/intel_pixel_read.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_pixel_read.c b/src/mesa/drivers/dri/i965/intel_pixel_read.c
index eb366cd..16dcc55 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_read.c
@@ -269,14 +269,6 @@ intelReadPixels(struct gl_context * ctx,
    intel_prepare_render(brw);
    brw->front_buffer_dirty = dirty;
 
-   /* Update Mesa state before calling _mesa_readpixels().
-    * XXX this may not be needed since ReadPixels no longer uses the
-    * span code.
-    */
-
-   if (ctx->NewState)
-      _mesa_update_state(ctx);
-
    _mesa_readpixels(ctx, x, y, width, height, format, type, pack, pixels);
 
    /* There's an intel_prepare_render() call in intelSpanRenderStart(). */
-- 
2.5.1



More information about the mesa-dev mailing list