microsoft / DirectXTK12

The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
https://walbourn.github.io/directx-tool-kit-for-directx-12/
MIT License
1.45k stars 369 forks source link

Fix WIC loader bug when using autogen+force-rgba32 #183

Closed walbourn closed 9 months ago

walbourn commented 10 months ago

When using mipmap auto-generation with WIC source files that are BGRA format, the format will not be supported if the driver does not report support for both D3D12_FEATURE_DATA_D3D12_OPTIONS.TypedUAVLoadAdditionalFormats and .StandardSwizzle64KBSupported.

The "workaround" is to use the force RGBA32 which is always supported, but this combination of flags is not properly validated. This fixes that scenario.

walbourn commented 10 months ago

Test suite update in this PR.