mirror of
https://github.com/microsoft/DirectXTex
synced 2024-11-21 12:00:06 +00:00
Fixed bug with CaptureTexture of 1D textures for Direct3D 11
This commit is contained in:
parent
b736e9edc3
commit
a58ad988bb
@ -171,11 +171,13 @@ namespace
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
const size_t msize = (metadata.dimension == TEX_DIMENSION_TEXTURE2D)
|
||||
? std::min<size_t>(img->rowPitch, mapped.RowPitch) : img->rowPitch;
|
||||
|
||||
auto sptr = static_cast<const uint8_t*>(mapped.pData);
|
||||
uint8_t* dptr = img->pixels;
|
||||
for (size_t h = 0; h < lines; ++h)
|
||||
{
|
||||
const size_t msize = std::min<size_t>(img->rowPitch, mapped.RowPitch);
|
||||
memcpy(dptr, sptr, msize);
|
||||
sptr += mapped.RowPitch;
|
||||
dptr += img->rowPitch;
|
||||
|
Loading…
Reference in New Issue
Block a user