mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-16 02:28:20 +02:00
util/drirc: remove the driver option in drirc_validate
Each driver use its own drirc file now, so the option is useless. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41881>
This commit is contained in:
parent
957eb2b5f0
commit
47298397dc
3 changed files with 7 additions and 16 deletions
|
|
@ -134,7 +134,7 @@ def main():
|
|||
|
||||
options = declare_options()
|
||||
|
||||
drirc_gen.drirc_validate([args.validate], options, driver="turnip")
|
||||
drirc_gen.drirc_validate([args.validate], options)
|
||||
|
||||
drirc_gen.drirc_generate(args.drirc_src, args.drirc_hdr, "turnip", options)
|
||||
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ def main():
|
|||
|
||||
options = declare_options(args.android_ver)
|
||||
|
||||
drirc_gen.drirc_validate([args.validate], options, driver="anv")
|
||||
drirc_gen.drirc_validate([args.validate], options)
|
||||
|
||||
drirc_gen.drirc_generate(args.drirc_src, args.drirc_hdr, "anv", options)
|
||||
|
||||
|
|
|
|||
|
|
@ -215,24 +215,15 @@ ${driver_prefix}_parse_dri_options(struct ${driver_prefix}_drirc *drirc,
|
|||
}
|
||||
"""
|
||||
|
||||
def drirc_validate(conf_paths, sections, driver=None):
|
||||
def drirc_validate(conf_paths, sections):
|
||||
declared = {opt.name for section in sections for opt in section.options}
|
||||
conf_names = set()
|
||||
for conf_path in conf_paths:
|
||||
tree = ET.parse(conf_path)
|
||||
if driver is None:
|
||||
for option in tree.iter('option'):
|
||||
name = option.get('name')
|
||||
if name:
|
||||
conf_names.add(name)
|
||||
else:
|
||||
for device in tree.iter('device'):
|
||||
if device.get('driver') != driver:
|
||||
continue
|
||||
for option in device.iter('option'):
|
||||
name = option.get('name')
|
||||
if name:
|
||||
conf_names.add(name)
|
||||
for option in tree.iter('option'):
|
||||
name = option.get('name')
|
||||
if name:
|
||||
conf_names.add(name)
|
||||
missing = conf_names - declared
|
||||
if missing:
|
||||
print('ERROR: options used in conf but not declared:', file=sys.stderr)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue