diff options
author | Erik Faye-Lund <[email protected]> | 2019-11-28 17:51:20 +0100 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-11-29 07:45:06 +0000 |
commit | c7c0bd9f1ec41a0097987e5af1ecc935a880b9fe (patch) | |
tree | ea6db52189dce4bf7d93e8cf10c3df5b7741dda9 | |
parent | de2e5f6f540de7e7d2e5208937a6f8fc17ace547 (diff) |
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]>
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 4 |
1 files 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; } |