[virglrenderer-devel] Cap bits for OpenGL ES hosts

Jakob Bornecrantz jakob.bornecrantz at collabora.com
Wed Dec 20 11:20:43 UTC 2017


Hello Dave et al,

We are working on using OpenGL ES as a host driver. The current status 
is that we can run a gnome-shell session[1] (Ubuntu 17.10) just fine and 
run the piglit gpu testsuit with 501 fails[2]. But as we are bringing up 
this we are running into some cases where GLES is less feature-full then 
Desktop GL. So the guest driver is assuming that certain functionality 
is always available or the cap bits are not fine grained enough. For 
instance, GLES does not support timestamp but the guest driver will 
unconditionally enable GL_ARB_timer_query (because 
PIPE_CAP_QUERY_TIMESTAMP is hardcoded to 1). Or that occlusion query 
implies accurate number of pixels rendered.

Other missing functionality include: 1D Textures; Texture Rectangle; and 
reading back texture data. This list is not exhaustive. For some like 1D 
Texture support we can work around it fairly easy in the host. Texture 
rectangle is harder, while timestamp query and accurate occlusion query 
is impossible.

So I'm suggesting as a way forward that we add one or more cap bits that 
says the host is GLES. For desktop GL we only expose OpenGL 2.1 and turn 
a blind eye to the missing features, like the i915g driver does. Since 
this is what old guests will do anyways. And for GLES we can expose 3.0 
and above.

Thoughts and comments please?

Cheers, Jakob.

[1] https://people.collabora.com/~jakob/gles-host.png
[2] $ piglit run -p wayland gpu run-gpu
[25869/25869] skip: 21440, pass: 3923, warn: 2, fail: 501, crash: 3


More information about the virglrenderer-devel mailing list