[Mesa-dev] GLES1/2 and DRI drivers

Kristian Høgsberg krh at bitplanet.net
Fri Apr 16 11:08:41 PDT 2010


2010/4/16 Ian Romanick <idr at freedesktop.org>:
> Kristian Høgsberg wrote:
>> 2010/4/13 Chia-I Wu <olvaffe at gmail.com>:
>>> These all look good to me.  Two bigger issues I can think of now is the
>>> merge of GLAPI XMLs and get_gen.py.  I never have a chance to look at
>>> gles version of get_gen.py, and I think it might require quite some time
>>> of manual editing to merge.  GLAPI XMLs is less trouble if one is to
>>> create a big dispatch table.  But it might be good to be able to create
>>> a small GLES2 only dispatch table, if configured to.
>>
>> That sounds good, I'll finish up the patches and post them for more
>> detailed review.  As for the dispatch table, I'll go with the big
>> static table we have now, but we definitely want something better for
>> a gles2 only driver.  I've been talking with Ian about different ideas
>> how to do this, and we're thinking that we can just do away with the
>> dispatch table alltogether and have the loader call get_proc for all
>> the entry points it needs.  We could use something like gperf perhaps
>> to make this fast enough.
>
> By dispatch table I assume you mean remap table?

No, I meant dispatch table (both times I mentioned it).  Right now the
XML for GLES1/2 includes entry points from desktop GL so that the
offsets in the dispatch table for the entry points shared between all
GL variants remain the same.  That's what I'm referring to when I say
"the big static table", that is, it's too big when used with GLES1/2
and the entry point offsets are assigned statically.

What we talked about, as far as I remember and understood, was that we
could just drop the statically defined dispatch table and use
glapi_get_proc for all entry points to build up a dispatch table from
the loader.  The the loader could manage setting the dispatch table
itself as it switches contexts etc.  Of course, this doesn't work, as
the driver (at least for desktop gl) will want to change the dispatch
table for glBegin/glEnd.

So I'm back to thinking that passing in a list of entry point names in
the order the loader expects them at context creation time is the way
to go.  We can drop _mesa_init_exec_table and _mesa_init_save_table
and just fill in the dispatch table by looking up the functions the
loader asks for.

Anyway, it's all pretty hand-wavey right now, and I'm just trying to
get GLES2 and desktop GL working from the same DRI driver for now.
I'm not looking to reduce the dispatch table size or get rid of the
compat entry points in this first step.

Kristian


More information about the mesa-dev mailing list