HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.76k stars 184 forks source link

vkd3d: proper return values for formats that are valid but not supported. #1906

Closed dave-juicelabs closed 4 months ago

dave-juicelabs commented 4 months ago

Found a game engine that was doing it's initial checking of formats fail because E_INVALIDARG was returned for DXGI_FORMAT_R1_UNORM. This format is unspecified in the required and optional format list in msdn but D3D12 returns E_FAIL instead of E_INVALIDARG.

This diff returns E_INVALIDARG if the format is not a valid DXGI_FORMAT but E_FAIL if vkd3d does not support it.

Updating test_format_support to check all formats for valid HR results.

dave-juicelabs commented 4 months ago

Updated

dave-juicelabs commented 4 months ago

Updated the code based on the comments.