OpenGL errors rendering transparency on mesa

Hi, I’ve posted a question 2 weeks ago in the Support category but did not get a response that got me much further, so I’m trying on Development. I am trying to render transparency with VTK 9.0.1 on Mesa 18.3.4 (also observed on 20.1.8) with a very simple python script (see earlier post) but any transparent object is not rendered at all, and heaps of OpenGL related errors are reported by VTK. I don’t know how to interpret those errors or how to proceed.

Today I enabled debugging in Mesa with MESA_DEBUG=1 which appears to confirm that it get erroneous input from VTK (see mesa-18.3.4-trace.out (8.7 KB))

I would appreciate any help debugging these errors as it is blocking our migration from vtk8.1.1 to vtk9.

Thank you very much.

Andreas

I’ve been debugging my VTK9.0.1 and found that the vtkOpenGLState fails to initialize the TextureInternalFormats for VTK_FLOAT.

image

Seeing that 8.1.1 has similar code something else must have changed in between I suppose.

I tried setting the MESA_GL_VERSION_OVERRIDE but then I get

vtkOpenGLState.cxx:505 WARN| Error glBindFramebuffer1 OpenGL errors detected
0 : (1286) Invalid framebuffer operation

and nothing gets rendered anymore.

Googling around a bit I found an article that suggests that mesa should have the GL_ARB_texture_float extension enabled.

I get something similar; I can confirm that I only get the following error output if I enable transparency - if both actors are fully opaque then Mesa doesn’t report any errors:

$ MESA_DEBUG=1 python main.py
Mesa: User error: GL_INVALID_VALUE in glTexImage2D(internalFormat=GL_NONE)
Mesa: 1 similar GL_INVALID_VALUE errors
Mesa: User error: GL_INVALID_FRAMEBUFFER_OPERATION in glClear(incomplete framebuffer)
Mesa: User error: GL_INVALID_FRAMEBUFFER_OPERATION in glBlitFramebuffer(incomplete draw/read buffers)
Mesa: User error: GL_INVALID_FRAMEBUFFER_OPERATION in glDrawRangeElements(incomplete framebuffer)
Mesa: User error: GL_INVALID_FRAMEBUFFER_OPERATION in glClear(incomplete framebuffer)
Mesa: User error: GL_INVALID_FRAMEBUFFER_OPERATION in glBlitFramebuffer(incomplete draw/read buffers)
Mesa: User error: GL_INVALID_FRAMEBUFFER_OPERATION in glDrawRangeElements(incomplete framebuffer)

I suspect your mesa doesn’t have the proper GL extension too. Try:

glxinfo | grep GL_ARB_texture_float

Mesa 18.3.4 should have it enabled but the version on our CentOS 7 doesn’t have it either.

It’s true; I only have these that I assume are OpenGL ES-related:

$ glxinfo | grep -i texture_float
    GL_OES_texture_float_linear, GL_OES_texture_half_float_linear