DDSTextureLoader: 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 11:59:13 -08:00
parent c72e6ccc22
commit 9b334ab768

View File

@ -542,9 +542,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)
{