1
0
mirror of https://github.com/microsoft/DirectXTex synced 2025-01-13 19:20:05 +00:00

ScreenGrab: Fixed computing for NV11 which requires width multiple of 4, but height can be odd

This commit is contained in:
walbourn_cp 2014-02-14 12:56:11 -08:00
parent 9b334ab768
commit b67a8ef792

View File

@ -507,9 +507,9 @@ static void GetSurfaceInfo( _In_ size_t width,
}
else if ( fmt == DXGI_FORMAT_NV11 )
{
rowBytes = ( ( width + 1 ) >> 1 ) * 2;
numBytes = rowBytes * ( ( height + 1 ) >> 1 ) * 4;
rowBytes = ( ( width + 3 ) >> 2 ) * 4;
numRows = height * 2; // Direct3D makes this simplifying assumption, although it is larger than the 4:1:1 data
numBytes = rowBytes * numRows;
}
else if (planar)
{