Mesa (master): st/mesa: unmap pbo after updating cache
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 29 07:56:01 UTC 2019
Module: Mesa
Branch: master
Commit: c7c0bd9f1ec41a0097987e5af1ecc935a880b9fe
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7c0bd9f1ec41a0097987e5af1ecc935a880b9fe
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
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 <marek.olsak at amd.com>
---
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;
}
More information about the mesa-commit
mailing list