Mesa (master): glapi: Annotate XML with function name suffix anomalies.

Paul Berry stereotype441 at kemper.freedesktop.org
Tue Nov 6 21:02:39 UTC 2012


Module: Mesa
Branch: master
Commit: e41d1a4e746775efa8c5f6bb72b8781417cb0ec0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e41d1a4e746775efa8c5f6bb72b8781417cb0ec0

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Thu Oct 18 22:12:18 2012 -0700

glapi: Annotate XML with function name suffix anomalies.

When the XML lists one or more GL api functions as aliases for another
GL function, the mesa function that implements the functionality is
usually named after the canonical version of the function (the one
that is the target of the aliases).  For example, FogCoordd is listed
as an alias of FogCoorddEXT, and the Mesa function implementing the
functionality is called loopback_FogCoorddEXT.

However, there are exceptions.  For example, Enablei is listed as an
alias of EnableIndexedEXT, but the Mesa function implementing the
functionality is called _mesa_EnableIndexed.

To account for these anomalies, this patch annotates the XML with
"mesa_name" attributes, which describe how to adjust the function name
to find the corresponding Mesa function.

For example:

  <function name="EnableIndexedEXT" mesa_name="-EXT">...</function>
  <function name="IsProgramNV" mesa_name="-NV+ARB">...</function>

means that EnableIndexedEXT is implemented by a Mesa function called
_mesa_EnableIndexed, and IsProgramNV is implemented by a Mesa function
called _mesa_IsProgramARB.

Future patches will use this annotation when code generating
_mesa_create_exec_table(), to determine the name of the Mesa function
that should be stored in each dispatch table entry.

Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/mapi/glapi/gen/ARB_draw_buffers_blend.xml    |    9 +-
 src/mapi/glapi/gen/ARB_instanced_arrays.xml      |    2 +-
 src/mapi/glapi/gen/ARB_texture_buffer_object.xml |    2 +-
 src/mapi/glapi/gen/EXT_draw_buffers2.xml         |   12 +-
 src/mapi/glapi/gen/EXT_gpu_shader4.xml           |   46 ++++---
 src/mapi/glapi/gen/EXT_texture_integer.xml       |    8 +-
 src/mapi/glapi/gen/EXT_transform_feedback.xml    |   14 ++-
 src/mapi/glapi/gen/NV_conditional_render.xml     |    4 +-
 src/mapi/glapi/gen/NV_primitive_restart.xml      |    2 +-
 src/mapi/glapi/gen/OES_fixed_point.xml           |   78 ++++++------
 src/mapi/glapi/gen/OES_single_precision.xml      |    8 +-
 src/mapi/glapi/gen/es_EXT.xml                    |   15 ++-
 src/mapi/glapi/gen/gl_API.dtd                    |    3 +-
 src/mapi/glapi/gen/gl_API.xml                    |  135 ++++++++++++++--------
 14 files changed, 191 insertions(+), 147 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=e41d1a4e746775efa8c5f6bb72b8781417cb0ec0



More information about the mesa-commit mailing list