Repository navigation
Fix Windows Debug builds - #225
Merged
Merged
Conversation
2 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Fixes so Debug builds compile and start on Windows with MSVC.
Vector<T, N>::operator[]is nowconstexpr.Vector2D::GetX()andGetY()areconstexprand call it, so MSVC rejected them with C3615 in every file that includesMath/Vector.hpp. GCC and Clang accept it because they only complain when the function is actually used in a constant expression.DirectX11Renderer::Initialize()retries withoutD3D11_CREATE_DEVICE_DEBUGwhen device creation returnsDXGI_ERROR_SDK_COMPONENT_MISSING. The debug layer comes from the Graphics Tools optional Windows feature, and without it a Debug build logged "Unable to initialize graphics!" and exited. It also logs the HRESULT now when creation fails.The downstream game job now replaces SleakCraft's
Enginewith a symlink to this checkout. SleakCraft#90 madeEnginea submodule, so the job built against an empty folder and fails on every engine PR since.Why
The Windows Debug build didn't compile, and once it did,
-r d3d11(the default on Windows) couldn't start on a machine without Graphics Tools. DX12 already copes with a missing debug layer.This also covers the Windows part #224 left open: DX11 and DX12 reload and the Windows file watcher now work on Windows.
How it was verified
flat_shader.hlslwhile a world was running on DX11 and on DX12, and it reloaded both timesTested locally on top of
Shader-HotReload, not on top of the currentstaging.Goes with CanReader/SleakCraft
fix/windows-debug-build, same branch name so its CI builds against this one.