[Directx10] staging texture2D Map() and RowPitch
Hi,
I'm trying to update all sub resources of a staging texture 2D uncompressed R8G8B8A8.
The first subresources works well, but for the miplevel of 8x8 texel, Map() is returning a pitch of 64 byte, but I'm expecting 32 (and the documentation confirms that for uncompressed data the RowPitch is the width).
How do you explain this ?
This prevent me to correctly set data for these mips.
Please help.
I encountered the same problem and EvilSteve explained to me.
The driver is free to add data at the end of every scanline. You have to read/write the data you need (the first 32 byte in this case) and skip the rest of the scanline and so on. (the driver may put there something)
The driver is free to add data at the end of every scanline. You have to read/write the data you need (the first 32 byte in this case) and skip the rest of the scanline and so on. (the driver may put there something)
Quote:Original post by dz4What feal87 said. The driver seems to be aligning scanlines to 64 bytes (Maybe the size of a GPU cache line?)
Hi,
I'm trying to update all sub resources of a staging texture 2D uncompressed R8G8B8A8.
The first subresources works well, but for the miplevel of 8x8 texel, Map() is returning a pitch of 64 byte, but I'm expecting 32
Quote:Original post by dz4What documentation says that? I don't know about D3D10, but in D3D9 there's no formal agreement on what the pitch will be, other than it'll be at least bytes_per_pixel * width.
(and the documentation confirms that for uncompressed data the RowPitch is the width).
How do you explain this ?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement