I have two video cards:
Intel(R) HD Graphics 630, Driver Version: 25.20.100.6472
NVIDIA Quadro M1200, Driver Version: 26.21.14.3102
On Windows 10, both cards work well with OpenGL/OpenGl ES applications.
I try to run OpenGL ES application (based on Java/LibGDX/LWJGL3) on Ubuntu 19.04 VM deployed into Hyper-V on Windows 10. I get the following error:
Fragment shader:
0:15(23): error: no matching function for call to `clamp(float, int, int)'; candidates are:
0:15(23): error: float clamp(float, float, float)
0:15(23): error: vec2 clamp(vec2, float, float)
0:15(23): error: vec3 clamp(vec3, float, float)
0:15(23): error: vec4 clamp(vec4, float, float)
0:15(23): error: vec2 clamp(vec2, vec2, vec2)
0:15(23): error: vec3 clamp(vec3, vec3, vec3)
0:15(23): error: vec4 clamp(vec4, vec4, vec4)
0:15(23): error: int clamp(int, int, int)
0:15(23): error: ivec2 clamp(ivec2, int, int)
0:15(23): error: ivec3 clamp(ivec3, int, int)
0:15(23): error: ivec4 clamp(ivec4, int, int)
0:15(23): error: ivec2 clamp(ivec2, ivec2, ivec2)
0:15(23): error: ivec3 clamp(ivec3, ivec3, ivec3)
0:15(23): error: ivec4 clamp(ivec4, ivec4, ivec4)
0:15(17): error: cannot construct `vec4' from a non-numeric data type
java.lang.IllegalArgumentException: no uniform with name 'u_projTrans' in shader
I quest it is the problem with video driver on VM - it cannot compile GLSL code for line where integer parameters are used instead float parameters for clamp
function.
In the system details I see that VM uses the following GPU driver:
llvmpipe (LLVM 8.0, 256bit)
So VM uses Mesa
driver.
When I run glxgears -info
benchmark, it works. Terminal shows the following info log:
GL_RENDERER = llvmpipe (LLVM 8.0, 256 bits)
GL_VERSION = 3.1 Mesa 19.0.2
GL_VENDOR = VMware, Inc
I wonder why GL_VERSION
is so old (3.1)?
When I run lspci -k
and then lshw -c Video
, I get the following results:
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 03)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 01)
Subsystem: Microsoft Corporation 82371AB/EB/MB PIIX4 ISA
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
Kernel driver in use: ata_piix
Kernel modules: pata_acpi
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
Kernel modules: i2c_piix4
00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA
Kernel driver in use: hyperv_fb
Kernel modules: hyperv_fb
*-display
description: VGA compatible controller
product: Hyper-V virtual VGA
vendor: Microsoft Corporation
physical id: 8
bus info: pci@0000:00:08.0
version: 00
width: 32 bits
clock: 33MHz
capabilities: vga_controller bus_master rom
configuration: driver=hyperv_fb latency=0
resources: irq:11 memory:f8000000-fbffffff memory:c0000-dffff
I quest that Microsoft Corporation Hyper-V virtual VGA
is some kind of virtual graphic card device for VM.
And finally, when I run glxinfo | grep -i version -A 2 -B 2
command, I have the following output:
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_context_flush_control, GLX_ARB_create_context,
--
GLX_SGI_make_current_read
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_context_flush_control, GLX_ARB_create_context,
--
GLX_SGIX_visual_select_group, GLX_SGI_make_current_read,
GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
GLX_ARB_context_flush_control, GLX_ARB_create_context,
--
Vendor: VMware, Inc. (0xffffffff)
Device: llvmpipe (LLVM 8.0, 256 bits) (0xffffffff)
Version: 19.0.2
Accelerated: no
Video memory: 6080MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 8.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.0.2
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
--
GL_NV_packed_depth_stencil, GL_OES_EGL_image, GL_S3_s3tc
OpenGL version string: 3.1 Mesa 19.0.2
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
--
GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 19.0.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5,
It shows that direct rendering is enabled, but I don't know why OpenGL version is quite old:
Max core profile version: 3.3
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
Summarizing, I have two questions:
1) How can I upgrade OpenGL version on my Ubuntu VM?
2) It is possible on VM to replace Mesa driver to drivers dedicated to my Intel or NVidia or Intel GPU?
User contributions licensed under CC BY-SA 3.0