Closed m0ppers closed 6 years ago
adding to that:
disabling SIMD and SSE2 doesn't yield an error
That's normal and wrong.
It's because texels are always read in packets of 64bit such as here: https://github.com/Marzac/le3d/blob/194e6b3f3217e2a5d09161e65ae586bfd196b2f7/engine/fillers/float/sse/flattexzc.h#L74
Only the lower 32bit of the data is actually used. If the very last pixel N is read, then the pixel N+1 will be read too ... and this pixel is out of bound ... I fix this problem tonight (at several places in the code).
Thank you for finding that mistake, peace!
It seems there is no efficient way to load only 32bit data with SSE. It's totally normal since vectors are m64 or m128. The texture regions should then be aligned AND PADDED (not implemented) to match the MMX / SSE requirements.
This is corrected in the incoming new version 1.8.
Following error is being printed by ASAN on mac os x clang running the cube example:
configured like this:
hans-guenther:le3d mop$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-g -fsanitize=address -fno-omit-frame-pointer" ..