diff options
author | Vinson Lee <[email protected]> | 2017-03-17 16:21:38 -0700 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2017-03-21 13:38:00 -0700 |
commit | 1fa432741c45cf9cdbdd416cd0f7b424f2ffc7a5 (patch) | |
tree | be2ef9121e5f7ff483da3b1bc8b15d688eee97b4 /src/compiler/nir/nir_opcodes_c.py | |
parent | ad13bd2e51a5dc01b0f8a0eb927022f0deac0a0c (diff) |
nir: Add positional argument specifiers.
Fix build with Python < 2.7.
File "src/compiler/nir/nir_builder_opcodes_h.py", line 46, in <module>
from nir_opcodes import opcodes
File "src/compiler/nir/nir_opcodes.py", line 178, in <module>
unop_convert("{}2{}{}".format(src_t[0], dst_t[0], bit_size),
ValueError: zero length field name in format
Fixes: 762a6333f21f ("nir: Rework conversion opcodes")
Signed-off-by: Vinson Lee <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opcodes_c.py')
-rw-r--r-- | src/compiler/nir/nir_opcodes_c.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_opcodes_c.py b/src/compiler/nir/nir_opcodes_c.py index c66f3bc7ad4..a1db54f05a8 100644 --- a/src/compiler/nir/nir_opcodes_c.py +++ b/src/compiler/nir/nir_opcodes_c.py @@ -64,7 +64,7 @@ nir_type_conversion_op(nir_alu_type src, nir_alu_type dst) switch (dst_bit_size) { % for dst_bits in [32, 64]: case ${dst_bits}: - return ${'nir_op_{}2{}{}'.format(src_t[0], dst_t[0], dst_bits)}; + return ${'nir_op_{0}2{1}{2}'.format(src_t[0], dst_t[0], dst_bits)}; % endfor default: unreachable("Invalid nir alu bit size"); |