mirror of
https://github.com/microsoft/DirectXTex
synced 2025-01-14 11:30:18 +00:00
ScreenGrab: Fixed computing for NV11 which requires width multiple of 4, but height can be odd
This commit is contained in:
parent
9b334ab768
commit
b67a8ef792
@ -507,9 +507,9 @@ static void GetSurfaceInfo( _In_ size_t width,
|
|||||||
}
|
}
|
||||||
else if ( fmt == DXGI_FORMAT_NV11 )
|
else if ( fmt == DXGI_FORMAT_NV11 )
|
||||||
{
|
{
|
||||||
rowBytes = ( ( width + 1 ) >> 1 ) * 2;
|
rowBytes = ( ( width + 3 ) >> 2 ) * 4;
|
||||||
numBytes = rowBytes * ( ( height + 1 ) >> 1 ) * 4;
|
|
||||||
numRows = height * 2; // Direct3D makes this simplifying assumption, although it is larger than the 4:1:1 data
|
numRows = height * 2; // Direct3D makes this simplifying assumption, although it is larger than the 4:1:1 data
|
||||||
|
numBytes = rowBytes * numRows;
|
||||||
}
|
}
|
||||||
else if (planar)
|
else if (planar)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user