Closed w3ntao closed 1 year ago
Sorry for not looking at this sooner...
InlinedVector
should give the same results as std::vector
. I tried rendering this scene with your change, however, and am not seeing any pixel differences. Can you say more about which OS / CPU/GPU you are using?
I was using Debian 11 on ThinkPad L14 Gen 2 (forgot the exact CPU spec but it's i7-X 11 gen) when submitting this issue. That laptop has been gifted to a friend so it will take a while for me to reproduce this bug.
The weird thing is, I couldn't reproduce this bug with either my desktop (Debian 12, i5-13600K) or docker (Debian 11 and Debian 12).
Regarding to the scene killeroo-gold, I think the name was changed to "killeroo-gold.png"
and pixelsamples
changed to probably one of [16, 32, 64]
.
It was all CPU rendering, no GPU used. I will come back to this issue when I have access to the original hardware.
The bug was originally triggerd on Debian 11 with CPU 11th Gen Intel i7-1165G7 (8) @ 2.800GHz.
Now it can't be reproduced after upgrading to Debian 12. Closing this issue.
After replacing
InlinedVector<Point3f>
withstd::vector<Point3f>
, I got different result rendering pbrt-v4-scenes/killeroos/killeroo-gold.pbrt. The difference is subtle:left: rendered by official PBRT, mid: diff image, right: after replacing
InlinedVector<Point3f>
withstd::vector<Point3f>
diff image: different pixels are highlighted with red dots
Code change can be found at https://github.com/w3ntao/pbrt-v4-inlinedvector/commit/c245fde62d94e7cc39ae3e7fe7d5a962938cb8c3 and it is the only different commit compared with PBRT.
Is this a bug or intended? Does
InlinedVector
supposed to work exactly likestd::vector
(when ignoring perfomance issues)?My guess is
InlinedVector
might change memory layout.