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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user