I've loaded a texture 32 x 32 with Format.R8G8B8A8_UNorm. When i MapSubresource() into a DataBox, the databox has a row-pitch of 256 and a slice-pitch of 8192. That seems incorrect to me as the format has a width of 4 bytes.
When I perform the following operation, my textures are striped with zero's (horizontal black lines). I believe MapSubresource is incorrectly mapping the texture.
if (GetFormatType(format) == FormatModifiers.UNorm)
{
byte[] buffer = new byte[formatWidth]; // formatWidth = 4
while (dataStream.Position < dataStream.Length) // datastream.length = 4096
{
databox.Data.Read(buffer, 0, formatWidth);
dataStream.Write(buffer, 0, formatWidth);
}
}






