X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fswrast%2Fs_readpix.c;h=48b9408d242f49bb790ed8e91b0164a41d3506e9;hb=5cd7042088bdd0b5d9a92f4fc927029a46a23734;hp=8fa95ded18d779483b65ec4b276c118ca767da95;hpb=cc7dd4fc1b3c765ca1ecd943d189bb156dae529d;p=mesa.git diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 8fa95ded18d..48b9408d242 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -24,16 +24,16 @@ #include "main/glheader.h" -#include "bufferobj.h" +#include "main/bufferobj.h" #include "main/colormac.h" -#include "convolve.h" +#include "main/convolve.h" #include "main/context.h" -#include "feedback.h" -#include "image.h" +#include "main/feedback.h" +#include "main/image.h" #include "main/macros.h" #include "main/imports.h" -#include "pixel.h" -#include "state.h" +#include "main/pixel.h" +#include "main/state.h" #include "s_context.h" #include "s_depth.h" @@ -555,11 +555,11 @@ _swrast_ReadPixels( GLcontext *ctx, SWcontext *swrast = SWRAST_CONTEXT(ctx); struct gl_pixelstore_attrib clippedPacking = *packing; - /* Need to do RENDER_START before clipping or anything else since this - * is where a driver may grab the hw lock and get an updated window - * size. + /* Need to do swrast_render_start() before clipping or anything else + * since this is where a driver may grab the hw lock and get an updated + * window size. */ - RENDER_START(swrast, ctx); + swrast_render_start(ctx); if (ctx->NewState) _mesa_update_state(ctx); @@ -570,11 +570,11 @@ _swrast_ReadPixels( GLcontext *ctx, /* Do all needed clipping here, so that we can forget about it later */ if (!_mesa_clip_readpixels(ctx, &x, &y, &width, &height, &clippedPacking)) { /* The ReadPixels region is totally outside the window bounds */ - RENDER_FINISH(swrast, ctx); + swrast_render_finish(ctx); return; } - pixels = _mesa_map_readpix_pbo(ctx, &clippedPacking, pixels); + pixels = _mesa_map_pbo_dest(ctx, &clippedPacking, pixels); if (!pixels) return; @@ -614,7 +614,7 @@ _swrast_ReadPixels( GLcontext *ctx, /* don't return yet, clean-up */ } - RENDER_FINISH(swrast, ctx); + swrast_render_finish(ctx); - _mesa_unmap_readpix_pbo(ctx, &clippedPacking); + _mesa_unmap_pbo_dest(ctx, &clippedPacking); }