• Advertisement
Sign in to follow this  

[D3D11] Initialize all mip-levels at once

This topic is 1799 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

 

I've written my own file format in which I store mip-level slices of a texture in the order highest to lowest (the data is compressed with BC1).

 

Now I'm trying to initialize a D3D11 texture with the binary data from my file format.

Updating only the first mip-level of the texture works without any problems, but what I'd like to do is to upload all mip-levels from the file to the GPU in one go.

 

Is this even possible ? Currently I'm using UpdateSubresource to upload the binary data. Is this maybe possible with a staging buffer and CopySubresourceRegion ?

 

 

Thanks for any hints

Share this post


Link to post
Share on other sites
Advertisement

Call UpdateSubresource multiple times specifying different subresources (mip-levels).

Or when calling CreateTexture2D you can specify an array of D3D11_SUBRESOURCE_DATA to do them all in a single call. (That way you can also create your textures with D3D11_USAGE_IMMUTABLE if you know you won't be changing them again later).

Edited by Erik Rufelt

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement