[Mesa-dev] new dispatch generator broke with Marek's parallel compile commit

Emil Velikov emil.l.velikov at gmail.com
Tue Apr 2 11:43:15 UTC 2019


On Tue, 2 Apr 2019 at 04:55, Dave Airlie <airlied at gmail.com> wrote:
>
> On Tue, 2 Apr 2019 at 11:24, Dave Airlie <airlied at gmail.com> wrote:
> >
> > Marek's commit to add ARB_parallel_shader_compile broke some es1 tests
> > in the Intel CI.
> >
> > It appears the whatever generates the es1api isn't consistent, for
> > example glTranslatex on my local system is 1405 in es1api but is 1406
> > in the gl api.
> >
> > I'm no expert on this area, Emil any ideas?
>
> This seems to be due the new registry xml parser, I'm not sure how
> broken it is, but it seems like it's a bit busted, and nobody tested
> the scenario where a new function gets introduced in the middle.
>
> It looks like static_data.py has a limit on the offsets it cares
> about, I thought adding static offsets for these functions would help
> here, but it appears currently it all just work by luck, that the
> static offsets work out to be the same as ones generated by gl_XML.py
> for values above MAX_OFFSETS.
>
> I've got a hacky patch that makes it work here, that increases
> MAX_OFFSETS to 1420, adds a new entry to the end for the new APIs, but
> really I think the current code is broken, and is happening to work
> out, but I'm hoping I'm just missing something obvious and it'll be a
> one line fix for Emil.
>
As you have noticed the old generator would add entries to the glapi
table in arbitrary order.
Meaning that the ABI between dri/glapi/libGL* would break every now and then.

In more detail - libGL* would expect glFooBar at offset X, while the
function is at Y according to glapi and the dri module sets the
dispatch at Y. Latter uses a combination of fixed offset and dynamic
offset lookup.

Currently ES* is ported to the new generator and I have some patches
for libGL and glapi, but no DRI modules just yet.
A reasonable short term fix is to update the old generator to honour
the full static_data table.

I'll have a look at that and updating the libGL/libglapi patches.

Thanks
Emil


More information about the mesa-dev mailing list