aco: default to a definition size of 32

For non-arithmetic opcodes such as buffer_load_dword and buffer_load_short,
default to a definition size of 32.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7276>
This commit is contained in:
Rhys Perry 2020-10-21 16:00:36 +01:00
parent 768186e2af
commit 41839d38cf
1 changed files with 4 additions and 4 deletions

View File

@ -206,7 +206,10 @@ class Opcode(object):
op_dtype_sizes['i16'] = 32
op_dtype_sizes['u16'] = 32
self.operand_size = op_dtype_sizes.get(op_dtype, 0)
# If we can't tell the definition size and the operand size, default to
# 32. Some opcodes can have a larger definition size, but
# get_subdword_definition_info() handles that.
self.operand_size = op_dtype_sizes.get(op_dtype, 32)
self.definition_size = def_dtype_sizes.get(def_dtype, self.operand_size)
# exceptions
@ -228,9 +231,6 @@ class Opcode(object):
self.definition_size = 32
elif '_pknorm_' in name:
self.definition_size = 32
elif format == Format.PSEUDO_REDUCTION:
# 64-bit reductions can have a larger definition size, but get_subdword_definition_info() handles that
self.definition_size = 32
# global dictionary of opcodes