Closed syoyo closed 7 years ago
I added a unit test for FourierBSDF in 371c518cce1de303472184588357e2fca08129ae which should both help verify that this doesn't break other platforms (though I don't see how it could), and also verify that this does in fact do the right thing on big endian systems. I'll go ahead and merge this, but please let me know if the test does in fact pass in SPARC.
Thanks!
Thanks for the test code.
if the test does in fact pass in SPARC.
I have confirmed the unit test passes on SPARC machine.
$ ./pbrt_test --gtest_filter="*Four*"
Running main() from gtest_main.cc
Note: Google Test filter = *Four*
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from BSDFs
[ RUN ] BSDFs.Fourier
[ OK ] BSDFs.Fourier (6 ms)
[----------] 1 test from BSDFs (6 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (6 ms total)
[ PASSED ] 1 test.
… use our own byteswap function.
I have no idea how to test
materials/fourier.cpp
, but the fix is tiny and should work well. (If required, I can run test on big endian machine(i.e. SPARC) once test data is given)