I was trying create a texture with
MipLevels equal to 0 (to create all the mip levels). However, the texture failed to be created. Is it possible to use mipmaps with dynamic textures?
If you create the device with
D3D11_CREATE_DEVICE_DEBUG, you should see the following error:
D3D11 ERROR: ID3D11Device::CreateTexture2D: A D3D11_USAGE_DYNAMIC Resource must have MipLevels equal to 1. [ STATE_CREATION ERROR #102: CREATETEXTURE2D_INVALIDMIPLEVELS]
which is pretty self explanatory.
This is a decent summary of the options you have: