Moving on this thread towards a successful solution,
Here is what should be a summary of essentials from earlier posts in this thread and my current findings and recommendations (at the moment to resolve). I’m fairly confident the following should theoretically work, but will require Users to confirm.
Problem:
How to implement OpenGL 3D in a VMware Guest,
Apparently the Guest requires OpenGL 3D core profile 3.3, must be exact and nothing higher or lower.
Automatic Fallback:
If OpenGL 3D 3.3 cannot be configured, then the general recommendation is to <disable> hardware acceleration in the Guest which should likely then automatically enable OpenGL 3d 2.1(?) support. Leaving hardware acceleration enabled when not configured properly is the worst configuration with least performance.
Useful things to know:
Since OpenGL 3.1, “profiles” are supported so that it’s possible to configure a non default. Profiles are considered not the same as actually compiling that particular version, and there is no guarantee that a particular profile setting will satisfy application requirements, in which case the recommendation is to install and possibly build the specified version of Mesa that supports that version of OpenGL 3D.
There are two types of profiles, the “core profile” which can be considered the base set of instructions supported and “compatibility profile” which by default is supposed to support the given core profile instructions plus anything later than that.
General Setup configurations(required)
**HostOS **- No matter the OS or distro, configure the best performing DirectX (MSWindows) or Mesa (Linux) available. Older versions on the HostOS can work, but will result in less performance and fewer features available to the Guest (Any, no matter OS or distro). Proprietary drivers are generally recommended over FOSS drivers (primarily nVidia and Radeon). Using the driver’s configuration utility, ensure hardware acceleration is enabled and at maximum setting. Although not explicitly described anywhere I can find, the inference in everything I’ve read is that the specific glfx may not be important, but the best hardware acceleration (primarily drivers and driver configuration) is essential.
VMware Guests - Not necessarily applicable to other virtualization technologies although I imagine there is probably plenty opportunity for cross-over since I suspect that CPU hardware extensions support the GPU in some cases (particularly Intel GPUs).
MSWindows Guests should be configured with the latest DirectX available, and hardware acceleration enabled. I cannot find any VMware documentation that specifically describes a MSWindows Guest on a Linux HostOS, but if my inference/guess about the HostOS is correct, then there should not be any further configuration necessary when running on a Linux HostOS.
Linux Guests including openSUSE need to be configured with OpenGL 3D core profile 3.3 <only> and hardware acceleration enabled in the VM Settings.
I cannot find specific instructions for how to configure the Guest but I have found several articles which suggest the following methods will work.
The following describes how to configure any VMware settings which might work in the vmx file first, then how to set the Guest system environmental setting inside the Guest.
Again, all rely on having a recent version of Mesa installed (current seems to be 4.6), later than Mesa 3.1
VMware specific settings (not likely relevant outside of configuring a VMware Guest)
https://www.mesa3d.org/envvars.html
**VMware SVGA driver environment variables
**SVGA_FORCE_SWTNL
[INDENT=2]force use of software vertex transformation[/INDENT]
SVGA_NO_SWTNLdon’t allow software vertex transformation fallbacks (will often result in incorrect rendering).
SVGA_DEBUG
[INDENT=2]for dumping shaders, constant buffers, etc. See the code for details.[/INDENT]
SVGA_EXTRA_LOGGING
[INDENT=2]if set, enables extra logging to the vmware.log file, such as the OpenGL program’s name and command line arguments.[/INDENT]
SVGA_NO_LOGGING
[INDENT=2]if set, disables logging to the vmware.log file. This is useful when using Valgrind because it otherwise crashes when initializing the host log feature.[/INDENT]
See the driver code for other, lesser-used variables.
Following were added with VMware Workstation (and Player) 15.0
- Multisample antialiasing (2x, 4x)
- GL_ARB/AMD_draw_buffers_blend
- GL_ARB_sample_shading
- GL_ARB_texture_cube_map_array
- GL_ARB_texture_gather
- GL_ARB_texture_query_lod
- GL_EXT/OES_draw_buffers_indexed
How to Configure
How to Configure VMware Specific settings
The above settings can be considered VMware specific settings.
I expect that it adding each and any of the above listed commands to a Guext vmx (The main Guest configuration file) should work.
I also suspect that the commands <may> work within the Guest as either a system environment variable or a User profile variable <may> work.
How to Configure general Mesa settings
The astute observer might already have noticed that none of the VMware specific settings listed above will configure a specific OpenGL 3D profile, this seems to be possible only as a general environment setting. I have found two types of postings that describe how to pass non-default environment settings, one by an application setting if provided (eg in a Steam game) and the other in a development environment by modifying the console environment (eg modifying bashrc) by usual means. Although I cannot find an explicit recommended method of configuration for ordinary Use (not a specific game or using a console to code), those can easily be used to infer that these environment variables can be set in the system profile using ordinary methods.
If you want to try the following command which sets the system OpenGL 3D core profile setting without rebooting, you’ll have to reload the system profile manually, then after a reboot my glxinfo reports all Mesa settings are now based on 3.3. I did not run any benchmarks, recommend people do so or otherwise verify any performance benefit.
cat >> /etc/profile.local << EOF
#Custom Mesa OpenGL core profile setting to support 3D acceleration
export MESA_GL_VERSION_OVERRIDE-3.3
export MESA_GLES_VERSION_OVERRIDE=3.3
export MESA_GLSL_VERSION_OVERRIDE=3.3
EOF
Full documentation listing all the various Mesa configuration options can be found in the following, is a complete listing for not just generic system but also specific hardware both physical and virtual.
https://www.mesa3d.org/envvars.html
Additional Misc references I used to create this solution
Describes modifying bashrc setting to support new environment setting
https://communities.vmware.com/thread/579259
Misc Mesa info if you want to do more research, one of many that also describes how to compile your own Mesa
http://mesa.sourceforge.net/prereqs.html
How to set environment variable in a Steam game
https://www.reddit.com/r/linux_gaming/comments/7w77kv/how_to_override_mesa_environment_variable/