VMware Communities
MirceaIspas
Contributor
Contributor

OpenGL 4.1 support on Linux Guest using Workstation PRO 16

I've see in the release notes (VMware Workstation 16 Pro Release Notes​) this line:

Support for DirectX 11 and OpenGL 4.1 in the Guest

I've installed Ubuntu 20.04 guest on Windows 10 host and OpenGL 3.3 version is reported. I've updated Mesa drivers to latest version (20.1.8) and the same OpenGL version is reported:

glxinfo -B

name of display: :0

display: :0  screen: 0

direct rendering: Yes

Extended renderer info (GLX_MESA_query_renderer):

    Vendor: VMware, Inc. (0x15ad)

    Device: SVGA3D; build: RELEASE;  LLVM; (0x405)

    Version: 20.1.8

    Accelerated: no

    Video memory: 1MB

    Unified memory: no

    Preferred profile: core (0x1)

    Max core profile version: 3.3

    Max compat profile version: 3.3

    Max GLES1 profile version: 1.1

    Max GLES[23] profile version: 2.0

OpenGL vendor string: VMware, Inc.

OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;

OpenGL core profile version string: 3.3 (Core Profile) Mesa 20.1.8 - kisak-mesa PPA

OpenGL core profile shading language version string: 3.30

OpenGL core profile context flags: (none)

OpenGL core profile profile mask: core profile

OpenGL version string: 3.3 (Compatibility Profile) Mesa 20.1.8 - kisak-mesa PPA

OpenGL shading language version string: 3.30

OpenGL context flags: (none)

OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 2.0 Mesa 20.1.8 - kisak-mesa PPA

OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16

Can you please let me know how may I get OpenGL 4.1 support?

PS: I've also tried this guide https://docs.mesa3d.org/vmware-guest.html to build vmwgfx, but it seems outdated.
The error message is:

meson.build:269:2: ERROR: Problem encountered: swrast vulkan requires gallium swrast

4 Replies
charmainel
VMware Employee
VMware Employee

Hi,

For OpenGL 4.1 support on Linux Guest, you need mesa-20.2.0 and at least linux kernel 5.7.

You can download mesa-20.2.0-rc4 from https://docs.mesa3d.org/download.html

For linux kernel, please try Linux 5.8.

http://ubuntuhandbook.org/index.php/2020/08/install-linux-kernel-5-8-ubuntu/

-Charmaine

0 Kudos
RogerLeigh
Enthusiast
Enthusiast

I'm seeing OpenGL 4.1 capabilities testing with Linux 5.8 and Mesa 20.2 (Ubuntu 20.10).  However, Vulkan is not functional as far as I can tell:

$ vulkaninfo

ERROR at /build/vulkan-tools-jYkto9/vulkan-tools-1.2.141.0+dfsg1/vulkaninfo/vulkaninfo.h:240:vkEnumerateInstanceExtensionProperties failed with ERROR_INITIALIZATION_FAILED

$ glxinfo

...

Extended renderer info (GLX_MESA_query_renderer):

    Vendor: VMware, Inc. (0x15ad)

    Device: SVGA3D; build: RELEASE;  LLVM; (0x405)

    Version: 20.2.0

    Accelerated: no

    Video memory: 1MB

    Unified memory: no

    Preferred profile: core (0x1)

    Max core profile version: 4.1

    Max compat profile version: 4.1

    Max GLES1 profile version: 1.1

    Max GLES[23] profile version: 2.0

OpenGL vendor string: VMware, Inc.

OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;

OpenGL core profile version string: 4.1 (Core Profile) Mesa 20.2.0

OpenGL core profile shading language version string: 4.10

OpenGL core profile context flags: (none)

OpenGL core profile profile mask: core profile

...

Is it expected that Vulkan should be functional with Workstation 16?  With Vulkan increasingly replacing OpenGL usage, I'm very keen to be able to utilise it in virtual machines.  For some applications, it would render virtualisation impossible if this is not supportable.

I've tested on the very latest Workstation 16 and Fusion 12; same behaviour in both cases.  On both host systems, I can run Vulkan applications without problems.

Kind regards,

Roger

0 Kudos
wmliang
Contributor
Contributor

the release notes mentioned that "Vulkan Render Support for Linux Workstation"

i think vulkan render doesn't work on windows host until now

i'm interesting about what config you did to enable vulkan render on windows host

0 Kudos
bluefirestorm
Champion
Champion

To use the Vulkan renderer on Windows host, add the following to the vmx configuration file.

mks.enableDX11Renderer = "FALSE"

mks.enableVulkanRenderer = "TRUE"

It switches from using the default DX11 renderer to using Vulkan. Note that the capabilities goes down to DX10.1 for a Windows guest if Vulkan renderer is used; as the guest capability shows no support for Shader Model 5 and 8x multisampling. As this is not an official supported configuration, there could be other side effects aside from this.

The release notes say that the Vulkan renderer is for Intel graphics on Linux hosts.

On a Windows 10 host with GTX960M as default graphics processor.

From vmware.log

| vmx| I005: SVGA3dCaps: guest, compatibility level: 9

| vmx| I005:   cap[258]: 0x00000000 (SM5)

| vmx| I005:   cap[259]: 0x00000000 (MULTISAMPLE_8X)

From mks-sandbox.log

| mks| I005: MKS-RenderMain: Starting VKRenderer

| mks| I005: Vulkan Renderer: Using device 0 of 1

| mks| W003: Vulkan Renderer: VK_EXT_sample_locations extension not supported. MSAA disable will not work.

| mks| I005: Vulkan Renderer: Device Info:

| mks| I005: Vulkan Renderer:   Vendor: 'NVIDIA'

| mks| I005: Vulkan Renderer:   ID: 0x139b

| mks| I005: Vulkan Renderer:   Type: 0x2

| mks| I005: Vulkan Renderer:   Name: 'GeForce GTX 960M'

| mks| I005: Vulkan Renderer:   Chip: 'Maxwell (Maxwell)'

| mks| I005: Vulkan Renderer:   Driver Name: 'NVIDIA'

| mks| I005: Vulkan Renderer:   Driver Info: '456.71'