pan/bi: Pipe last flag into opcode tables

Only ADD unit for now.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
This commit is contained in:
Alyssa Rosenzweig 2020-12-21 15:54:31 -05:00 committed by Marge Bot
parent df4960499e
commit eb217914f7
3 changed files with 4 additions and 1 deletions

View File

@ -30,12 +30,13 @@ struct bi_op_props bi_opcode_props[BI_NUM_OPCODES] = {
sr_count = add["staging_count"].upper() if add else "0"
sr_read = int(add["staging"] in ["r", "rw"] if add else False)
sr_write = int(add["staging"] in ["w", "rw"] if add else False)
last = int(bool(add["last"]) if add else False)
has_fma = int("*" + opcode in instructions)
has_add = int("+" + opcode in instructions)
%>
[BI_OPCODE_${opcode.replace('.', '_').upper()}] = {
"${opcode}", BIFROST_MESSAGE_${message}, BI_SR_COUNT_${sr_count},
${sr_read}, ${sr_write}, ${has_fma}, ${has_add},
${sr_read}, ${sr_write}, ${last}, ${has_fma}, ${has_add},
},
% endfor
};"""

View File

@ -72,6 +72,7 @@ struct bi_op_props {
enum bi_sr_count sr_count : 3;
bool sr_read : 1;
bool sr_write : 1;
bool last : 1;
bool fma : 1;
bool add : 1;
};

View File

@ -134,6 +134,7 @@ def parse_instruction(ins, include_pseudo):
'unused': ins.attrib.get('unused', False),
'pseudo': ins.attrib.get('pseudo', False),
'message': ins.attrib.get('message', 'none'),
'last': ins.attrib.get('last', False)
}
if 'exact' in ins.attrib: