Skip to content

RFC: mapi: Fix for the size of types in gl_API.xml.

Markus Wick requested to merge degasus/mesa:glapi_sizeof_pointers into master

The size of some OpenGL types depends on sizeof(void*). Our XML files lack support for this and just hard code it to either 4 or 8 bytes.

This patches changes the size in the XML to a new magic token ptrbits and tries to parse it in our python generators.

However a valid detection of the bitness of the system is not implemented right now. Meson seems not to support setting environment variables, and passing the bitness as argument will uglify our generators a lot.

For discussion, do we want to keep the sizes of all OpenGL types in the XML at all? AFAIK it is only used by glthread, swap_generator in glX proto, and glapi_x86.S. The glthread usage can easily be replaced by sizeof(type), however I have no clue about the other one.

Edited by Markus Wick

Merge request reports