[Mesa-dev] [PATCH 14/20] glapi: Use the offsets from static_data.py instead of from the XML
Dylan Baker
baker.dylan.c at gmail.com
Fri May 15 12:21:31 PDT 2015
Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>
On Wed, May 13, 2015 at 12:44:42PM -0700, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Cc: Dylan Baker <baker.dylan.c at gmail.com>
> ---
> src/mapi/glapi/gen/gl_XML.py | 22 +++++-----------------
> 1 file changed, 5 insertions(+), 17 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py
> index 89b09f2..67aba81 100644
> --- a/src/mapi/glapi/gen/gl_XML.py
> +++ b/src/mapi/glapi/gen/gl_XML.py
> @@ -626,7 +626,7 @@ class gl_function( gl_item ):
> # Decimal('1.1') }.
> self.api_map = {}
>
> - self.assign_offset = 0
> + self.assign_offset = False
>
> self.static_entry_points = []
>
> @@ -685,23 +685,11 @@ class gl_function( gl_item ):
> # Only try to set the offset when a non-alias entry-point
> # is being processed.
>
> - offset = element.get( "offset" )
> - if offset:
> - try:
> - o = int( offset )
> - self.offset = o
> - except Exception, e:
> - self.offset = -1
> - if offset == "assign":
> - self.assign_offset = 1
> -
> - if self.offset == -1:
> - assert name not in static_data.offsets
> - else:
> - assert static_data.offsets[name] == self.offset
> + if name in static_data.offsets:
> + self.offset = static_data.offsets[name]
> else:
> - assert name not in static_data.offsets
> -
> + self.offset = -1
> + self.assign_offset = self.exec_flavor != "skip" or name in static_data.unused_functions
>
> if not self.name:
> self.name = true_name
> --
> 2.1.0
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150515/e76fe3f6/attachment.sig>
More information about the mesa-dev
mailing list