mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 18:10:36 +02:00
Fix gl_enums.py so that enums that are listed with the same name in
multiple places don't get generated multiple times.
This commit is contained in:
parent
497dd3e920
commit
70dbbbf89a
2 changed files with 2484 additions and 2503 deletions
|
|
@ -31,10 +31,11 @@ import gl_XML
|
|||
import sys, getopt
|
||||
|
||||
class PrintGlEnums(gl_XML.FilterGLAPISpecBase):
|
||||
name = "gl_enums.py (from Mesa)"
|
||||
|
||||
def __init__(self):
|
||||
gl_XML.FilterGLAPISpecBase.__init__(self)
|
||||
|
||||
self.name = "gl_enums.py (from Mesa)"
|
||||
self.license = license.bsd_license_template % ( \
|
||||
"""Copyright (C) 1999-2005 Brian Paul All Rights Reserved.""", "BRIAN PAUL")
|
||||
self.enum_table = {}
|
||||
|
|
@ -186,7 +187,13 @@ int _mesa_lookup_enum_by_name( const char *symbol )
|
|||
|
||||
# Prevent duplicate names in the enum table.
|
||||
|
||||
if obj.name not in self.enum_table[ obj.value ]:
|
||||
found_it = 0
|
||||
for [n, junk] in self.enum_table[ obj.value ]:
|
||||
if n == obj.name:
|
||||
found_it = 1
|
||||
break
|
||||
|
||||
if not found_it:
|
||||
|
||||
# Calculate a "priority" for this enum name.
|
||||
# When we lookup an enum by number, there may
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue