Closed walbourn closed 7 years ago
It would also fail for the JPEG Hardware decode formats added in DXGI 1.4
DXGI_FORMAT_P208
4:2:2 8-bitDXGI_FORMAT_V208
4:4:0 8-bitDXGI_FORMAT_V408
4:4:4 8-bitSubresource indexing changed for planar types:
inline UINT D3D11CalcSubresource( UINT MipSlice, UINT ArraySlice, UINT MipLevels )
{
return MipSlice + (ArraySlice * MipLevels);
}
is now:
inline UINT D3D12CalcSubresource( UINT MipSlice, UINT ArraySlice, UINT PlaneSlice, UINT MipLevels, UINT ArraySize )
{
return MipSlice + (ArraySlice * MipLevels) + (PlaneSlice * MipLevels * ArraySize);
}
Updated to support load of planar formats
In DirectX 12, each plane of a planar format is it's own subsurface--in DX 11 all the planes were in the same subsurface. This means the current implementation of
DDSTexutreLoader
fails for:DXGI_FORMAT_NV12
4:2:0 8-bitDXGI_FORMAT_P010
4:2:0 10-bitDXGI_FORMAT_P016
4:2:0 16-bitDXGI_FORMAT_420_OPAQUE
4:2:0 8-bitDXGI_FORMAT_NV11
4:1:1 8-bit