diff options
| author | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-21 22:51:10 -0300 |
|---|---|---|
| committer | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-21 22:51:10 -0300 |
| commit | b74ebc5b6c2f2793b18ab3c781e4ae107ff470fb (patch) | |
| tree | 93a17335cb8fb3505afac1980edd3c1290f37dcb /runtime/test/gameinput_test.cpp | |
| parent | c432cdce127ed2d22a99aa6ef57d91db4a10b5bb (diff) | |
runtime: compare the Xbox tiled layout word as an integer so clang-cl builds
create_reserved() declared `constexpr auto xbox_tiled = static_cast<D3D12_TEXTURE_LAYOUT>(0x101)`.
0x101 is outside D3D12_TEXTURE_LAYOUT's enumerators (the enum has no fixed underlying type), so the
cast is undefined in a constant expression. MSVC accepts it; clang-cl rejects it:
error: constexpr variable 'xbox_tiled' must be initialized by a constant expression
note: integer value 257 is outside the valid range of values [0, 3] for the enumeration type
Keep the word as a UINT and compare desc->Layout through a cast. Same behaviour; with this one
change the whole runtime builds with clang-cl 23 + lld-link.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/gameinput_test.cpp')
0 files changed, 0 insertions, 0 deletions