# Correct way to async/multi-threaded fill mip data for UTexture2D?

**URL:** <https://forums.unrealengine.com/t/correct-way-to-async-multi-threaded-fill-mip-data-for-utexture2d/11084>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [September 9, 2014, 4:44pm UTC](https://forums.unrealengine.com/t/correct-way-to-async-multi-threaded-fill-mip-data-for-utexture2d/11084 "2014-09-09T16:44:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [September 9, 2014, 4:44pm UTC](https://forums.unrealengine.com/t/correct-way-to-async-multi-threaded-fill-mip-data-for-utexture2d/11084/1 "2014-09-09T16:44:56Z")

</div>

So I’m working on a comic book reader, and have it mostly working.

The only issue is when copying the mip data from a memory buffer into the texture’s mip buffer. Because the texture is big (2000x3000 basically), doing a single memcpy in the main game thread causes a momentary hitch. I’ve tried defraying this over multiple frames, only copying some chunks at a time, and while it improves the situation, it also makes the loading process a lot slower (still in the main game thread for that part).

Is there a way to async fill a texture’s mip data?

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [September 10, 2014, 11:02pm UTC](https://forums.unrealengine.com/t/correct-way-to-async-multi-threaded-fill-mip-data-for-utexture2d/11084/2 "2014-09-10T23:02:34Z")

</div>

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

For anyone with a similar issue in the future, here’s a way to put the copy of the texture data into the rendering thread, and outside the game thread.
