Closed bonizz closed 9 years ago
This seems to be the same issue as #235, where allocating a vec4
or mat4
on the heap causes warning C4316
.
Not sure if #316 is the same issue, but the workaround provided in the comment section there does get rid of this warning for me.
See my comment on #235 . This is not an issue unless you are attempting to run SSE instructions on it.
This issue breaks GLI with VS2013, it can no longer correctly read headers because the struct size of the DDS header is incorrect.
Are you using master branch of GLI?
I am not quite sure how this issue affects GLI.
Because of this bug, this member becomes larger than it should be: https://github.com/g-truc/gli/blob/master/gli/core/load_dds.inl#L78
I'm using g-truc/gli@2c317e7aa7e17a96faed6a8f4e995218ccb7bba3, I could update but I don't think that would help.
I'll update GLI to use master branch of GLM and that should fixed the problem.
This bug should be fixed by https://github.com/g-truc/glm/commit/c10df14b5855e8b0b7c4ad47968e828462ddf12e
I forgot to reference this bug number in the commit...
Thanks for reporting, Christophe
@Groovounet I recommend to also add a static assert on the size of that struct, to ensure it can't happen again.
Sounds good!
You can do it like this and check the entire ddsHeader struct at once: https://github.com/Microsoft/DirectXTex/blob/1167ebb9c7615a1f515903b12e61ab3e98209315/DirectXTex/DDS.h#L234
Not sure if this is the same issue as https://github.com/g-truc/glm/issues/316
I upgraded from 0.9.5.4 to 0.9.6.3 and get this warning:
warning C4316: 'B' : object allocated on the heap may not be aligned 16
Here's a simplified code sample which gives this warning:
Is this a bug? Or are there new alignment requirements?
Thanks