Making sense of glxinfo OpenGL versions

5,832

OpenGL ES is a subset of the original OpenGL specification and is designed for embedded systems such as smart phones. I'm not 100% sure why the version numbers do not correspond, but they don't. The latest version is 4.5 for OpenGL and 3.2 for OpenGL ES. This explains the reason for the OpenGL ES part of your output. In your case, you have support for the latest versions of both OpenGL and OpenGL ES.

You will note that the OpenGL and OpenGL ES entries have a version string and a shading language version string. Prior to OpenGL 3.3, the OpenGL version number and the shading language version number did not match. I believe this is the reason they have separate entries in the output (as they can obviously be different for older hardware). As seen in your output, the version number (4.5) matches the shading language version (also 4.5).

The hardest part (and the part that I'm not 100% sure about) is the "OpenGL version string".

From what I have seen on several completely different machines, this appears to be capped at version 3.0. The shading language version for 3.0 is 1.3 so the shading language version string makes sense for this OpenGL version. However, why is version capped at 3.0? My thoughts are as follows:

Version 3.0 introduced deprecation (see this link). This is also where the two separate profiles came from, "Core" and "Compatibility". Any implementation of OpenGL only has to implement the "core" specification to be valid.

If you read the Mesa release notes for a particular version you will see a statement relating to this core/compatibility profile issue. The following was taken from the release notes for the latest version 17.0.0 here:

Mesa 17.0.0 implements the OpenGL 4.5 API, but the version reported by glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. Some drivers don't support all the features required in OpenGL 4.5. OpenGL 4.5 is only available if requested at context creation because compatibility contexts are not supported.

Note the last part "OpenGL 4.5 is only available if requested at context creation because compatibility contexts are not supported". Therefore, I think the "OpenGL version string" is the supported version for a "compatibility" profile context (or in other words, for support of any deprecated feature prior to version 3.0).

Share:
5,832

Related videos on Youtube

Mali Remorker
Author by

Mali Remorker

High performance computing, data analysis, hacking all of it together with GNU Guile, Bash, GNU make, R, m4, Fortran, C, ... I think in Scheme.

Updated on September 18, 2022

Comments

  • Mali Remorker
    Mali Remorker over 1 year

    What is the difference between all the different version strings in the output of the glxinfo command?

    I have already asked this here, but didn't get many responses and, anyways, it seems that there are more related questions on AskUbuntu.

    The output of glxinfo|grep OpenGL follows,

     glxinfo |grep Open
        Vendor: Intel Open Source Technology Center (0x8086)
    OpenGL vendor string: Intel Open Source Technology Center
    OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 
    OpenGL core profile version string: 4.5 (Core Profile) Mesa 13.0.2
    OpenGL core profile shading language version string: 4.50
    OpenGL core profile context flags: (none)
    OpenGL core profile profile mask: core profile
    OpenGL core profile extensions:
    OpenGL version string: 3.0 Mesa 13.0.2
    OpenGL shading language version string: 1.30
    OpenGL context flags: (none)
    OpenGL extensions:
    OpenGL ES profile version string: OpenGL ES 3.2 Mesa 13.0.2
    OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
    OpenGL ES profile extensions:
    .
    

    Why is the "core profile" 4.5 , while the OpenGL version string is 3.0 ?

  • Mali Remorker
    Mali Remorker about 7 years
    Great answer. But, judging by what you quoted, couldn't this also mean that not only is 3.0 a generic compat profile, but also the maximum my current driver is able to support? So, the Mesa version can technically do 4.5, but the driver itself is still at 3.0
  • gsxruk
    gsxruk about 7 years
    It is an application developers choice as to which OpenGL profile is used as well as the minimum OpenGL version requirement that the application will need to run. If an application is written using features only available in OpenGL 4.5 and a core profile is requested, you should still be able to run this. A problem may occur if the application requests a compatibility profile though.