mmp / pbrt-v3

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
http://pbrt.org
BSD 2-Clause "Simplified" License
4.87k stars 1.18k forks source link

Spectrum.LinearUpsample2x test failed on win10 #220

Closed YaMaple closed 4 years ago

YaMaple commented 5 years ago

Hello! Pbrt-v3 is awesome, but I have run into a problem.

I built pbrt-v3 on both ubuntu18.04.1 and win10 a few months ago and everything was fine. Yesterday I built pbrt-v3 (I recloned pbrt-v3 yesterday before building it) on ubuntu18.04.1 again and it works well, but after building it on win10 (using the recloned pbrt-v3), I have one failed test in pbrt_test.exe.

I use cmake-gui and vs2017 (up to date version) on win10 to build pbrt-v3 and I didn't modify any configuration setting in cmake-gui.

The output of cmake https://paste.ubuntu.com/p/wnzJZxFb7c/ The output of vs2017 when building PBRT-V3.sln https://paste.ubuntu.com/p/FgvcrSmfY5/ The output of pbrt_test.exe https://paste.ubuntu.com/p/bbZPnNvmWz/ The interface of cmake 2019-01-14 094042 The interface of vs2017 2019-01-14 094755

Thanks in advance!

vchizhov commented 5 years ago

You can find this comment inside the code: // FIXME: the i=0 case fails with MSVC 2013; it returns 1.125 instead of 1. // Should chase this down to figure out if it's an edge-case in our // implementation that happens to work out for other compilers but is // actually a bug/ambiguous, or if it's a MSVC issue. So I think it's safe to assume they are not sure either what's causing the issue.

YaMaple commented 5 years ago

You can find this comment inside the code: // FIXME: the i=0 case fails with MSVC 2013; it returns 1.125 instead of 1. // Should chase this down to figure out if it's an edge-case in our // implementation that happens to work out for other compilers but is // actually a bug/ambiguous, or if it's a MSVC issue. So I think it's safe to assume they are not sure either what's causing the issue.

Oh~Thanks a lot! That's a great relief.

Kapsler commented 5 years ago

I had the same problem with VS2019, but only in "Release" Configuration. Fixed it in this PR https://github.com/mmp/pbrt-v3/pull/249

mmp commented 4 years ago

And PR #249 is finally merged, so closing this out...