mesa: consolidate PBO map/unmap helpers
[mesa.git] / src / mesa / state_tracker / st_cb_readpixels.c
index ccf1a0b5634b9f9fa4f908f064bd9eb3dc46cc55..75424aa2e70338af7f9d546574782d91c0074008 100644 (file)
@@ -353,7 +353,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
       return;
    }
 
-   dest = _mesa_map_readpix_pbo(ctx, &clippedPacking, dest);
+   dest = _mesa_map_pbo_dest(ctx, &clippedPacking, dest);
    if (!dest)
       return;
 
@@ -380,7 +380,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
    if (st_fast_readpixels(ctx, strb, x, y, width, height,
                           format, type, pack, dest)) {
       /* success! */
-      _mesa_unmap_readpix_pbo(ctx, &clippedPacking);
+      _mesa_unmap_pbo_dest(ctx, &clippedPacking);
       return;
    }
 
@@ -534,7 +534,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
 
    screen->tex_transfer_destroy(trans);
 
-   _mesa_unmap_readpix_pbo(ctx, &clippedPacking);
+   _mesa_unmap_pbo_dest(ctx, &clippedPacking);
 }