While testing for cocos 0.6.10 it was spotted that
the reference snapshots were RGBA images with alpha channel set to 255
snapshots taken with an AMD APU had non-constant alpha channel
pixels in the framebufer not painted by the scene will be (0, 0, 0, 255) in the reference and (0, 0, 0, 0) in the AMD ones
As a consequence the comparison report is of little use
in the side by side of 'ref' and 'other' snapshots the unpainted pixels would look black for 'ref' and white for 'other' , because the html background color is white. This makes difficult to eyeball the differences
the diff visualization has little value, because in general big areas will show different
too much snapshots will be marked as different, augmenting the manual labor for the human reviever.
Taking a (win11 + AMD APU) machine and an (win7 + nvidia discrete gpu) and running do_test.py on both, at same python + pyglet + cocos, the difference holds.
Same if a test is manually run, snapshots taken by ctrl + S and inspected with irfanview.
Thinking maybe not pyglet nor cocos were setting the glClearColor, and thus a trivial difference on the driver layer was bubling up, I added after the director.init in test_acceldeccel.py the line
from pyglet import gl; gl.glClearColor(255, 0, 0, 255)
This one worked nearly as expected in both systems, solid red background seen in the cocos screen and in the snapshots (alpha == 255 over al alpha in nvidia, same except the grossini contour in AMD)
Changing the color to (0, 0, 0, 0) gets transparent background on amd but still constant alpha == 255 in nvidia.
With (0, 0, 0, 255) alpha == 255 on nvidia and same on amd except the countour of grossini.
Things that could be investigated as the root of the difference
differences in gl blend mode
differences in glClearColor
pyglet can bind to different functions if some extension is present
take snapshots different behavior
?
On the practical side, to make comparisons better now, snapshots could be converted to RGB and then compared.
While testing for cocos 0.6.10 it was spotted that
As a consequence the comparison report is of little use
Taking a (win11 + AMD APU) machine and an (win7 + nvidia discrete gpu) and running do_test.py on both, at same python + pyglet + cocos, the difference holds.
Same if a test is manually run, snapshots taken by ctrl + S and inspected with irfanview.
Thinking maybe not pyglet nor cocos were setting the glClearColor, and thus a trivial difference on the driver layer was bubling up, I added after the director.init in test_acceldeccel.py the line
from pyglet import gl; gl.glClearColor(255, 0, 0, 255)
This one worked nearly as expected in both systems, solid red background seen in the cocos screen and in the snapshots (alpha == 255 over al alpha in nvidia, same except the grossini contour in AMD)
Changing the color to (0, 0, 0, 0) gets transparent background on amd but still constant alpha == 255 in nvidia.
With (0, 0, 0, 255) alpha == 255 on nvidia and same on amd except the countour of grossini.
Things that could be investigated as the root of the difference
On the practical side, to make comparisons better now, snapshots could be converted to RGB and then compared.