(VM) Mesa driver supports only OpenGL 3.0

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
zoharl

(VM) Mesa driver supports only OpenGL 3.0

Post by zoharl »

I'm running mint in VMWare. It installs:

Code: Select all

OpenGL vendor string: VMware, Inc.
OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;
OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.4.0-devel
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.4.0-devel
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.4.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
OpenGL 3.0 is a decade old. I need at least 3.2 for geometry shaders. I found the following:

https://www.mesa3d.org/vmware-guest.html

And I was wondering if there's something quicker?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
zoharl

Re: (VM) Mesa driver supports only OpenGL 3.0

Post by zoharl »

I followed the instructions in the link, but OpenGL isn't upgraded.
ArtGirl

Re: (VM) Mesa driver supports only OpenGL 3.0

Post by ArtGirl »

zoharl wrote:I followed the instructions in the link, but OpenGL isn't upgraded.
No matter how much I update mesa and kernel, my OpenGL won't go past 3.0, because of my graphics card.
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: (VM) Mesa driver supports only OpenGL 3.0

Post by Hoser Rob »

You do need to check if your graphics card supports it ... copy/paste this to terminal and copy/paste the text output here:

Code: Select all

inxi -Gx
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
zoharl

Re: (VM) Mesa driver supports only OpenGL 3.0

Post by zoharl »

It doesn't add more info:

Code: Select all

$ inxi -Gx
Graphics:  Card: VMware SVGA II Adapter bus-ID: 00:0f.0
           Display Server: X.Org 1.18.4 drivers: vmware (unloaded: fbdev,vesa) Resolution: 1829x994@60.00hz
           GLX Renderer: SVGA3D; build GLX Version: 3.0 Mesa 17.4.0-devel (git-4d81c8e43e) Direct Rendering: Yes
It seems that mesa has a version override flag with the following syntax:

MESA_GL_VERSION_OVERRIDE=3.3 command

For example:

Code: Select all

$ MESA_GL_VERSION_OVERRIDE=3.3 inxi -Gx
Graphics:  Card: VMware SVGA II Adapter bus-ID: 00:0f.0
           Display Server: X.Org 1.18.4 drivers: vmware (unloaded: fbdev,vesa) Resolution: 1829x994@60.00hz
           GLX Renderer: SVGA3D; build
           GLX Version: 3.3 (Core Profile) Mesa 17.4.0-devel (git-4d81c8e43e) Direct Rendering: Yes
This way, I was able to run my test program that runs a geometry shader.
Unfortunately, I'm still not able to run the app that I need. It now complains that it's missing some OpenGL extensions. Thing is it's an app from 2011, and the missing definitions seem like an old experimental versions of the new ones, and they require only OpenGL 2.0:

Code: Select all

    if ( glewIsSupported ( "GL_VERSION_2_0" ) )
    {
      if ( ! ( GLEW_ARB_vertex_shader &&
               GLEW_ARB_fragment_shader &&
               GL_EXT_geometry_shader4 &&
               GL_TEXTURE_RECTANGLE_ARB ) )
      {
        _ERROR ( "Some extensions are not supported" );
      }

      if ( ! glewIsSupported ( "GL_ARB_pixel_buffer_object" ) )
      {
        _ERROR ( "ERROR: Support for necessary OpenGL extensions missing." );
      }
    }
    else
    {
      _ERROR ( "No support for opengl 2.0" );
    }
If I run it outside the VM with OpenGL 4.5, the app runs fine. Strange, I may need to debug the app...
zoharl

Re: (VM) Mesa driver supports only OpenGL 3.0

Post by zoharl »

Actually, it's not that strange. These are probably definitions which aren't mandatory to implement. So, while Nvidia drivers do have them, the Mesa driver probably doesn't, deciding they are obsolete or something. A solution would be to edit the app code and update the old definitions to the new ones. (I'm not too keen on that, though.)
zoharl

Re: (VM) Mesa driver supports only OpenGL 3.0

Post by zoharl »

I found the problem. The geometry shader starts with:

Code: Select all

#version 330 compatibility
#extension GL_EXT_gpu_shader4: enable
#extension GL_EXT_geometry_shader4 : enable
The first line fails due to: "error: the compatibility profile is not supported". Mesa supports 330 core but not compatibility.
There's also "warning: extension `GL_EXT_geometry_shader4' unsupported in geometry shader".

I guess one way is to rewrite the shader, e.g.

https://stackoverflow.com/questions/201 ... ility-mess

But isn't there a Mesa driver that supports this stuff?
zoharl

Re: (VM) Mesa driver supports only OpenGL 3.0

Post by zoharl »

The proper solution is to use a VM which supports PCI pass-through. Then, Nvidia drivers can be used. Currently, it doesn't seem that the standard VMs for Windows support that.

Anyway, for this specific app, I found an option to disable shaders and run with reduced graphics; so, I'm good for now.
Locked

Return to “Hardware Support”