[Mesa-dev] [PATCH v3 2/3] Fix missing initializer warning in egd_tables.h by adding appropriate default fields in egd_tables.py
Nicolai Hähnle
nhaehnle at gmail.com
Mon Jun 12 10:08:10 UTC 2017
Same comments as on patch 1.
On 11.06.2017 19:17, Benedikt Schemmer wrote:
> Fix missing initializer warning in egd_tables.h by adding appropriate designated initializers in egd_tables.py
>
> ---
> src/gallium/drivers/r600/egd_tables.py | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/egd_tables.py b/src/gallium/drivers/r600/egd_tables.py
> index 4c606025ba..289981ae18 100644
> --- a/src/gallium/drivers/r600/egd_tables.py
> +++ b/src/gallium/drivers/r600/egd_tables.py
> @@ -266,11 +266,13 @@ struct eg_packet3 {
> while value[1] >= len(values_offsets):
> values_offsets.append(-1)
> values_offsets[value[1]] = strings.add(strip_prefix(value[0]))
> - print '\t{%s, %s(~0u), %s, %s},' % (
> - strings.add(field.name), field.s_name,
> + print '\t{.name_offset\t= %s,\r\n\t .mask\t\t\t= %s(~0u), \
> + \r\n\t .num_values\t= %s,\r\n\t .values_offset\t= %s},' \
> + % (strings.add(field.name), field.s_name,
> len(values_offsets), strings_offsets.add(values_offsets))
> else:
> - print '\t{%s, %s(~0u)},' % (strings.add(field.name), field.s_name)
> + print '\t{.name_offset\t= %s,\r\n\t .mask\t\t\t= %s(~0u)},' \
> + % (strings.add(field.name), field.s_name)
> fields_idx += 1
>
> print '};'
> @@ -279,10 +281,13 @@ struct eg_packet3 {
> print 'static const struct eg_reg egd_reg_table[] = {'
> for reg in regs:
> if len(reg.fields):
> - print '\t{%s, %s, %s, %s},' % (strings.add(reg.name), reg.r_name,
> + print '\t{.name_offset\t= %s,\r\n\t .offset\t\t= %s, \
> + \r\n\t .num_fields\t= %s,\r\n\t .fields_offset\t= %s},' \
> + % (strings.add(reg.name), reg.r_name,
> len(reg.fields), reg.fields_idx if reg.own_fields else reg.fields_owner.fields_idx)
> else:
> - print '\t{%s, %s},' % (strings.add(reg.name), reg.r_name)
> + print '\t{.name_offset\t= %s,\r\n\t .offset\t\t= %s},' \
> + % (strings.add(reg.name), reg.r_name)
> print '};'
> print
>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the mesa-dev
mailing list