Module: Mesa Branch: master Commit: c7c0bd9f1ec41a0097987e5af1ecc935a880b9fe URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7c0bd9f1ec41a0097987e5af1ecc935a880b9fe
Author: Erik Faye-Lund <[email protected]> Date: Thu Nov 28 17:51:20 2019 +0100 st/mesa: unmap pbo after updating cache Unmapping first leads to accessing an invalid pointer. So let's switch these lines around. Reviewed-by: Marek Olšák <[email protected]> --- src/mesa/state_tracker/st_cb_drawpixels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index fc11bc3ae47..a220c841597 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -722,12 +722,12 @@ make_texture(struct st_context *st, ctx->_ImageTransferState = imageTransferStateSave; } - _mesa_unmap_pbo_source(ctx, unpack); - #if USE_DRAWPIXELS_CACHE cache_drawpixels_image(st, width, height, format, type, unpack, pixels, pt); #endif + _mesa_unmap_pbo_source(ctx, unpack); + return pt; } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
