Multisampled texture flicker when rendering to it with blending

Geometry is first rendered with blending into a multisampled texture, then the texture is rendered onto a full-window plain. The resulting frames differ from one another: there is some color variation where the edges of the geometry are. Color differences aren’t visible to the eye.

In this example we enable blending, draw a cylinder into a texture, then draw all of the 4 samples of the texture onto separate areas of the window. Recorded frames differ.

I’ve got a code of a minimal SDL/GL example (blend-msaa) and nv-nsight-generated code from it. I’ve captured two frames that are supposed to be identical but they aren’t.

Am I using GL properly? Should blending/msaa always give the same result?

(the NULL-pointer segfault that’s in the logs happened only once, seems unrelated to the issue)

nvidia-bug-report.log.gz (470.2 KB) blend-msaa.zip (4.4 KB) blend-msaa__2021_02_22__14_12_02.zip (591.5 KB)blend-msaa-frames.zip (279.5 KB)