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@amd.com>
This commit is contained in:
Erik Faye-Lund 2019-11-28 17:51:20 +01:00
parent de2e5f6f54
commit c7c0bd9f1e

View file

@ -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;
}