Closed walbourn closed 5 years ago
The restrictions in the code are covered in detailed on Microsoft Docs. The original list are the only required UAV typed format supports. Any additional formats would require a specific optional support test for each format.
Technically the code is currently written such that it requires D3D12_FEATURE_DATA_D3D12_OPTIONS.TypedUAVLoadAdditionalFormats
. Otherwise only three single-channel formats would be supported.
Turns out I can easily support most of these on devices that support the matching typed UAV. This approach does not support DXGI_FORMAT_R32G32B32_FLOAT
which is never supported as a typed UAV, but otherwise it covers all the cases that could be supported by DX11.
And due to the dependency on D3D12_FEATURE_DATA_D3D12_OPTIONS.TypedUAVLoadAdditionalFormats
I can't really avoid the complexity for the feature checking anyhow.
Fixed in this pull request
GenerateMips
(the DirectCompute implementation of auto-gen mips for DirectX 12) currently supports the following DXGI formats:This is a lot of formats, but there are a few more formats that were required for DirectX 11 drivers to implement for
D3D11_FORMAT_SUPPORT_MIP_AUTOGEN
that are missing from this list:And these were optional for DirectX 11 drivers to support for
D3D11_FORMAT_SUPPORT_MIP_AUTOGEN
: