[virglrenderer-devel] Cap bits for OpenGL ES hosts

Dave Airlie airlied at gmail.com
Wed Dec 20 22:34:05 UTC 2017


On 20 December 2017 at 21:20, Jakob Bornecrantz
<jakob.bornecrantz at collabora.com> wrote:
> 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.

I think at least 1D texture should be worked around. Reading back texture
data is going to be a bit of a mess, at you can't always generate an FBO
and read from it, (like for compressed textures and wierd formats).

I'm happy to add more caps for timer query and occulsion query
There is actually an occulsion query cap already, we just always set it to 1
and I'm not sure anyone uses it.

>
> 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?

Sounds like a good plan. I'm not sure we want a catch all is GLES bit,
rather than a per-feature bit, I suppose aligning as much as we can with
gallium caps is probably the most sustainable.

Dave.


More information about the virglrenderer-devel mailing list