Gltf-viewer: glgsg error on Mac when using MSAA

On MacOS, gltf-viewer crashes with the following errors (with “gl-check-errors #t”) :

Known pipe types:
CocoaGraphicsPipe
(all display modules loaded.)
:display:gsg:glgsg(error): at 1927 of panda/src/glstuff/glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1927 of panda/src/glstuff/glGraphicsBuffer_src.cxx : invalid operation
:display:gsg:glgsg(error): at 1927 of panda/src/glstuff/glGraphicsBuffer_src.cxx : invalid operation
...

Which is the penultimate report_my_gl_errors() in resolve_multisamples() method.

The workaround is to use simplepbr.init(msaa=0) in gltf-viewer

Is gl-debug true supported by your driver? Is it easy for you to produce an apitrace .trace file?

gl-debug is not supported on Mac…

Here is the API trace apitrace.zip (161.2 KB) The error is indeed when blitting the frame buffer.

I managed to find the exact root cause, it’s when MSAA is activated on a floating point color buffer!

I created an issue: https://github.com/panda3d/panda3d/issues/756