mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-19 12:48:30 +02:00
util/drirc: make engine_versions an optional field
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10978>
This commit is contained in:
parent
81d132504b
commit
34f5407b8e
2 changed files with 4 additions and 2 deletions
|
|
@ -45,7 +45,7 @@ TODO: document the other workarounds.
|
|||
(version 1 to 4 : "1:4") -->
|
||||
|
||||
<!ATTLIST engine engine_name_match CDATA #REQUIRED
|
||||
engine_versions CDATA #REQUIRED>
|
||||
engine_versions CDATA #IMPLIED>
|
||||
|
||||
<!ELEMENT option EMPTY>
|
||||
<!ATTLIST option name CDATA #REQUIRED
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class Engine(object):
|
|||
def __init__(self, xml):
|
||||
self.cname = cname('engine')
|
||||
self.engine_name_match = xml.attrib['engine_name_match']
|
||||
self.engine_versions = xml.attrib['engine_versions']
|
||||
self.engine_versions = xml.attrib.get('engine_versions', None)
|
||||
self.options = []
|
||||
|
||||
for option in xml.findall('option'):
|
||||
|
|
@ -156,7 +156,9 @@ static const struct driconf_option ${cname}[] = {
|
|||
static const struct driconf_engine ${device.cname}_engines[] = {
|
||||
% for engine in device.engines:
|
||||
{ .engine_name_match = "${engine.engine_name_match}",
|
||||
% if engine.engine_versions:
|
||||
.engine_versions = "${engine.engine_versions}",
|
||||
% endif
|
||||
.num_options = ${len(engine.options)},
|
||||
.options = ${engine.cname + '_options'},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue