I have 4 build configurations in Visual Studio 2017 15.5.2 (/std:c++latest) that build without a single error or warning (though, I suppressed some warnings about adding padding for alignment and about the usage of anonymous structs): Release|Debug x64 and Release|Debug x86. All the builds run fine except for Release x86 which crashes at some weird fixed location (in fact two weird fixed locations, since I have alternatives for my input file formats).
The output mentions a very informative message:
Some of my C++ Locals (std::strings) had a value equal to some of my HLSL statements and comments, but that does not seem to repeat itself.
I suspect an alignment bug (my x64 builds never had a problem), but I have no idea how to track these down?
I checked if all my struct/classes that are declared alignas are allocated with a custom allocator when stored in std::vector.
All structs/classes storing XMVECTOR/XMMATRIX data are declared alignas(16).
Furthermore, I checked all my call conventions for functions with XMVECTOR/XMMATRIX return or input argument types (this fixed the Debug x86 build, which didn't crash but produced weird shadows).
Any ideas?
↧