Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to compile nvrhi_d3d12 #56

Closed
hyblocker opened this issue Jun 24, 2024 · 1 comment
Closed

Fail to compile nvrhi_d3d12 #56

hyblocker opened this issue Jun 24, 2024 · 1 comment

Comments

@hyblocker
Copy link

Upon compiling nvrhi_d3d12 using MSVC clang when linked with a C++20 project, I'm hit with this error several times:

nvrhi\src\d3d12/d3d12-backend.h(79,62): error : integer value 4294967295 is outside the valid range of values [0, 33554431] for the enumeration type 'D3D12_RESOURCE_STATES' [-Wenum-constexpr-conversion]

Replacing constexpr D3D12_RESOURCE_STATES c_ResourceStateUnknown = D3D12_RESOURCE_STATES(~0u); on line 79 with constexpr D3D12_RESOURCE_STATES c_ResourceStateUnknown = D3D12_RESOURCE_STATES(0xFFFFu); seems to resolve the error.

@apanteleev
Copy link
Contributor

Fixed in 55b0dd4 - closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants